|
iTool Programming: Overview of iTools |
|
The iTools component framework is written almost entirely in the IDL language. The IDL code that implements both the component framework and all of the standard iTools included with IDL is available for you to inspect, copy, and learn from.
To inspect the iTools code, look in the lib/itools subdirectory of your IDL installation directory. The iTools code base is organized as follows:
lib/itools directory you will find code that implements the iTool launch routines. These routines can be called directly at the IDL command line to launch a specific iTool.
lib/itools/framework directory you will find the core iTool object class definitions and utility routines. The classes in this directory define how the iTools operate; they are made available for your inspection, but they should not be altered.
lib/itools/components directory you will find derived iTool object classes. The classes in this directory implement the non-core features of the iTool toolset as included with IDL. You are encouraged to use these classes to implement your own iTool functionality, either by subclassing from a derived iTool object class or by modifying a copy of the class definition for a derived class.
lib/itools/ui_widgets directory you will find the IDL code that creates an iTool user interface using IDL widgets. You may find it useful to inspect some of these routines if you are creating a side panel or a dialog used to collect parameter settings for an operation. See iTool User Interface Architecture for additional information on creating additional user interfaces for an iTool.
If you inspect the lib/itools directory and its subdirectories, you will notice that there are many more classes included in the iTools component framework than are documented in the IDL Reference Guide and in this manual. Our approach to documenting the iTools code that is included with IDL is as follows:
lib/itools/framework subdirectory of the IDL installation directory.
lib/itools/framework subdirectory of the IDL installation directory.
lib/itools/components subdirectory of the IDL installation directory.
lib/itools/ui_widgets subdirectory of the IDL installation directory.While you are encouraged to inspect the iTools code, and to copy or subclass from derived classes and user interface routines, be aware that classes and routines that are not formally documented are not guaranteed to remain the same from one release of IDL to the next. Keep the following points in mind when implementing your own iTools:
If you create new iTool classes based only on the formally documented iTool interfaces, your tools should operate properly with future releases of IDL. If you base your tools on undocumented derived classes, minor modifications may be necessary to ensure future compatibility.
IDL Online Help (March 06, 2007)