MenuItemBase

open external class MenuItemBase : Resource(source)

The base class of every menu and menu item type.

It is not constructible on its own: create a {@linkcode Menu}, {@linkcode Submenu}, {@linkcode MenuItem}, {@linkcode CheckMenuItem}, {@linkcode IconMenuItem} or {@linkcode PredefinedMenuItem} instead. It provides the id shared by all of them and, through {@linkcode Resource}, the rid and close() used to release the Rust-side object.

Inheritors

Constructors

Link copied to clipboard
constructor(rid: Double, id: String, kind: ItemKind)

Properties

Link copied to clipboard
external val id: String

The id of this item.

Link copied to clipboard
external val kind: String
Link copied to clipboard
external val rid: Double

Functions

Link copied to clipboard
external fun close(): Promise<Void>

Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.