
212 Chapter 8: Creating a Manipulator
Creating a New Manipulator iTool Developer’s Guide
• The TRANSIENT_DEFAULT keyword indicates that this manipulator is
transient, and that the default manipulator should be automatically started
when this manipulator finishes (on mouse up).
• If the manipulator is to support undo/redo functionality, you must specify
an operation associated with the manipulator as the
OPERATION_IDENTIFIER keyword value. If the manipulator modifies a
property of an object, set the OPERATION_IDENTIFIER equal to
'SET_PROPERTY', and the PROPERTY_IDENTIFIER keyword equal to
the parameter identifier of the property. This example manipulator
changes the opacity (
ALPHA_CHANNEL) of an image. See “Manipulators
and the Undo/Redo System” on page 202 for more information.
• The _EXTRA keyword inheritance mechanism passes through any
keywords provided when the
ExampleManip Init method is called.
2. Calls a method, DoRegisterCursor, that creates a cursor for this manipulator
using the IDLitManipulator::RegisterCursor method. See “Creating a
RegisterCursor Method” on page 219 for more information. If you prefer, you
can use one of the predefined cursors instead of a custom cursor by setting the
DEFAULT_CURSOR property. See the IDLitManipulator property
“DEFAULT_CURSOR” (IDL Reference Guide) for a list of predefined
cursors. When the mouse cursor is over a visualization of the appropriate type
(as defined by the TYPE property), the manipulator cursor is shown.
3. Returns the integer 1, indicating successful initialization.
The properties that support mouse and keyboard interaction are enabled by default.
See “IDLitManipulator Properties” (IDL Reference Guide) for details.
Creating a Cleanup Method
The manipulator class Cleanup method handles any cleanup required by the
manipulator object, and should do the following:
• Destroy any pointers or objects created by the manipulator
• Call the superclass’ Cleanup method
Calling the superclass’ cleanup method will destroy any objects created when the
superclass was initialized.
Note
If your manipulator class is based on the IDLitManipulator class, and does not
create any pointers or objects of its own, the Cleanup method is not strictly