Skip to main content

Interface: IMenuItemOptions

dg.IMenuItemOptions

Properties

check

Optional check: boolean

For items preceded by checkboxes, indicates if the item is checked.

Defined in

src/widgets.ts:850


description

Optional description: string

Tooltip to be shown on the menu item

Defined in

src/widgets.ts:853


isEnabled

Optional isEnabled: () => null | string

Type declaration

▸ (): null | string

A function that gets called each time an item is shown. Should return null if the item is enabled, otherwise the reason why it's disabled. The reason for being disabled is shown in a tooltip.

Returns

null | string

Defined in

src/widgets.ts:847


order

Optional order: number

Position in the menu

Defined in

src/widgets.ts:836


radioGroup

Optional radioGroup: string

Identifies a group of items where only one can be checked at a time.

Defined in

src/widgets.ts:833


shortcut

Optional shortcut: string

Shortcut to be shown on the item. NOTE: it does not handle the keypress, just shows the shortcut

Defined in

src/widgets.ts:839


visible

Optional visible: boolean

Whether the menu is visible; if false, the menu is not added. Might be handy in for-loops and fluent API.

Defined in

src/widgets.ts:842