MenuItem

external class MenuItem : MenuItemBase(source)

A menu item inside a {@linkcode Menu} or {@linkcode Submenu} and contains only text.

Constructors

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

Types

Link copied to clipboard
external object Companion

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.

Link copied to clipboard
external fun isEnabled(): Promise<Boolean>

Returns whether this menu item is enabled or not.

Link copied to clipboard
external fun setAccelerator(accelerator: String?): Promise<Void>

Sets the accelerator for this menu item.

Link copied to clipboard
external fun setEnabled(enabled: Boolean): Promise<Void>

Sets whether this menu item is enabled or not.

Link copied to clipboard
external fun setText(text: String): Promise<Void>

Sets the text for this menu item.

Link copied to clipboard
external fun text(): Promise<String>

Returns the text of this menu item.