MenuItem

open external class MenuItem(source)

Inheritors

Constructors

Link copied to clipboard
constructor(options: MenuItemConstructorOptions)

MenuItem

Properties

Link copied to clipboard

An Accelerator (optional) indicating the item's accelerator, if set.

Link copied to clipboard

A boolean indicating whether the item is checked, this property can be dynamically changed.

Link copied to clipboard
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

A number indicating an item's sequential unique id.

Link copied to clipboard

A boolean indicating whether the item is enabled, this property can be dynamically changed.

Link copied to clipboard
var icon: Any?

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

Link copied to clipboard
var id: String

A string indicating the item's unique id, this property can be dynamically changed.

Link copied to clipboard

A string indicating the item's visible label.

Link copied to clipboard
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

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

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

Link copied to clipboard

A string indicating the item's sublabel.

Link copied to clipboard

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

Link copied to clipboard

A string indicating the item's hover text.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

A boolean indicating whether the item is visible, this property can be dynamically changed.