Unregistering a Visualization Type
If you are creating a new iTool from an existing iTool class, you may want to remove a visualization type registered with 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 visualization type you don't want included in your iTool. Rather than recreating the iTool class to remove the visualization type, you could create your new iTool class in such a way that it inherits from the existing iTool class, but unregisters the unwanted visualization.
Unregister a visualization type by calling the IDLitTool::UnregisterVisualization method in the Init method of your iTool class:
where identifier is the string name used when registering the visualization.
For example, suppose you are creating a new iTool that subclasses from the standard iSurface tool, which is defined by the IDLitToolSurface class. If you wanted your new tool to behave just like the iSurface tool, with the exception that it would not handle 2D plot visualizations, you could include the following method call in your iTool's Init method:
Finding the Identifier String
To find the string used as the identifier parameter to the UnregisterVisualization method, you can inspect the class file that registers the visualization (if the visualization is registered by a user-created class), or use the FindIdentifiers method of the IDLitTool object to generate a list of registered visualizations. (Standard iTool visualization types are pre-registered within the iTool framework.)
If the visualization is registered in a user-created class, you could inspect the class definition file to find a call to the RegisterVisualization method, which looks something like this:
The first argument to the RegisterVisualization method ('Plot') is the string name of the visualization type.
Alternatively, to generate a list of relative identifiers for all visualizations registered with the current tool, use the following statements:
void = IGETCURRENT(TOOL=oTool) vislist = oTool->FindIdentifiers('*/visualizations/*') FOR i = 0, N_ELEMENTS(vislist)-1 DO PRINT, $ STRMID(vislist[i], STRPOS(vislist[i], '/', /REVERSE_SEARCH)+1)
See "IDLitTool::FindIdentifiers" (IDL Reference Guide) for details.