Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Interface. Menu Item

icon?

readonly optional icon: string

Defined in: packages/sprotty/src/base/actions/action.ts:25

Inherited from

MenuItem.icon


id

readonly id: string

Defined in: packages/sprotty/src/features/context-menu/context-menu-service.ts:20

Technical id of the menu item.


isEnabled()?

readonly optional isEnabled: () => boolean

Defined in: packages/sprotty/src/features/context-menu/context-menu-service.ts:32

Function determining whether the element is enabled.

Returns

boolean


isToggled()?

readonly optional isToggled: () => boolean

Defined in: packages/sprotty/src/features/context-menu/context-menu-service.ts:36

Function determining whether the element is toggled on or off.

Returns

boolean


isVisible()?

readonly optional isVisible: () => boolean

Defined in: packages/sprotty/src/features/context-menu/context-menu-service.ts:34

Function determining whether the element is visible.

Returns

boolean


label

readonly label: string

Defined in: packages/sprotty/src/base/actions/action.ts:25

Inherited from

MenuItem.label


parentId?

readonly optional parentId: string

Defined in: packages/sprotty/src/features/context-menu/context-menu-service.ts:30

The optional parent id can be used to add this element as a child of another element provided by anohter menu provider. The parentId must be fully qualified in the form of a.b.c, whereas a, b and c are referring to the IDs of other elements. Note that this attribute will only be considered for root items of a provider and not for children of provided items.


sortString?

readonly optional sortString: string

Defined in: packages/sprotty/src/features/context-menu/context-menu-service.ts:22

String indicating the order.