Menu

Example

import { Menu, KeyBind, PubSub } from 'dripcap';
import { MenuItem } from 'electron';

let quitMenu = (menu) => {
  menu.append(new MenuItem({
    label: 'Quit',
    accelerator: KeyBind.get('!menu', 'core:quit'),
    click: () => PubSub.emit('core:quit')
  }));
  return menu;
};

Menu.registerMain('File', quitMenu, -999);

Class Methods

  • name String
  • handler Function
  • priority Integer
  • name String
  • handler Function
  • name String
  • handler Function
  • priority Integer
  • name String
  • handler Function
  • name String
  • priority Integer

Forces to update the main menu.

  • name String
  • self Object
  • browserWindow Object
  • option Object
    • x X-coordinate
    • y Y-coordinate

results matching ""

    No results matching ""