Extras.ItemModel
Extras.MenuModel
| Constructor Summary | |
|---|---|
| Public | Extras.MenuModel()Creates a new menu model |
| Instance Field Summary | |
|---|---|
| Public | textThe menu title text. |
| Public | iconThe menu icon. |
| Public | itemsThe child menu items, an array of ItemModels.
|
| Instance Method Summary | |
|---|---|
| Public | addItem()Adds an item to the MenuModel. |
| Public | findItem()Finds an item by id in the MenuModel, searching descendant MenuModels as necessary.
|
| Public | getItemModelFromPositions()Returns the ItemModel at a specific path within this menu model.
|
| Public | indexOfItem()Determines the index of the specified menu item. |
| Public | toString() |
modelId
(String)
- the id of the menu modeltext
(String)
- the title text of the menu model which will appear in its
parent menu when this menu is used as a submenuicon
(#ImageReference)
- the icon of the menu model which will appear in its
parent menu when this menu is used as a submenuitems
(Array)
- the child menu items, an array of ItemModels
(optional)item
(Extras.ItemModel)
- the item (must be a MenuModel, OptionModel, or SeparatorModel.MenuModel, searching descendant MenuModels as necessary.
id
- the id of the menu item to findItemModel at a specific path within this menu model.
itemPositions
(Array)
- array of integers describing path, e.g., [0,1,2] would
indicate the third item in the second item in the first item in this menu model.item
(Extras.ItemModel)
- the item to find