This repository was archived by the owner on Jul 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Events
iAmGio edited this page Jul 11, 2019
·
16 revisions
There are some functions called by the program which can be called events.
They are: (list will expand)
-
onLoad(): called once the add-on is loaded -
onInit(): called once Chorus is fully initialized -
onClose(): called once Chorus is closed -
onDisable(): called once the add-on is manually disabled. NOT called byonClose(). -
onKeyPress(event): called every time a key or a key combination is pressed.eventrefers a JavaFXKeyEvent. -
onDropMenuOpen(type, menu): called when a drop-menu is opened.typeis a string which refers to a unique identifier of the menu.menuis the menu itself. -
onTabOpen(tab): called when a new file is opened in the editor. -
onAreaTextChange(change, area): called every time a text in an editor area is changed. -
onHighlightingUpdate(area): called whenever an editor area updates its highlighting.
Example code:
load(chorus_js_api);
function onLoad() {
print('I have been initialized');
}
function onInit() {
print('Chorus has been initialized');
}
function onClose() {
print('Chorus has been closed');
}