ImFusion Web SDK

Menu

Represents a hierarchical menu of actions used to describe menu bars, context menus, or popup menus.

A menu is formed by a list of items, where each item is either a clickable action (MenuItem#isAction), a divider separating groups (MenuItem#isSeparator) of related actions, or a recursive submenu of the same form (MenuItem#isSubmenu).

Extends

Methods

MethodDescription
isEmpty()Returns whether this menu contains any items or not.
title()Returns the text that should be displayed to represent the (sub) menu.
description()Returns the text that explains (sub) menu, to be shown as tooltip/and or in the status bar.
items()Returns the list of MenuItems comprising this menu.

Inherited from ClassHandle

MethodDescription
isAliasOf()Returns true if this handle and other alias the same underlying C++ object.
delete()Releases this JavaScript handle.
deleteLater()Schedules this handle for deferred deletion and returns this handle.
isDeleted()Returns true if this handle has already been deleted.
[dispose]()Releases this handle when the enclosing scope exits, so a handle can be declared with using instead of calling delete() later manually.
clone()Returns a new JavaScript handle aliasing the same underlying C++ object.

isEmpty()

ts
isEmpty(): boolean;

Returns whether this menu contains any items or not.

Returns

boolean


title()

ts
title(): string;

Returns the text that should be displayed to represent the (sub) menu.

Returns

string


description()

ts
description(): string;

Returns the text that explains (sub) menu, to be shown as tooltip/and or in the status bar.

Returns

string


items()

ts
items(): MenuItemList;

Returns the list of MenuItems comprising this menu.

Returns

MenuItemList

On this page