Base class for interactive tool commands.
This is the base class for interactive tool commands.
An interactive tool command is a command that can be invoked as a MEL command or from within a user defined context (see MPxContext).
Tool commands have the same functionality as MPxCommands, but include several additional methods for use in interactive contexts: setUpInteractive, cancel, finalize, and doFinalize.
#include <MPxToolCommand.h>

Public Member Functions |
|
| MPxToolCommand () | |
| Class constructor. |
|
| virtual | ~MPxToolCommand () |
| Class Destructor. |
|
| virtual MStatus | doIt (const MArgList &args)=0 |
| This method should perform a command by
setting up internal class data and then calling the redoIt
method. |
|
| virtual MStatus | cancel () |
| This method cancels the command. |
|
| virtual MStatus | finalize () |
| This method is used to create a string
representing the command and its arguments. |
|
Static Public Member Functions |
|
| static const char * | className () |
| Returns the name of this class. |
|
Protected Member Functions |
|
| MStatus | doFinalize (MArgList &command) |
| USE _doFinalize() IN SCRIPT. |
|
| MPxToolCommand | ( | ) |
Class constructor.
This constructor should only be called from within a user context that uses this tool.
The context is responsible for setting up the internal state variables for the derived tools and for creating a command string for journalling.
| ~MPxToolCommand | ( | ) | [virtual] |
Class Destructor.
The user can override this method to free up any allocated data within the derived MPxToolCommand class.
This method should perform a command by setting up internal class data and then calling the redoIt method.
The actual action performed by the command should be done in the redoIt method. This is a pure virtual method, and must be overridden in derived classes.
| [in] | args | List of arguments passed to the command. |
Reimplemented from MPxCommand.
| MStatus cancel | ( | ) | [virtual] |
This method cancels the command.
The user should override this method when the original program state needs to be restored.
| MStatus finalize | ( | ) | [virtual] |
This method is used to create a string representing the command and its arguments.
Users should override this method and contruct an MArgList and then pass it to doFinalize for journalling.
| const char * className | ( | ) | [static] |
USE _doFinalize() IN SCRIPT.
Call this method with an MArgList representing your command.
This method will register the command with the undo manager for journalling.
| [in] | command | An MArgList reference representing an equivalent MEL command |