user manual
Chapter 5: Creating an iTool 95
iTool Developer’s Guide Creating a New iTool Class
Note
Always use keyword inheritance (the _EXTRA keyword) to pass keyword
parameters through to the superclass. See “Keyword Inheritance” (Chapter 5,
Application Programming) for details on IDL’s keyword inheritance mechanism.
Standard Base Class
While you can create your new iTool from any existing iTool class, in many cases,
iTool classes you create will be subclassed directly from the base class
IDLitToolbase:
IF (self->IDLitToolbase::Init(_EXTRA = _extra) EQ 0) THEN $
RETURN, 0
The IDLitToolbase class provides the base iTool functionality used in the tools
created by ITT Visual Information Solutions. See “Subclassing from the
IDLitToolbase Class” on page 91 for details.
Note
To create an iTool that does not include the standard iTool functionality, subclass
from the IDLitTool class.
Return Value
If all of the routines and methods used in the Init method execute successfully, the
method should indicate successful initialization by returning 1. Other iTools that
subclass from your iTool class may check this return value, as your routine should
check the value returned by any superclass Init methods called.
Registering Visualizations
Registering a visualization type with an iTool class allows instances of the iTool to
create and display visualizations of that type. Any number of visualization types can
be registered for use by a given iTool.
Note
You must register at least one visualization type with your iTool class. Unlike
operations, manipulators, and file readers and writers, no visualization types are
registered by the IDLitToolbase class.
Visualization types are registered by calling the IDLitTool::RegisterVisualization
method: