Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IUserMenu

An interface describing the user menu.

Hierarchy

  • IUserMenu

Index

Properties

Readonly isDisposed

isDisposed: boolean

Test whether the widget has been disposed.

Readonly items

items: readonly IItem[]

A read-only array of the menu items in the menu.

Methods

addItem

  • addItem(options: IItemOptions): IItem
  • Add a menu item to the end of the menu.

    Parameters

    • options: IItemOptions

      The options for creating the menu item.

    Returns IItem

    The menu item added to the menu.

dispose

  • dispose(): void
  • Dispose of the resources held by the menu.

    Returns void

insertItem

  • insertItem(index: number, options: IItemOptions): IItem
  • Insert a menu item into the menu at the specified index.

    Parameters

    • index: number

      The index at which to insert the item.

    • options: IItemOptions

      The options for creating the menu item.

    Returns IItem

    The menu item added to the menu.

    Notes

    The index will be clamped to the bounds of the items.

removeItem

  • removeItem(item: IItem): void
  • Remove an item from the menu.

    Parameters

    • item: IItem

      The item to remove from the menu.

      Notes

      This is a no-op if the item is not in the menu.

    Returns void

Generated using TypeDoc