This class is the abstract base class for modes.
Constructor.
Argument | Type | Default | Description |
owner | AFXGuiObjectManager | Owner (a module or a toolset) of the mode. |
Performs the necessary tasks when the mode is activated.
Reimplemented in AFXForm, and AFXProcedure.
Requests a cancellation of the mode. When the cancel operation completes, successfully or not, the target will be sent the given message. The message data pointer will be non-zero for successful cancellation and zero if the cancel operation was abandoned for some purpose.
Argument | Type | Default | Description |
tgt | FXObject | None | Completion message target. |
msg | Int | 0 | Completion message ID. |
Performs the necessary tasks when a dialog box of the mode commits.
Implemented in AFXForm, and AFXProcedure.
Virtual method that must be defined in the derived class--used to get the next dialog box or step in the mode.
Implemented in AFXForm, and AFXProcedure.
Performs the necessary tasks when the mode is deactivated.
Reimplemented in AFXProcedureForm, and AFXProcedure.
Destroys the associated dialogs when the mode is deactivated. The exact behavior of this function is controlled by the return value of dialog box's getDeactivateAction() method.
This class provides an empty implementation of this method; the derived class should redefine this method to perform its specific verifications on the user input.
This class provides an empty implementation of this method, which is called after the commands are processed successfully. The derived class should redefine this method to perform its specific tasks such as writing a confirmation message to the main window.
Returns a string containing a list of commands generated by each command associated with the mode.
Returns the dialog box currently posted by the mode (may be NULL).
Returns the ID of the button that the user pressed in the currently posted dialog box.
Posts a dialog box with an error message for the given exception. The derived class should redefine this method if it needs to handle the exception differently.
Argument | Type | Default | Description |
exc | nex_Exception | Exception. |
Posts a dialog box with an error message for the given exception thrown by a keyword during data validation.
Argument | Type | Default | Description |
exc | nex_Exception | Exception. |
Returns True if the object is one of the mode's keywords.
Argument | Type | Default | Description |
object | FXObject |
Generates commands based on the current state, sends the commands, and deactivates the mode if necessary. If the commands did not complete successfully, a dialog box will be posted with an error message.
Argument | Type | Default | Description |
writeToReplay | Bool | True | True if commands should be written to the replay file; False if not. |
writeToJournal | Bool | False | True if commands should be written to the journal file; False if not. |
Method indicating if the dialog box should be cancelled if the context changes (for example, if the user opens a new database); the base class implementation returns True indicating it is OK to cancel the mode, derived classes can overwrite this method and return False to prevent the mode from being canceled during a context change.
Hook method called whenever the command's object changes in Kernel. By default this function does nothing.
Argument | Type | Default | Description |
command | AFXGuiCommand | Command for which the query fired. |
Registers the defaults object that will be queried when the Defaults button in the dialog box is pressed.
Argument | Type | Default | Description |
command | AFXGuiCommand | Command whose keywords to be populated with the defaults object values. | |
objectName | String | Name of defaults object to be queried. |
Registers queries with the GUI infrastructure for the mode's active commands and unregisters queries for the inactive ones.
Sends the given command string (which can contain multiple commands, separated by command delimiters).
Argument | Type | Default | Description |
command | String | Command string. | |
writeToReplay | Bool | True | True if commands should be written to the replay file; False if not. |
writeToJournal | Bool | False | True if commands should be written to the journal file; False if not. |
Unregisters queries with the GUI infrastructure for all the mode's commands.
Verifies each active command associated with the mode and throws an exception if any command contains keywords with invalid data.
Checks whether keywords of active commands for the current dialog box contain valid data and, if not, posts a dialog box with an error message.
Reimplemented in AFXProcedure.