MenuItem

open external class MenuItem(source)

Inheritors

Constructors

Link copied to clipboard
constructor(options: MenuItemConstructorOptions)

MenuItem

Properties

Link copied to clipboard
external var accelerator: Accelerator?

An Accelerator | null indicating the item's accelerator, if set.

Link copied to clipboard
external var checked: Boolean

A boolean indicating whether the item is checked.

Link copied to clipboard
external var click: Function<*>

A Function that is fired when the MenuItem receives a click event. It can be called with menuItem.click(event, focusedWindow, focusedWebContents).

Link copied to clipboard
external var commandId: Double

A number indicating an item's sequential unique id.

Link copied to clipboard
external var enabled: Boolean

A boolean indicating whether the item is enabled.

Link copied to clipboard
external var icon: Any?

A NativeImage | string (optional) indicating the item's icon, if set.

Link copied to clipboard
external var id: String

A string indicating the item's unique id.

Link copied to clipboard
external var label: String

A string indicating the item's visible label.

Link copied to clipboard
external var menu: Menu

A Menu that the item is a part of.

Link copied to clipboard

A boolean indicating if the accelerator should be registered with the system or just displayed.

Link copied to clipboard
external var role: MenuItemRole?

A string (optional) indicating the item's role, if set. Can be undo, redo, cut, copy, paste, pasteAndMatchStyle, delete, selectAll, reload, forceReload, toggleDevTools, resetZoom, zoomIn, zoomOut, toggleSpellChecker, togglefullscreen, window, minimize, close, help, about, services, hide, hideOthers, unhide, quit, startSpeaking, stopSpeaking, zoom, front, appMenu, fileMenu, editMenu, viewMenu, shareMenu, recentDocuments, toggleTabBar, selectNextTab, selectPreviousTab, showAllTabs, mergeAllWindows, clearRecentDocuments, moveTabToNewWindow or windowMenu

Link copied to clipboard
external var sharingItem: SharingItem

A SharingItem indicating the item to share when the role is shareMenu.

Link copied to clipboard
external var sublabel: String

A string indicating the item's sublabel.

Link copied to clipboard
external var submenu: Menu?

A Menu (optional) containing the menu item's submenu, if present.

Link copied to clipboard
external var toolTip: String

A string indicating the item's hover text.

Link copied to clipboard
external var type: MenuItemType

A string indicating the type of the item. Can be normal, separator, submenu, checkbox, radio, header or palette.

Link copied to clipboard

An Accelerator | null indicating the item's user-assigned accelerator for the menu item.

Link copied to clipboard
external var visible: Boolean

A boolean indicating whether the item is visible.