A SERVICE OF

logo

130 Chapter 6: Creating a Visualization
Creating a New Visualization Type iTool Developer’s Guide
3. Creates a plotting symbol created from the IDLitSymbol class and aggregate
its properties with the other ExampleVis properties.
4. Creates an IDLitGrPlot object that uses the IDLitSymbol object for its plotting
symbols.
5. Registers an example property that holds a string value.
6. Passes any “extra” keyword properties through to the SetProperty method.
7. Returns the integer 1, indicating successful initialization.
Creating a Cleanup Method
The visualization class Cleanup method handles any cleanup required by the
visualization object, and should do the following:
destroy any objects created by the visualization that were not added to the
graphics hierarchy with a call to the Add method
call the superclass’ Cleanup method
Calling the superclass’ cleanup method will destroy any objects that were added to
the graphics hierarchy.
See “IDLitVisualization::Cleanup” (IDL Reference Guide) for additional details.
Example Cleanup Method
The following example code shows a very simple Cleanup method for the
ExampleVis visualization type:
PRO ExampleVis::Cleanup
; Clean up the IDLitSymbol object we created.
OBJ_DESTROY, self._oSymbol
; Call superclass Cleanup method
self->IDLitVisualization::Cleanup
END
Discussion
The Cleanup method first destroys the IDLitSymbol object, which is not part of the
graphics hierarchy, then calls the superclass Cleanup method to destroy the objects in
the graphics hierarchy.