2 "name" : "Roo.menu.Menu",
6 "desc" : "A menu object. This is the container to which you add all other menu items. Menu can also serve a as a base class\nwhen you want a specialzed menu based off of another component (like {@link Roo.menu.DateMenu} for example).",
14 "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n listeners : { \n 'click' : function(e) {\n ..... \n } ,\n .... \n } \n </code></pre>",
15 "memberOf" : "Roo.util.Observable",
21 "type" : "Boolean/String",
22 "desc" : "True or \"sides\" for the default effect, \"frame\" for 4-way shadow, and \"drop\"\nfor bottom-right shadow (defaults to \"sides\")",
23 "memberOf" : "Roo.menu.Menu",
28 "name" : "defaultAlign",
30 "desc" : "The default {@link Roo.Element#alignTo) anchor position value for this menu\nrelative to its element of origin (defaults to \"tl-bl?\")",
31 "memberOf" : "Roo.menu.Menu",
36 "name" : "subMenuAlign",
38 "desc" : "The {@link Roo.Element#alignTo} anchor position value to use for submenus of\nthis menu (defaults to \"tl-tr?\")",
39 "memberOf" : "Roo.menu.Menu",
46 "desc" : "The minimum width of the menu in pixels (defaults to 120)",
47 "memberOf" : "Roo.menu.Menu",
52 "name" : "registerMenu",
54 "desc" : "True (default) - means that clicking on screen etc. hides it.",
55 "memberOf" : "Roo.menu.Menu",
60 "name" : "allowOtherMenus",
62 "desc" : "True to allow multiple menus to be displayed at the same time (defaults to false)",
63 "memberOf" : "Roo.menu.Menu",
70 "name" : "addMenuItem",
71 "desc" : "Creates a new {@link Roo.menu.Item} based an the supplied config object and adds it to the menu",
73 "isConstructor" : false,
75 "memberOf" : "Roo.menu.Menu",
84 "desc" : "A MenuItem config object",
91 "type" : "Roo.menu.Item",
92 "desc" : "The menu item that was added"
97 "name" : "addElement",
98 "desc" : "Adds an {@link Roo.Element} object to the menu",
100 "isConstructor" : false,
102 "memberOf" : "Roo.menu.Menu",
110 "type" : "String/HTMLElement/Roo.Element",
111 "desc" : "The element or DOM node to add, or its id",
118 "type" : "Roo.menu.Item",
119 "desc" : "The menu item that was added"
124 "name" : "isVisible",
125 "desc" : "Read-only. Returns true if the menu is currently displayed, else false.",
127 "isConstructor" : false,
129 "memberOf" : "Roo.menu.Menu",
141 "desc" : "Addds one or more items of any type supported by the Menu class, or that can be converted into menu items.\nAny of the following are valid:\n<ul>\n<li>Any menu item object based on {@link Roo.menu.Item}</li>\n<li>An HTMLElement object which will be converted to a menu item</li>\n<li>A menu item config object that will be created as a new menu item</li>\n<li>A string, which can either be '-' or 'separator' to add a menu separator, otherwise\nit will be converted into a {@link Roo.menu.TextItem} and added</li>\n</ul>\nUsage:\n<pre><code>\n// Create the menu\nvar menu = new Roo.menu.Menu();\n\n// Create a menu item to add by reference\nvar menuItem = new Roo.menu.Item({ text: 'New Item!' });\n\n// Add a bunch of items at once using different methods.\n// Only the last item added will be returned.\nvar item = menu.add(\n menuItem, // add existing item by ref\n 'Dynamic Item', // new TextItem\n '-', // new separator\n { text: 'Config Item' } // new item by config\n);\n</code></pre>",
143 "isConstructor" : false,
145 "memberOf" : "Roo.menu.Menu",
154 "desc" : "One or more menu items, menu item configs or other objects that can be converted to menu items",
161 "type" : "Roo.menu.Item",
162 "desc" : "The menu item that was added, or the last one if multiple items were added"
167 "name" : "addSeparator",
168 "desc" : "Adds a separator bar to the menu",
170 "isConstructor" : false,
172 "memberOf" : "Roo.menu.Menu",
182 "type" : "Roo.menu.Item",
183 "desc" : "The menu item that was added"
188 "name" : "removeAll",
189 "desc" : "Removes and destroys all items in the menu",
191 "isConstructor" : false,
193 "memberOf" : "Roo.menu.Menu",
205 "desc" : "Removes an {@link Roo.menu.Item} from the menu and destroys the object",
207 "isConstructor" : false,
209 "memberOf" : "Roo.menu.Menu",
217 "type" : "Roo.menu.Item",
218 "desc" : "The menu item to remove",
227 "desc" : "Returns this menu's underlying {@link Roo.Element} object",
229 "isConstructor" : false,
231 "memberOf" : "Roo.menu.Menu",
241 "type" : "Roo.Element",
242 "desc" : "The element"
248 "desc" : "Inserts an existing object based on {@link Roo.menu.Item} to the menu at a specified index",
250 "isConstructor" : false,
252 "memberOf" : "Roo.menu.Menu",
261 "desc" : "The index in the menu's list of current items where the new item should be inserted",
266 "type" : "Roo.menu.Item",
267 "desc" : "The menu item to add",
274 "type" : "Roo.menu.Item",
275 "desc" : "The menu item that was added"
281 "desc" : "Hides this menu and optionally all parent menus",
283 "isConstructor" : false,
285 "memberOf" : "Roo.menu.Menu",
294 "desc" : "(optional) True to hide all parent menus recursively, if any (defaults to false)",
303 "desc" : "Displays this menu relative to another element",
305 "isConstructor" : false,
307 "memberOf" : "Roo.menu.Menu",
315 "type" : "String/HTMLElement/Roo.Element",
316 "desc" : "The element to align to",
322 "desc" : "(optional) The {@link Roo.Element#alignTo} anchor position to use in aligning to\nthe element (defaults to this.defaultAlign)",
326 "name" : "parentMenu",
327 "type" : "Roo.menu.Menu",
328 "desc" : "(optional) This menu's parent menu, if applicable (defaults to undefined)",
337 "desc" : "Creates a new {@link Roo.menu.TextItem} with the supplied text and adds it to the menu",
339 "isConstructor" : false,
341 "memberOf" : "Roo.menu.Menu",
350 "desc" : "The text to display in the menu item",
357 "type" : "Roo.menu.Item",
358 "desc" : "The menu item that was added"
364 "desc" : "Adds an existing object based on {@link Roo.menu.Item} to the menu",
366 "isConstructor" : false,
368 "memberOf" : "Roo.menu.Menu",
376 "type" : "Roo.menu.Item",
377 "desc" : "The menu item to add",
384 "type" : "Roo.menu.Item",
385 "desc" : "The menu item that was added"
391 "desc" : "Displays this menu at a specific xy position",
393 "isConstructor" : false,
395 "memberOf" : "Roo.menu.Menu",
402 "name" : "xyPosition",
404 "desc" : "Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based)",
408 "name" : "parentMenu",
409 "type" : "Roo.menu.Menu",
410 "desc" : "(optional) This menu's parent menu, if applicable (defaults to undefined)",
418 "name" : "purgeListeners",
419 "desc" : "Removes all listeners for this object",
421 "isConstructor" : false,
423 "memberOf" : "Roo.util.Observable",
435 "desc" : "Appends an event handler to this element (shorthand for addListener)",
437 "isConstructor" : false,
439 "memberOf" : "Roo.util.Observable",
446 "name" : "eventName",
448 "desc" : "The type of event to listen for",
454 "desc" : "The method the event invokes",
460 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
466 "desc" : "(optional)",
475 "desc" : "Removes a listener (shorthand for removeListener)",
477 "isConstructor" : false,
479 "memberOf" : "Roo.util.Observable",
486 "name" : "eventName",
488 "desc" : "The type of event to listen for",
494 "desc" : "The handler to remove",
500 "desc" : "(optional) The scope (this object) for the handler",
508 "name" : "addEvents",
509 "desc" : "Used to define events on this Observable",
511 "isConstructor" : false,
513 "memberOf" : "Roo.util.Observable",
522 "desc" : "The object with the events defined",
530 "name" : "releaseCapture",
531 "desc" : "Removes <b>all</b> added captures from the Observable.",
533 "isConstructor" : false,
535 "memberOf" : "Roo.util.Observable",
543 "type" : "Observable",
544 "desc" : "The Observable to release",
552 "name" : "removeListener",
553 "desc" : "Removes a listener",
555 "isConstructor" : false,
557 "memberOf" : "Roo.util.Observable",
564 "name" : "eventName",
566 "desc" : "The type of event to listen for",
572 "desc" : "The handler to remove",
578 "desc" : "(optional) The scope (this object) for the handler",
586 "name" : "fireEvent",
587 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
589 "isConstructor" : false,
591 "memberOf" : "Roo.util.Observable",
598 "name" : "eventName",
605 "type" : "Object...",
606 "desc" : "Variable number of parameters are passed to handlers",
614 "desc" : "returns false if any of the handlers return false otherwise it returns true"
619 "name" : "hasListener",
620 "desc" : "Checks to see if this object has any listeners for a specified event",
622 "isConstructor" : false,
624 "memberOf" : "Roo.util.Observable",
631 "name" : "eventName",
633 "desc" : "The name of the event to check for",
641 "desc" : "True if the event is being listened for, else false"
647 "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
649 "isConstructor" : false,
651 "memberOf" : "Roo.util.Observable",
659 "type" : "Observable",
660 "desc" : "The Observable to capture",
666 "desc" : "The function to call",
672 "desc" : "(optional) The scope (this object) for the fn",
680 "name" : "addListener",
681 "desc" : "Appends an event handler to this component",
683 "isConstructor" : false,
685 "memberOf" : "Roo.util.Observable",
692 "name" : "eventName",
694 "desc" : "The type of event to listen for",
700 "desc" : "The method the event invokes",
706 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
712 "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n \t\tdelay: 100,\n \t\tforumId: 4\n\t\t});\n\t\t</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n \t\tfn: this.onClick,\n \t\tscope: this,\n \t\tdelay: 100\n \t\t}, \n \t\t'mouseover': {\n \t\tfn: this.onMouseOver,\n \t\tscope: this\n \t\t},\n \t\t'mouseout': {\n \t\tfn: this.onMouseOut,\n \t\tscope: this\n \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n \t\t'mouseover': this.onMouseOver,\n \t\t'mouseout': this.onMouseOut,\n \t\tscope: this\n\t\t});\n\t\t</code></pre>",
722 "name" : "mouseover",
723 "desc" : "Fires when the mouse is hovering over this menu",
732 "type" : "Roo.menu.Menu",
738 "type" : "Roo.EventObject",
744 "type" : "Roo.menu.Item",
745 "desc" : "The menu item that was clicked",
754 "desc" : "Fires when the mouse exits this menu",
763 "type" : "Roo.menu.Menu",
769 "type" : "Roo.EventObject",
775 "type" : "Roo.menu.Item",
776 "desc" : "The menu item that was clicked",
784 "name" : "beforehide",
785 "desc" : "Fires before this menu is hidden",
794 "type" : "Roo.menu.Menu",
803 "name" : "itemclick",
804 "desc" : "Fires when a menu item contained in this menu is clicked",
813 "type" : "Roo.menu.BaseItem",
814 "desc" : "The BaseItem that was clicked",
819 "type" : "Roo.EventObject",
828 "name" : "beforeshow",
829 "desc" : "Fires before this menu is displayed",
838 "type" : "Roo.menu.Menu",
848 "desc" : "Fires after this menu is hidden",
857 "type" : "Roo.menu.Menu",
867 "desc" : "Fires when this menu is clicked (or when the enter key is pressed while it is active)",
876 "type" : "Roo.menu.Menu",
882 "type" : "Roo.menu.Item",
883 "desc" : "The menu item that was clicked",
888 "type" : "Roo.EventObject",
898 "desc" : "Fires after this menu is displayed",
907 "type" : "Roo.menu.Menu",