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",
28 "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>",
29 "memberOf" : "Roo.util.Observable",
34 "type" : "Boolean/String",
35 "desc" : "True or \"sides\" for the default effect, \"frame\" for 4-way shadow, and \"drop\"\nfor bottom-right shadow (defaults to \"sides\")",
36 "memberOf" : "Roo.menu.Menu",
40 "name" : "defaultAlign",
42 "desc" : "The default {@link Roo.Element#alignTo) anchor position value for this menu\nrelative to its element of origin (defaults to \"tl-bl?\")",
43 "memberOf" : "Roo.menu.Menu",
47 "name" : "subMenuAlign",
49 "desc" : "The {@link Roo.Element#alignTo} anchor position value to use for submenus of\nthis menu (defaults to \"tl-tr?\")",
50 "memberOf" : "Roo.menu.Menu",
56 "desc" : "The minimum width of the menu in pixels (defaults to 120)",
57 "memberOf" : "Roo.menu.Menu",
61 "name" : "registerMenu",
63 "desc" : "True (default) - means that clicking on screen etc. hides it.",
64 "memberOf" : "Roo.menu.Menu",
68 "name" : "allowOtherMenus",
70 "desc" : "True to allow multiple menus to be displayed at the same time (defaults to false)",
71 "memberOf" : "Roo.menu.Menu",
77 "name" : "addMenuItem",
78 "desc" : "Creates a new {@link Roo.menu.Item} based an the supplied config object and adds it to the menu",
80 "isConstructor" : false,
82 "memberOf" : "Roo.menu.Menu",
91 "desc" : "A MenuItem config object",
98 "type" : "Roo.menu.Item",
99 "desc" : "The menu item that was added"
104 "name" : "addElement",
105 "desc" : "Adds an {@link Roo.Element} object to the menu",
107 "isConstructor" : false,
109 "memberOf" : "Roo.menu.Menu",
117 "type" : "String/HTMLElement/Roo.Element",
118 "desc" : "The element or DOM node to add, or its id",
125 "type" : "Roo.menu.Item",
126 "desc" : "The menu item that was added"
131 "name" : "isVisible",
132 "desc" : "Read-only. Returns true if the menu is currently displayed, else false.",
134 "isConstructor" : false,
136 "memberOf" : "Roo.menu.Menu",
146 "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>",
148 "isConstructor" : false,
150 "memberOf" : "Roo.menu.Menu",
159 "desc" : "One or more menu items, menu item configs or other objects that can be converted to menu items",
166 "type" : "Roo.menu.Item",
167 "desc" : "The menu item that was added, or the last one if multiple items were added"
172 "name" : "addSeparator",
173 "desc" : "Adds a separator bar to the menu",
175 "isConstructor" : false,
177 "memberOf" : "Roo.menu.Menu",
186 "type" : "Roo.menu.Item",
187 "desc" : "The menu item that was added"
192 "name" : "removeAll",
193 "desc" : "Removes and destroys all items in the menu",
195 "isConstructor" : false,
197 "memberOf" : "Roo.menu.Menu",
207 "desc" : "Removes an {@link Roo.menu.Item} from the menu and destroys the object",
209 "isConstructor" : false,
211 "memberOf" : "Roo.menu.Menu",
219 "type" : "Roo.menu.Item",
220 "desc" : "The menu item to remove",
228 "desc" : "Returns this menu's underlying {@link Roo.Element} object",
230 "isConstructor" : false,
232 "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)",
302 "desc" : "Displays this menu relative to another element",
304 "isConstructor" : false,
306 "memberOf" : "Roo.menu.Menu",
314 "type" : "String/HTMLElement/Roo.Element",
315 "desc" : "The element to align to",
321 "desc" : "(optional) The {@link Roo.Element#alignTo} anchor position to use in aligning to\nthe element (defaults to this.defaultAlign)",
325 "name" : "parentMenu",
326 "type" : "Roo.menu.Menu",
327 "desc" : "(optional) This menu's parent menu, if applicable (defaults to undefined)",
335 "desc" : "Creates a new {@link Roo.menu.TextItem} with the supplied text and adds it to the menu",
337 "isConstructor" : false,
339 "memberOf" : "Roo.menu.Menu",
348 "desc" : "The text to display in the menu item",
355 "type" : "Roo.menu.Item",
356 "desc" : "The menu item that was added"
362 "desc" : "Adds an existing object based on {@link Roo.menu.Item} to the menu",
364 "isConstructor" : false,
366 "memberOf" : "Roo.menu.Menu",
374 "type" : "Roo.menu.Item",
375 "desc" : "The menu item to add",
382 "type" : "Roo.menu.Item",
383 "desc" : "The menu item that was added"
389 "desc" : "Displays this menu at a specific xy position",
391 "isConstructor" : false,
393 "memberOf" : "Roo.menu.Menu",
400 "name" : "xyPosition",
402 "desc" : "Contains X & Y [x, y] values for the position at which to show the menu (coordinates are page-based)",
406 "name" : "parentMenu",
407 "type" : "Roo.menu.Menu",
408 "desc" : "(optional) This menu's parent menu, if applicable (defaults to undefined)",
415 "name" : "purgeListeners",
416 "desc" : "Removes all listeners for this object",
418 "isConstructor" : false,
420 "memberOf" : "Roo.util.Observable",
430 "desc" : "Appends an event handler to this element (shorthand for addListener)",
432 "isConstructor" : false,
434 "memberOf" : "Roo.util.Observable",
441 "name" : "eventName",
443 "desc" : "The type of event to listen for",
449 "desc" : "The method the event invokes",
455 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
461 "desc" : "(optional)",
469 "desc" : "Removes a listener (shorthand for removeListener)",
471 "isConstructor" : false,
473 "memberOf" : "Roo.util.Observable",
480 "name" : "eventName",
482 "desc" : "The type of event to listen for",
488 "desc" : "The handler to remove",
494 "desc" : "(optional) The scope (this object) for the handler",
501 "name" : "addEvents",
502 "desc" : "Used to define events on this Observable",
504 "isConstructor" : false,
506 "memberOf" : "Roo.util.Observable",
515 "desc" : "The object with the events defined",
522 "name" : "releaseCapture",
523 "desc" : "Removes <b>all</b> added captures from the Observable.",
525 "isConstructor" : false,
527 "memberOf" : "Roo.util.Observable",
535 "type" : "Observable",
536 "desc" : "The Observable to release",
543 "name" : "removeListener",
544 "desc" : "Removes a listener",
546 "isConstructor" : false,
548 "memberOf" : "Roo.util.Observable",
555 "name" : "eventName",
557 "desc" : "The type of event to listen for",
563 "desc" : "The handler to remove",
569 "desc" : "(optional) The scope (this object) for the handler",
576 "name" : "fireEvent",
577 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
579 "isConstructor" : false,
581 "memberOf" : "Roo.util.Observable",
588 "name" : "eventName",
595 "type" : "Object...",
596 "desc" : "Variable number of parameters are passed to handlers",
604 "desc" : "returns false if any of the handlers return false otherwise it returns true"
609 "name" : "hasListener",
610 "desc" : "Checks to see if this object has any listeners for a specified event",
612 "isConstructor" : false,
614 "memberOf" : "Roo.util.Observable",
621 "name" : "eventName",
623 "desc" : "The name of the event to check for",
631 "desc" : "True if the event is being listened for, else false"
637 "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.",
639 "isConstructor" : false,
641 "memberOf" : "Roo.util.Observable",
649 "type" : "Observable",
650 "desc" : "The Observable to capture",
656 "desc" : "The function to call",
662 "desc" : "(optional) The scope (this object) for the fn",
669 "name" : "addListener",
670 "desc" : "Appends an event handler to this component",
672 "isConstructor" : false,
674 "memberOf" : "Roo.util.Observable",
681 "name" : "eventName",
683 "desc" : "The type of event to listen for",
689 "desc" : "The method the event invokes",
695 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
701 "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>",
710 "name" : "mouseover",
711 "desc" : "Fires when the mouse is hovering over this menu",
712 "memberOf" : "Roo.menu.Menu",
720 "type" : "Roo.menu.Menu",
726 "type" : "Roo.EventObject",
732 "type" : "Roo.menu.Item",
733 "desc" : "The menu item that was clicked",
741 "desc" : "Fires when the mouse exits this menu",
742 "memberOf" : "Roo.menu.Menu",
750 "type" : "Roo.menu.Menu",
756 "type" : "Roo.EventObject",
762 "type" : "Roo.menu.Item",
763 "desc" : "The menu item that was clicked",
770 "name" : "beforehide",
771 "desc" : "Fires before this menu is hidden",
772 "memberOf" : "Roo.menu.Menu",
780 "type" : "Roo.menu.Menu",
788 "name" : "itemclick",
789 "desc" : "Fires when a menu item contained in this menu is clicked",
790 "memberOf" : "Roo.menu.Menu",
798 "type" : "Roo.menu.BaseItem",
799 "desc" : "The BaseItem that was clicked",
804 "type" : "Roo.EventObject",
812 "name" : "beforeshow",
813 "desc" : "Fires before this menu is displayed",
814 "memberOf" : "Roo.menu.Menu",
822 "type" : "Roo.menu.Menu",
831 "desc" : "Fires after this menu is hidden",
832 "memberOf" : "Roo.menu.Menu",
840 "type" : "Roo.menu.Menu",
849 "desc" : "Fires when this menu is clicked (or when the enter key is pressed while it is active)",
850 "memberOf" : "Roo.menu.Menu",
858 "type" : "Roo.menu.Menu",
864 "type" : "Roo.menu.Item",
865 "desc" : "The menu item that was clicked",
870 "type" : "Roo.EventObject",
879 "desc" : "Fires after this menu is displayed",
880 "memberOf" : "Roo.menu.Menu",
888 "type" : "Roo.menu.Menu",