Unregistering a Manipulator

If you are creating a new iTool from an existing iTool class, you may want to remove a manipulator registered for the existing class from your new tool. This can be useful if you have an iTool class that implements all of the functionality you need, but which registers a manipulator you don't want included in your iTool. Rather than recreating the iTool class without the manipulator, you could create your new iTool class in such a way that it inherits from the existing iTool class, but unregisters the unwanted manipulator.

Unregister a manipulator by calling the IDLitTool::UnregisterManipulator method in the Init method of your iTool class:

self -> UnregisterManipulator, identifier 

where identifier is the string name used when registering the manipulator.

For example, suppose you are creating a new iTool that subclasses from a standard iTool that is based on the IDLitToolbase class. If you wanted your new tool to behave just like the a standard tool, with the exception that it would not allow text annotations, you could include the following method call in your iTool's Init method:

self -> UnregisterManipulator, 'Text' 

To remove all annotation manipulators, include the following:

self -> UnregisterManipulator, 'Annotation' 

Finding the Identifier String

To find the string value used as the Identifier argument to the UnregisterManipulator method, you can use the IDLitTool::FindIdentifiers method. This can be used to return the identifier of each manipulator registered with an active tool when you specify the MANPULATORS keyword as follows:

; Get the tool reference and all registered manipulator ids. 
idtool=IGETCURRENT(Tool = oTool) 
vManip = oTool->FindIdentifiers(/MANIPULATORS) 
PRINT, vManip 

An array of values is printed to the Output Log window in the format of:

/TOOLS/ToolName/MANIPULATORS/ManipulatorName 

Specify the ManipulatorName as the argument to UnregisterManipulator method to remove that manipulator from the tool.