The Manipulator Creation Process
To create a new iTool manipulator, you will do the following:
- Choose an iTool manipulator class on which your new manipulator will be based. In almost all cases, you will base your new manipulator on the IDLitManipulator class, which provides methods for detecting selections made by the user, mouse button-press events, mouse motion, and other low-level manipulator functions.
- Define the properties of the manipulator.
- If the manipulator is to support undo/redo functionality, it must have an associated operation. You can create a custom operation, or if the manipulator modifies a property of the target object, you can use the built-in SET_PROPERTY operation.
- Define methods that specify what should happen when the manipulator is activated. This includes implementing execution logic within methods that are invoked in response to mouse and keyboard events.
- Define what cursor appears when the manipulator is activated. You can use a custom cursor or a pre-existing cursor.
- Create an icon for the manipulator that will appear on the toolbar. The manipulator will be activated when the user selects the toolbar item.
- Override methods used to get or set properties, react to user interaction with the visualization, and clean up, as necessary.
This chapter describes the process of creating a new manipulator based on the IDLitManipulator class. If you have a number of manipulators that are designed to work together, you will want to create a manipulator container based on the IDLitManipulatorContainer class. More advanced manipulators can also be designed to work in conjunction with a custom selection visual, based on the IDLitManipulatorVisual class. See Manipulator Visuals for introductory information regarding selection visuals.