-
Notifications
You must be signed in to change notification settings - Fork 1
Hooks
Called when the addon gets enabled. This is either on startup of the program, or when the user approves the permissions and enables the addon from the settings.
-
Form mainForm
The Nimble Writer main form.
Called when the addon gets disabled. This is either when the program closes, or when the user disables it in the settings.
Called after all Nimble Writer settings have been loaded. This only gets called on program startup, not when a user enables the addon manually in the settings.
-
Settings settings
The settings object.
Called when the user clicks on the Addons button. This will open a menu, which you can add your own items to. You can add separators as needed (add an item with "-"
as value).
-
MenuItemsCollection menuItems
The list of menu items you should add items to.
Called when the user switches to a different chapter, or when the system has to switch to a different chapter automatically. (Such a thing happens in some cases during export, which is a temporary "bug" for now.)
-
int iChapter
The chapter index that has been switched to. -
StoryChapter chapter
The chapter object that has been switched to.
Called after loading a document.
-
String strFilename
The path for the document that was loaded. -
StoryDocument document
The document object that was loaded.
Called after saving a document.
-
String strFilename
The path for the document that was saved. -
StoryDocument document
The document object that was saved.
Called during document saving. This can be used to save arbitrary data into the nwd file (which is actually just a zip file with contents). See zip saving for more details.
-
String strFilename
The filename that the nwd file is being saved to. -
StoryDocument document
The document object that is being saved. -
ZipFile zip
TheZipFile
object that you can add new files to.
Called during document loading for zip entries that are not recognized by Nimble Writer itself. This can be used to load arbitrary data from the nwd file (which is actually just a zip file with contents). See zip saving for more details.
-
String strFilename
The filename that the nwd file is being loaded from. -
StoryDocument document
The document object that is being loaded in its current state. -
ZipEntry entry
TheZipEntry
object of the unrecognized file. -
ZipFile zip
TheZipFile
object that you can load files from.
Called on the loading of the "edit" view on user notes.
-
JsonNote note
The usernote object for which this view is intended. -
Panel panel
The panel in which the note's edit controls are.
Called on the loading of the "view" view on user notes.
-
JsonNote note
The usernote object for which this view is intended. -
Panel panel
The panel in which the note's view controls are.
Called when user switches to the "edit" view.
-
JsonNote note
The usernote object for which this view is intended. -
Panel panel
The panel in which the note's edit controls are.
Called when user switches to the "view" view.
-
JsonNote note
The usernote object for which this view is intended. -
Panel panel
The panel in which the note's view controls are.
Called on the fetching of the text of a usernote. In the callback, return the replacement text you'd like to show. If you return nil, it will remain the default value.
-
JsonNote note
The usernote object of the related note. -
string original
The original string that would show if the function returns nil.
Called on the fetching of the subtext of a usernote. In the callback, return the replacement text you'd like to show. If you return nil, it will remain the default value.
-
JsonNote note
The usernote object of the related note. -
string original
The original string that would show if the function returns nil.
Called when the program writes a string to console.
-
String str
The string to write to console.
Called when the program writes a line to console.
-
String strLine
The line to write to console.