
206 Chapter 8: Creating a Manipulator
Creating a New Manipulator iTool Developer’s Guide
Creating a New Manipulator
The manipulator class definition file will have the following components:
• A Class Structure Definition — this creates an instance of the manipulator
class and instantiates required instance data. See “Creating the Manipulator
Class Structure Definition” on page 207.
• An Init method — this method initializes a manipulator object. See “Creating a
Manipulator Init Method” on page 208.
• A Cleanup method — this method destroys pointers or objects created by the
manipulator. See “Creating a Cleanup Method” on page 212.
• OnMouseDown, OnMouseUp, OnMouseMotion methods — these methods
perform actions when the user activates the manipulator and interacts with the
visualization using the mouse. See “Creating Mouse Event Methods” on
page 213.
• An OnWheel method — this method links events generated by the mouse’s
scroll wheel to manipulator actions. See “Creating an OnWheel Method” on
page 216.
• An OnKeyboard method — this method links keyboard events to manipulator
actions. See “Creating an OnKeyboard Method” on page 218.
• A DoRegisterCursor method — this method lets you create and register a
custom manipulator cursor that appears when the manipulator is activated. See
“Creating a RegisterCursor Method” on page 219.
• GetProperty or SetProperty methods — these methods let you retrieve or
configure properties of the manipulator or its superclasses. See “Creating
GetProperty or SetProperty Methods” on page 221.
• Within appropriate components, invoke the manipulator’s RecordUndoValues
and CommitUndoValues methods — these methods call associated operation
methods to support undo/redo system transactions. See “Manipulators and the
Undo/Redo System” on page 202.
Note
As the RecordUndoValues and CommitUndoValues methods help automate
the transaction process, you would typically not need to override the default
superclass methods.
• Other methods specific to the manipulator.