An object which represents a menu item.

Notes

Item objects are created automatically by a menu.

interface IItem {
    args: ReadonlyJSONObject;
    caption: string;
    className: string;
    command: string;
    dataset: CommandRegistry.Dataset;
    icon: undefined | VirtualElement.IRenderer;
    iconClass: string;
    iconLabel: string;
    isEnabled: boolean;
    isToggled: boolean;
    isVisible: boolean;
    keyBinding: null | IKeyBinding;
    label: string;
    mnemonic: number;
    submenu: null | Menu;
    type: ItemType;
}

Properties

The arguments for the command.

caption: string

The display caption for the menu item.

className: string

The extra class name for the menu item.

command: string

The command to execute when the item is triggered.

The dataset for the menu item.

icon: undefined | VirtualElement.IRenderer

The icon renderer for the menu item.

iconClass: string

The icon class for the menu item.

iconLabel: string

The icon label for the menu item.

isEnabled: boolean

Whether the menu item is enabled.

isToggled: boolean

Whether the menu item is toggled.

isVisible: boolean

Whether the menu item is visible.

keyBinding: null | IKeyBinding

The key binding for the menu item.

label: string

The display label for the menu item.

mnemonic: number

The mnemonic index for the menu item.

submenu: null | Menu

The submenu for a 'submenu' type item.

type: ItemType

The type of the menu item.