Class Menu<TMenuItemProps, TMenuProps, TMenuItem>

A set of actions that can be performed by a user.

Type Parameters

Hierarchy (view full)

Constructors

Properties

_handles: Handles<unknown, ResourceHandle>
_id: string

The unique ID for this entity. Once set, this should never change.

_itemType: string = ItemType.MENU

The item type for this entity when it participates in an App.

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

factory: MenuFactory

The factory that will be used whenever a new menu needs to be created. Applications can supply their own factory to customize menu creation.

Accessors

  • get id(): string
  • The unique ID for this entity.

    Returns string

  • get items(): Collection<TMenuItem>
  • The list of items in the menu.

    Returns Collection<TMenuItem>

  • get itemType(): string
  • The item type for this entity when it participates in an App.

    Returns string

  • get title(): string
  • A human-readable title for this menu.

    Returns string

  • set title(title): void
  • Parameters

    • title: string

    Returns void

Methods

  • Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

    Returns Promise<void>

  • Called after normal initialization. Note: Child items are initialized before this is called.

    Returns Promise<void>

  • A clean-up function that should get called whenever the item is disposed of.

    Returns Promise<void>

  • Initializes the item.

    Returns Promise<void>

  • Creates an item:// URI reference to this entity.

    Returns string