Skip to content

@k8slens/extensions

Globals / "src/extensions/registries/menu-registry" / MenuRegistration

Interface: MenuRegistration#

Hierarchy#

  • MenuItemConstructorOptions

MenuRegistration

Index#

Properties#

Properties#

accelerator#

Optional accelerator: Accelerator

Inherited from MenuRegistration.accelerator

Overrides MenuRegistration.accelerator

Defined in node_modules/electron/electron.d.ts:12208


acceleratorWorksWhenHidden#

Optional acceleratorWorksWhenHidden: boolean

Inherited from MenuRegistration.acceleratorWorksWhenHidden

Overrides MenuRegistration.acceleratorWorksWhenHidden

Defined in node_modules/electron/electron.d.ts:12220

default is true, and when false will prevent the accelerator from triggering the item if the item is not visible`.

platform darwin


after#

Optional after: string[]

Inherited from MenuRegistration.after

Overrides MenuRegistration.after

Defined in node_modules/electron/electron.d.ts:12258

Inserts this item after the item with the specified label. If the referenced item doesn't exist the item will be inserted at the end of the menu.


afterGroupContaining#

Optional afterGroupContaining: string[]

Inherited from MenuRegistration.afterGroupContaining

Overrides MenuRegistration.afterGroupContaining

Defined in node_modules/electron/electron.d.ts:12270

Provides a means for a single context menu to declare the placement of their containing group after the containing group of the item with the specified label.


before#

Optional before: string[]

Inherited from MenuRegistration.before

Overrides MenuRegistration.before

Defined in node_modules/electron/electron.d.ts:12253

Inserts this item before the item with the specified label. If the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies that the menu item in question should be placed in the same “group” as the item.


beforeGroupContaining#

Optional beforeGroupContaining: string[]

Inherited from MenuRegistration.beforeGroupContaining

Overrides MenuRegistration.beforeGroupContaining

Defined in node_modules/electron/electron.d.ts:12264

Provides a means for a single context menu to declare the placement of their containing group before the containing group of the item with the specified label.


checked#

Optional checked: boolean

Inherited from MenuRegistration.checked

Overrides MenuRegistration.checked

Defined in node_modules/electron/electron.d.ts:12228

Should only be specified for checkbox or radio type menu items.


click#

Optional click: (menuItem: MenuItem, browserWindow: BrowserWindow | undefined, event: KeyboardEvent) => void

Inherited from MenuRegistration.click

Overrides MenuRegistration.click

Defined in node_modules/electron/electron.d.ts:12183

Will be called with click(menuItem, browserWindow, event) when the menu item is clicked.


enabled#

Optional enabled: boolean

Inherited from MenuRegistration.enabled

Overrides MenuRegistration.enabled

Defined in node_modules/electron/electron.d.ts:12213

If false, the menu item will be greyed out and unclickable.


icon#

Optional icon: NativeImage | string

Inherited from MenuRegistration.icon

Overrides MenuRegistration.icon

Defined in node_modules/electron/electron.d.ts:12209


id#

Optional id: string

Inherited from MenuRegistration.id

Overrides MenuRegistration.id

Defined in node_modules/electron/electron.d.ts:12246

Unique within a single menu. If defined then it can be used as a reference to this item by the position attribute.


label#

Optional label: string

Inherited from MenuRegistration.label

Overrides MenuRegistration.label

Defined in node_modules/electron/electron.d.ts:12200


parentId#

parentId: string

Defined in src/extensions/registries/menu-registry.ts:7


registerAccelerator#

Optional registerAccelerator: boolean

Inherited from MenuRegistration.registerAccelerator

Overrides MenuRegistration.registerAccelerator

Defined in node_modules/electron/electron.d.ts:12235

If false, the accelerator won't be registered with the system, but it will still be displayed. Defaults to true.

platform linux,win32


role#

Optional role: \"undo\" | \"redo\" | \"cut\" | \"copy\" | \"paste\" | \"pasteAndMatchStyle\" | \"delete\" | \"selectAll\" | \"reload\" | \"forceReload\" | \"toggleDevTools\" | \"resetZoom\" | \"zoomIn\" | \"zoomOut\" | \"togglefullscreen\" | \"window\" | \"minimize\" | \"close\" | \"help\" | \"about\" | \"services\" | \"hide\" | \"hideOthers\" | \"unhide\" | \"quit\" | \"startSpeaking\" | \"stopSpeaking\" | \"zoom\" | \"front\" | \"appMenu\" | \"fileMenu\" | \"editMenu\" | \"viewMenu\" | \"recentDocuments\" | \"toggleTabBar\" | \"selectNextTab\" | \"selectPreviousTab\" | \"mergeAllWindows\" | \"clearRecentDocuments\" | \"moveTabToNewWindow\" | \"windowMenu\"

Inherited from MenuRegistration.role

Overrides MenuRegistration.role

Defined in node_modules/electron/electron.d.ts:12195

Can be undo, redo, cut, copy, paste, pasteAndMatchStyle, delete, selectAll, reload, forceReload, toggleDevTools, resetZoom, zoomIn, zoomOut, togglefullscreen, window, minimize, close, help, about, services, hide, hideOthers, unhide, quit, startSpeaking, stopSpeaking, zoom, front, appMenu, fileMenu, editMenu, viewMenu, recentDocuments, toggleTabBar, selectNextTab, selectPreviousTab, mergeAllWindows, clearRecentDocuments, moveTabToNewWindow or windowMenu - Define the action of the menu item, when specified the click property will be ignored. See roles.


sublabel#

Optional sublabel: string

Inherited from MenuRegistration.sublabel

Overrides MenuRegistration.sublabel

Defined in node_modules/electron/electron.d.ts:12201


Optional submenu: MenuItemConstructorOptions[] | Menu

Inherited from MenuRegistration.submenu

Overrides MenuRegistration.submenu

Defined in node_modules/electron/electron.d.ts:12241

Should be specified for submenu type menu items. If submenu is specified, the type: 'submenu' can be omitted. If the value is not a Menu then it will be automatically converted to one using Menu.buildFromTemplate.


toolTip#

Optional toolTip: string

Inherited from MenuRegistration.toolTip

Overrides MenuRegistration.toolTip

Defined in node_modules/electron/electron.d.ts:12207

Hover text for this menu item.

platform darwin


type#

Optional type: \"normal\" | \"separator\" | \"submenu\" | \"checkbox\" | \"radio\"

Inherited from MenuRegistration.type

Overrides MenuRegistration.type

Defined in node_modules/electron/electron.d.ts:12199

Can be normal, separator, submenu, checkbox or radio.


visible#

Optional visible: boolean

Inherited from MenuRegistration.visible

Overrides MenuRegistration.visible

Defined in node_modules/electron/electron.d.ts:12224

If false, the menu item will be entirely hidden.


Last update: November 10, 2020