Extends: Object
Implements: Options, Events, Jx.AutoPosition, Jx.Chrome, Jx.Addable
A main menu as opposed to a sub menu that lives inside the menu.
| Jx.Menu | Extends: Object |
| TODO | |
| Jx.Menu | revisit this to see if Jx.Menu and Jx.SubMenu can be merged into a single implementation. |
| Properties | |
| domObj | {HTMLElement} The HTML element containing the menu. |
| button | {Jx.Button} The button that represents this menu in a toolbar and opens the menu. |
| subDomObj | {HTMLElement} the HTML element that contains the menu items within the menu. |
| items | {Array} the items in this menu |
| Constructor | |
| Jx.Menu | Create a new instance of Jx.Menu. |
| Functions | |
| add | Add menu items to the sub menu. |
| remove | Remove a single menu item from the menu. |
| deactivate | Deactivate the menu by hiding it. |
| onMouseOver | Handle the user moving the mouse over the button for this menu by showing this menu and hiding the other menu. |
| eventInMenu | determine if an event happened inside this menu or a sub menu of this menu. |
| hide | Hide the menu. |
| show | Show the menu |
| setVisibleItem | Set the sub menu that is currently open |
{Jx.Button} The button that represents this menu in a toolbar and opens the menu.
Create a new instance of Jx.Menu.
| options | see Jx.Button.Options. If no options are provided then no button is created. |
Add menu items to the sub menu.
add : function()
Remove a single menu item from the menu.
remove: function( item )
Deactivate the menu by hiding it.
deactivate: function()
Handle the user moving the mouse over the button for this menu by showing this menu and hiding the other menu.
onMouseOver: function( e )
determine if an event happened inside this menu or a sub menu of this menu.
eventInMenu: function( e )
Hide the menu.
hide: function( e )
Show the menu
show : function( o )
Set the sub menu that is currently open
setVisibleItem: function( obj )