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
Giorgio Garofalo edited this page Feb 10, 2021
·
16 revisions
Functions called by the program under certain circumstances are 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(). [currently unsupported] -
onKeyPress(event): called every time a key or a key combination is pressed.eventrefers to a JavaFXKeyEvent. -
onDropMenuOpen(type, menu): called when a drop-menu is opened.typeis a string which refers to the unique identifier of the menu.menuis the menu itself. -
onTabSwitch(tab): called when the user changes tab. -
onTabOpen(tab): called when a new tab is opened. -
onTabClose(tab): called when a tab is closed. Not called when Chorus is closed. -
onAreaTextChange(change, area): called every time a text in an editor area is changed. -
onAreaKeyPress(change, area): called whe a key or a key combination is pressed inside of a text area.eventrefers to a JavaFXKeyEvent. -
onHighlightingUpdate(area): called whenever an editor area updates its highlighting. -
onInfoBoxOpen(box): called whenever an information box is opened. -
onInfoBoxContentUpdate(box): called when an information box text changes (commonly after a connection).
Example code:
function onLoad() {
print('I have been initialized');
}
function onInit() {
print('Chorus has been initialized');
}
function onClose() {
print('Chorus has been closed');
}