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).",
19 "desc" : "Configuration options",
29 "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>",
30 "memberOf" : "Roo.util.Observable",
36 "type" : "Boolean/String",
37 "desc" : "True or \"sides\" for the default effect, \"frame\" for 4-way shadow, and \"drop\"\nfor bottom-right shadow (defaults to \"sides\")",
38 "memberOf" : "Roo.menu.Menu",
43 "name" : "defaultAlign",
45 "desc" : "The default {@link Roo.Element#alignTo) anchor position value for this menu\nrelative to its element of origin (defaults to \"tl-bl?\")",
46 "memberOf" : "Roo.menu.Menu",
51 "name" : "subMenuAlign",
53 "desc" : "The {@link Roo.Element#alignTo} anchor position value to use for submenus of\nthis menu (defaults to \"tl-tr?\")",
54 "memberOf" : "Roo.menu.Menu",
61 "desc" : "The minimum width of the menu in pixels (defaults to 120)",
62 "memberOf" : "Roo.menu.Menu",
67 "name" : "registerMenu",
69 "desc" : "True (default) - means that clicking on screen etc. hides it.",
70 "memberOf" : "Roo.menu.Menu",
75 "name" : "allowOtherMenus",
77 "desc" : "True to allow multiple menus to be displayed at the same time (defaults to false)",
78 "memberOf" : "Roo.menu.Menu",
85 "name" : "addMenuItem",
86 "desc" : "Creates a new {@link Roo.menu.Item} based an the supplied config object and adds it to the menu",
88 "isConstructor" : false,
90 "memberOf" : "Roo.menu.Menu",
99 "desc" : "A MenuItem config object",
106 "type" : "Roo.menu.Item",
107 "desc" : "The menu item that was added"
112 "name" : "addElement",
113 "desc" : "Adds an {@link Roo.Element} object to the menu",
115 "isConstructor" : false,
117 "memberOf" : "Roo.menu.Menu",
125 "type" : "String/HTMLElement/Roo.Element",
126 "desc" : "The element or DOM node to add, or its id",
133 "type" : "Roo.menu.Item",
134 "desc" : "The menu item that was added"
139 "name" : "isVisible",
140 "desc" : "Read-only. Returns true if the menu is currently displayed, else false.",
142 "isConstructor" : false,
144 "memberOf" : "Roo.menu.Menu",
156 "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>",
158 "isConstructor" : false,
160 "memberOf" : "Roo.menu.Menu",
169 "desc" : "One or more menu items, menu item configs or other objects that can be converted to menu items",
176 "type" : "Roo.menu.Item",
177 "desc" : "The menu item that was added, or the last one if multiple items were added"
182 "name" : "addSeparator",
183 "desc" : "Adds a separator bar to the menu",
185 "isConstructor" : false,
187 "memberOf" : "Roo.menu.Menu",
197 "type" : "Roo.menu.Item",
198 "desc" : "The menu item that was added"
203 "name" : "removeAll",
204 "desc" : "Removes and destroys all items in the menu",
206 "isConstructor" : false,
208 "memberOf" : "Roo.menu.Menu",
220 "desc" : "Removes an {@link Roo.menu.Item} from the menu and destroys the object",
222 "isConstructor" : false,
224 "memberOf" : "Roo.menu.Menu",
232 "type" : "Roo.menu.Item",
233 "desc" : "The menu item to remove",
242 "desc" : "Returns this menu's underlying {@link Roo.Element} object",
244 "isConstructor" : false,
246 "memberOf" : "Roo.menu.Menu",
256 "type" : "Roo.Element",
257 "desc" : "The element"
263 "desc" : "Inserts an existing object based on {@link Roo.menu.Item} to the menu at a specified index",
265 "isConstructor" : false,
267 "memberOf" : "Roo.menu.Menu",
276 "desc" : "The index in the menu's list of current items where the new item should be inserted",
281 "type" : "Roo.menu.Item",
282 "desc" : "The menu item to add",
289 "type" : "Roo.menu.Item",
290 "desc" : "The menu item that was added"
296 "desc" : "Hides this menu and optionally all parent menus",
298 "isConstructor" : false,
300 "memberOf" : "Roo.menu.Menu",
309 "desc" : "(optional) True to hide all parent menus recursively, if any (defaults to false)",
318 "desc" : "Displays this menu relative to another element",
320 "isConstructor" : false,
322 "memberOf" : "Roo.menu.Menu",
330 "type" : "String/HTMLElement/Roo.Element",
331 "desc" : "The element to align to",
337 "desc" : "(optional) The {@link Roo.Element#alignTo} anchor position to use in aligning to\nthe element (defaults to this.defaultAlign)",
341 "name" : "parentMenu",
342 "type" : "Roo.menu.Menu",
343 "desc" : "(optional) This menu's parent menu, if applicable (defaults to undefined)",
352 "desc" : "Creates a new {@link Roo.menu.TextItem} with the supplied text and adds it to the menu",
354 "isConstructor" : false,
356 "memberOf" : "Roo.menu.Menu",
365 "desc" : "The text to display in the menu item",
372 "type" : "Roo.menu.Item",
373 "desc" : "The menu item that was added"
379 "desc" : "Adds an existing object based on {@link Roo.menu.Item} to the menu",
381 "isConstructor" : false,
383 "memberOf" : "Roo.menu.Menu",
391 "type" : "Roo.menu.Item",
392 "desc" : "The menu item to add",
399 "type" : "Roo.menu.Item",
400 "desc" : "The menu item that was added"
406 "desc" : "Displays this menu at a specific xy position",
408 "isConstructor" : false,
410 "memberOf" : "Roo.menu.Menu",
417 "name" : "xyPosition",
419 "desc" : "Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based)",
423 "name" : "parentMenu",
424 "type" : "Roo.menu.Menu",
425 "desc" : "(optional) This menu's parent menu, if applicable (defaults to undefined)",
433 "name" : "purgeListeners",
434 "desc" : "Removes all listeners for this object",
436 "isConstructor" : false,
438 "memberOf" : "Roo.util.Observable",
450 "desc" : "Appends an event handler to this element (shorthand for addListener)",
452 "isConstructor" : false,
454 "memberOf" : "Roo.util.Observable",
461 "name" : "eventName",
463 "desc" : "The type of event to listen for",
469 "desc" : "The method the event invokes",
475 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
481 "desc" : "(optional)",
490 "desc" : "Removes a listener (shorthand for removeListener)",
492 "isConstructor" : false,
494 "memberOf" : "Roo.util.Observable",
501 "name" : "eventName",
503 "desc" : "The type of event to listen for",
509 "desc" : "The handler to remove",
515 "desc" : "(optional) The scope (this object) for the handler",
523 "name" : "addEvents",
524 "desc" : "Used to define events on this Observable",
526 "isConstructor" : false,
528 "memberOf" : "Roo.util.Observable",
537 "desc" : "The object with the events defined",
545 "name" : "releaseCapture",
546 "desc" : "Removes <b>all</b> added captures from the Observable.",
548 "isConstructor" : false,
550 "memberOf" : "Roo.util.Observable",
558 "type" : "Observable",
559 "desc" : "The Observable to release",
567 "name" : "removeListener",
568 "desc" : "Removes a listener",
570 "isConstructor" : false,
572 "memberOf" : "Roo.util.Observable",
579 "name" : "eventName",
581 "desc" : "The type of event to listen for",
587 "desc" : "The handler to remove",
593 "desc" : "(optional) The scope (this object) for the handler",
601 "name" : "fireEvent",
602 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
604 "isConstructor" : false,
606 "memberOf" : "Roo.util.Observable",
613 "name" : "eventName",
620 "type" : "Object...",
621 "desc" : "Variable number of parameters are passed to handlers",
629 "desc" : "returns false if any of the handlers return false otherwise it returns true"
634 "name" : "hasListener",
635 "desc" : "Checks to see if this object has any listeners for a specified event",
637 "isConstructor" : false,
639 "memberOf" : "Roo.util.Observable",
646 "name" : "eventName",
648 "desc" : "The name of the event to check for",
656 "desc" : "True if the event is being listened for, else false"
662 "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.",
664 "isConstructor" : false,
666 "memberOf" : "Roo.util.Observable",
674 "type" : "Observable",
675 "desc" : "The Observable to capture",
681 "desc" : "The function to call",
687 "desc" : "(optional) The scope (this object) for the fn",
695 "name" : "addListener",
696 "desc" : "Appends an event handler to this component",
698 "isConstructor" : false,
700 "memberOf" : "Roo.util.Observable",
707 "name" : "eventName",
709 "desc" : "The type of event to listen for",
715 "desc" : "The method the event invokes",
721 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
727 "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>",
737 "name" : "mouseover",
738 "desc" : "Fires when the mouse is hovering over this menu",
739 "memberOf" : "Roo.menu.Menu",
747 "type" : "Roo.menu.Menu",
753 "type" : "Roo.EventObject",
759 "type" : "Roo.menu.Item",
760 "desc" : "The menu item that was clicked",
769 "desc" : "Fires when the mouse exits this menu",
770 "memberOf" : "Roo.menu.Menu",
778 "type" : "Roo.menu.Menu",
784 "type" : "Roo.EventObject",
790 "type" : "Roo.menu.Item",
791 "desc" : "The menu item that was clicked",
799 "name" : "beforehide",
800 "desc" : "Fires before this menu is hidden",
801 "memberOf" : "Roo.menu.Menu",
809 "type" : "Roo.menu.Menu",
818 "name" : "itemclick",
819 "desc" : "Fires when a menu item contained in this menu is clicked",
820 "memberOf" : "Roo.menu.Menu",
828 "type" : "Roo.menu.BaseItem",
829 "desc" : "The BaseItem that was clicked",
834 "type" : "Roo.EventObject",
843 "name" : "beforeshow",
844 "desc" : "Fires before this menu is displayed",
845 "memberOf" : "Roo.menu.Menu",
853 "type" : "Roo.menu.Menu",
863 "desc" : "Fires after this menu is hidden",
864 "memberOf" : "Roo.menu.Menu",
872 "type" : "Roo.menu.Menu",
882 "desc" : "Fires when this menu is clicked (or when the enter key is pressed while it is active)",
883 "memberOf" : "Roo.menu.Menu",
891 "type" : "Roo.menu.Menu",
897 "type" : "Roo.menu.Item",
898 "desc" : "The menu item that was clicked",
903 "type" : "Roo.EventObject",
913 "desc" : "Fires after this menu is displayed",
914 "memberOf" : "Roo.menu.Menu",
922 "type" : "Roo.menu.Menu",