Create a menu.
More...
#include "remoto!stdlib:js/paneManager/paneMenu.js"
|
| paneMenu (path, subscribe) |
|
| addItem (p, l, t) |
|
| addSubMenu (l, m, icon, submenuHandler) |
|
| applyDiff (d) |
|
| createModalMenu (button, position, dismissCallback) |
|
| destroy () |
| destroy this menu, and if it is a subscription, unsubsubscribe. More...
|
|
| hasItemWithLabel (l) |
| Check to see if an item already exists with a given label. More...
|
|
| hasItemWithPath (p) |
| Check to see if an item already exists with a given path. More...
|
|
| modalMenuEvents (dismissCallback, defaultCallback) |
|
| removeAllItems () |
| Remove all items from this menu. More...
|
|
| removeItem (p) |
|
| submenuTest () |
| Test if submenu items exist. More...
|
|
Create a menu.
This will be called from the menuManager and will need a unique name.
- See also
- menuManager.createMenu()
◆ paneMenu()
- Parameters
-
path | If the menu is connected to the VFS, it will need a path. This idea has been deprecated, but could appear again as an undead zombie. |
subscribe | Subscribe to the VFS path |
◆ addItem()
◆ addSubMenu()
addSubMenu |
( |
|
l, |
|
|
|
m, |
|
|
|
icon, |
|
|
|
submenuHandler |
|
) |
| |
- Parameters
-
l | |
m | |
icon | |
submenuHandler | DOCME |
◆ applyDiff()
◆ createModalMenu()
createModalMenu |
( |
|
button, |
|
|
|
position, |
|
|
|
dismissCallback |
|
) |
| |
- Parameters
-
button | |
position | |
dismissCallback | An optional callback that will always be called when the menu closes |
- Returns
DOCME
◆ destroy()
destroy this menu, and if it is a subscription, unsubsubscribe.
◆ hasItemWithLabel()
Check to see if an item already exists with a given label.
- Parameters
-
- Returns
- boolean true if path was found in an item
◆ hasItemWithPath()
Check to see if an item already exists with a given path.
- Parameters
-
- Returns
- boolean true if path was found in an item
◆ modalMenuEvents()
modalMenuEvents |
( |
|
dismissCallback, |
|
|
|
defaultCallback |
|
) |
| |
- Parameters
-
dismissCallback | An optional callback for when the menu is dismissed by the mouse leaving the menu and gutter |
defaultCallback | An optional callback for if an item doesn't have a callback |
- Returns
DOCME
◆ removeAllItems()
Remove all items from this menu.
DOCME
◆ removeItem()
◆ submenuTest()
Test if submenu items exist.
- Returns
- true or false
This will return true if any sub-items exist, or false if none. Even if all sub-items are disabled, it's helpful for the user to see them.
The documentation for this class was generated from the following file: