Interface: IMenu
Beta
Properties
checked?
optionalchecked?:boolean
Beta
Remarks
If defined, the menu will show a checked or unchecked checkbox.
enabled
实验性enabled:
boolean
Beta
Remarks
The menu will be in either an enabled or disabled state
id
readonlyid:string
Beta
Remarks
Unique ID for the menu
submenu
readonlysubmenu:IMenu[]
Beta
Remarks
Sub menus of this menu
Methods
addItem()
addItem(
params,action?):IMenu
Beta
Parameters
params
The menu creation parameters for the sub item being added
action?
RegisteredAction<NoArgsAction>
The action to associate with the menu item. Only a subset of actions are supported
Returns
IMenu
Remarks
Create a child menu on this menu.
dispose()
dispose():
void
Beta
Returns
void
Remarks
Destroy the menu and all of its children.
hide()
hide():
void
Beta
Returns
void
Remarks
Hide the menu and all of its children.
replaceAction()
replaceAction(
action):void
Beta
Parameters
action
RegisteredAction<NoArgsAction>
The registered action to associated with this menu item
Returns
void
Remarks
Replaces the current associated menu action with a new action
show()
show():
void
Beta
Returns
void
Remarks
Show the menu and all of its children.
