Wizard
Type: Wizard
Extends WindowScript class for Wizard scripts.
A global 'wizard' object is provided to access these functions.
wizard.on("next", function() { print("Next Clicked"); });
Properties
Property | Description |
---|---|
| Since version 4.04.23, view IDs may be accessed directly instead of through findViewByID. Assignment to an unspecified ID shall set the script id of the view being assigned. |
isEditMode
| Determine if the wizard is running in edit mode. |
isRunMode
| Determine if the wizard is running in run mode. |
Methods
Method | Description |
---|---|
findViewByID(id)
| Searches child views for the first one with a script ID that matches 'id' (set via view properties). Returns a reference to the view, or 'null' if nothing found. |
findViewByTitle(title)
| Searches child views for the first one with a title that matches 'title'. Returns a reference to the view, or 'null' if nothing found. |
setRefreshTimer(callback)
| Sets a callback function to be called periodically, dependent upon the user interface update rate setting in general preferences. Typically around 25Hz. To cancel the timer, call this function with a 'null' argument. |
back()
| Go to the previous step. Returns true if the previous step was found. The wizard will emit the "step" event after the step is changed. The event is deferred via the application event loop. This function will only work if the previous step is defined in the predefined step list Scripts may implement the See |
cancel()
| Cancel the wizard. |
close([exit_code])
| Close the wizard dialog. If exit_code is provided, the wizard shall be closed with the given exit code. Otherwise the wizard shall be closed with the default exit code (OK, 5100). codes include:
The exit code may be specified as an integer or string.
|
finish()
| Finish the wizard. |
getStep()
| Get the current step. Returns the script ID of the current step. |
gotoStep(id)
| Go to the step given by the script ID passed in. Returns true if the step was found. The wizard will emit the "step" event after the step is changed. The event is deferred via the application event loop. |
next()
| Go to the next step. Returns true if the next step was found. The wizard will emit the "step" event after the step is changed. The event is deferred via the application event loop. This function will only work if the next step is defined in the predefined step list Scripts may implement the See |
on(eventName, callback)
| Adds an event listener for the given event name. e.g. wizard.on("next", function() { ... }); |
removeAllListeners([eventName])
| Removes all event listeners for the given event name. If the event name is not given then all listeners for all events are removed. |
removeListener(eventName, callback)
| Removes an event listener for the given event name. e.g. let callback = function() { ... }; wizard.on("next", callback); view.removeListener("next", callback); |
setEnableBack([enable])
| Enable or disable the back button. When called with no arguments, the back button shall be enabled if the current step has a 'back' item in the predefined step list. |
setEnableCancel([enable])
| Enable or disable the cancel button. When called with no arguments, the cancel button shall be enabled by default. |
setEnableCustomButton([enable])
| Enable or disable the custom button. When called with no arguments, the custom button shall be enabled by default. |
setEnableFinish([enable])
| Enable or disable the finish button. When called with no arguments, the finish button shall be enabled if the current step does not have a 'next' item in the predefined step list. |
setEnableHelp([enable])
| Enable or disable the help button. When called with no arguments, the help button shall be enabled if the current step (or the wizard) has help HTML or URL defined. |
setEnableNext([enable])
| Enable or disable the next button. When called with no arguments, the next button shall be enabled if the current step has a 'next' item in the predefined step list. |
showHelpHtml(html)
| Show the given HTML in the help panel. |
showHelpURL(url)
| Close the help panel (if open) and launch the URL in the system default web browser. |
vetoEvent([veto])
| Prevent the current event from being processed. When called with no arguments, the current event shall be prevented from being processed. When called with a boolean argument, the current event shall be prevented from being processed if the argument is true. |
Events
Event | Description |
---|---|
back
| Event raised when back button was clicked. wizard.on("back", function() { ... }); Calling See also See also |
cancel
| Event raised when cancel button was clicked. wizard.on("cancel", function() { ... }); Calling See also |
close(code)
| Event raised when the wizard is closing. code is a wxWidgets ID (e.g. wxID_CANCEL). wizard.on("close", function(code) { ... }); Calling |
custom
| Event raised when custom button was clicked. wizard.on("custom", function() { ... }); Calling See also |
finish
| Event raised when finish button was clicked. wizard.on("finish", function() { ... }); Calling See also |
help
| Event raised when help button was clicked. wizard.on("help", function() { ... }); Calling See also |
next
| Event raised when next button was clicked. wizard.on("next", function() { ... }); Calling See also See also |
step
| Event raised when the current step has changed. wizard.on("step", function() { ... }); The step event shall be emitted shortly after the wizard starts if any steps were defined. |