This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onContextMenu(event) { | |
event.preventDefault(); | |
this.menu.popup({ window: remote.getCurrentWindow() }); | |
} | |
... | |
<textarea id="TextField" onKeyDown={this.onInput} onContextMenu={this.onContextMenu} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const menu = new remote.Menu(); | |
menu.append(new remote.MenuItem({ role: 'cut' })); | |
menu.append(new remote.MenuItem({ role: 'copy' })); | |
menu.append(new remote.MenuItem({ role: 'paste' })); | |
menu.append(new remote.MenuItem({ role: 'delete' })); | |
menu.append(new remote.MenuItem({ type: 'separator' })); | |
menu.append(new remote.MenuItem({ role: 'selectall' })); | |
this.menu = menu; | |
... | |
this.onContextMenu = this.onContextMenu.bind(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { app, BrowserWindow, Menu, dialog } from 'electron'; | |
... | |
mainWindow = null; | |
}); | |
const showMessage = message => dialog.showMessageBox({ | |
type: 'info', | |
message: `You activated action: "${message}"`, | |
buttons: ['Close'], | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { app, BrowserWindow, Menu, dialog } from 'electron'; | |
... | |
mainWindow = null; | |
}); | |
const showMessage = message => dialog.showMessageBox({ | |
type: 'info', | |
message: `You activated action: "${message}"`, | |
buttons: ['Close'], | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# initialization file (not found) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Copyright (C) 2016 Marco Laspe <[email protected]> | |
# | |
# Based on | |
# https://github.com/python-xlib/python-xlib/blob/master/examples/record_demo.py | |
# -- demonstrate record extension | |
# | |
# Copyright (C) 2006 Alex Badea <[email protected]> | |
# |
NewerOlder