For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-editor/interfaces/IMenu.md.

Interface: IMenu

Beta

Properties

checked?

optional checked?: 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

readonly id: string

Beta

Remarks

Unique ID for the menu


readonly submenu: IMenu[]

Beta

Remarks

Sub menus of this menu

Methods

addItem()

addItem(params, action?): IMenu

Beta

Parameters

params

IMenuCreationParams

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.