Chapter 7: Creating an Operation 165
iTool Developer’s Guide Creating a New Generalized Operation
Creating a New Generalized Operation
Generalized operations are iTool operations that are not limited to acting on data that
underlies a visualization. Generalized operations are based on the IDLitOperation
class. The class definition file for an IDLitOperation object must (at the least) provide
methods to initialize the operation class, get and set property values, execute the
operation, undo and redo the operation, and define the operation class structure.
Complex operations will likely provide additional methods.
How an IDLitOperation Works
When an IDLitOperation is requested by a user, the operation’s DoAction method
(which must be provided by the operation class’ developer) is called. The DoAction
method is responsible for doing the following:
1. Retrieving the currently selected items and determining which items the
operation should be applied to.
2. Creating an IDLitCommandSet object to contain undo/redo information.
3. Recording the initial values of the selected objects in the IDLitCommandSet
object, if necessary.
4. Performing the actions associated with the operation.
5. Recording the final values of the selected objects in the IDLitCommandSet
object, if necessary.
6. Returning the IDLitCommandSet object.
Creating an IDLitOperation
The process of creating an IDLitDataOperation is outlined in the following sections:
• “Creating the Class Structure Definition” on page 166
• “Creating an Init Method” on page 167
• “Creating a Cleanup Method” on page 171
• “Creating a DoAction Method” on page 172
• “Creating a RecordInitialValues Method” on page 174
• “Creating a RecordFinalValues Method” on page 175
• “Creating a GetProperty Method” on page 176
Comments to this Manuals