-
(static) createFromHash(parentOrElementOrDocument, defHash) → {Kekule.Widget.MenuItem}
-
A class method to create menu item from a definition hash.
If input parameter is string rather than hash, it will be regarded as
menu text. If the text is '-', a separator will be created.
Parameters:
Name |
Type |
Description |
parentOrElementOrDocument |
Variant
|
|
defHash |
Hash
|
|
- Source:
Returns:
-
Type
-
Kekule.Widget.MenuItem
-
-
Add sub menu to this item.
Parameters:
- Source:
-
-
Create a new sub menu under this item.
- Source:
Returns:
-
Type
-
Kekule.Widget.Menu
-
-
Returns sub menu of this menu item.
Parameters:
Name |
Type |
Description |
canCreate |
Bool
|
If no sub menu exists, create a new one. |
- Source:
Returns:
-
Type
-
Kekule.Widget.Menu
-
isLeafItem() → {Bool}
-
Returns whether this menu item has no sub menu.
- Source:
Returns:
-
Type
-
Bool
-
-
Remove sub menu from item.
Parameters:
- Source: