iTool Object Hierarchy
The iTool system is a collection of object class instances organized in a hierarchy of container objects. The hierarchy serves both to organize the numerous object instances and to display information about the objects in the iTool user interface. In most cases, an object's location in the iTool hierarchy controls where and how the object is made visible in the user interface.
For example, the Rotate operation object is stored in the iImage iTool's object hierarchy with the object identifier
From this identifier we can deduce two things:
iTool System Object
The iTool system object contains and provides a single point of access to all objects managed by the iTool system. Only one instance of the iTool system object can exist in a given IDL session; it is created automatically when any iTool is created.
Note
As an iTool developer, there is no need for you to create or otherwise interact with the system object yourself. This discussion of the structure of the system object is included solely to help you understand the organization of iTool objects.
The iTool system object is a subclass of the IDLitContainer object, which provides functionality to manage a hierarchy of container objects via their object identifiers.
iTool System-Level Hierarchy
As the root of the iTools environment, the iTool system object has the unique object identifier of "/". All fully qualified object identifiers begin with this reference to the system object, providing a global location on which to base a location in the iTools hierarchy.
The hierarchy contained by the iTool system object includes the following containers:
/TOOLS
This container holds references to all active iTools.
/CLIPBOARD
This container holds items that are on the local system clipboard.
/REGISTRY
This container holds object descriptors for the iTool object classes that are registered with the system object. Individual iTools, Visualization types, and User Interface types can all be registered with the system object; other iTool object types are registered only with the individual iTool to which they belong. Objects that are registered with the system object are available for use in the IDL MAIN execution context — that is, these objects are available at the IDL command line.
/REGISTRY/TOOLS
This container holds the object descriptors for the individual iTools available in the system. All iTools must be registered with the system object.
/REGISTRY/VISUALIZATIONS
This container holds the object descriptors for the visualization types registered with the system object. Visualization types that are registered with the system object are available to all iTools, and thus allow users to create visualizations via the OVERPLOT keyword to an iTool launch routine even in cases where the appropriate visualization type is not registered with the current iTool. Registered visualizations types are displayed in a list in the iTool Insert Visualization dialog. See Creating a Visualization for more on visualization types.
/REGISTRY/WIDGET INTERFACE
This container holds a list of available user interface routines that are available to the system. In the initial release of the iTool system, only one user interface exists. By providing the capability to choose from a list of interfaces, however, different interfaces can easily be "plugged in" to the iTool framework in the future.
/DATA MANAGER
This container holds the data objects that have been imported into or created by the iTool system. Since the data manager container is system-scoped, all data in the system is available to all iTools.
iTool Objects
Individual iTool tool objects contain all objects that are directly associated with a particular instance of a particular iTool. Any number of tool objects can exist; their unique identifiers are found in the /TOOLS container of the iTools system object.
As an iTool developer, you will use both the tool's object reference and its object identifier inside your code.
If you are using command-line style procedures and functions to control an existing iTool from non-iTools code, you can retrieve the tool object identifier and object reference using the IGETCURRENT routine.
iTool-Level Hierarchy
Each individual iTool (held in the /TOOLS container of the system object) has a sub-hierarchy of tool-level containers. For example, every iTool has a container named OPERATIONS containing objects that affect data. An operation named MyOperation registered for an iTool named MyTool has two possible object identifiers:
and
The first identifier is fully qualified; the second is relative to the MyTool object.
The object identifier hierarchy of each individual iTool includes the following containers:
FILE READERS FILE WRITERS MANIPULATORS OPERATIONS TOOLBARS WINDOW WINDOW/VIEW WINDOW/VIEW/VISUALIZATION LAYER WINDOW/VIEW/VISUALIZATION LAYER/DATA SPACE WINDOW/VIEW/VISUALIZATION LAYER/DATA SPACE/VISUALIZATION WINDOW/VIEW/ANNOTATION LAYER WINDOW/VIEW/ANNOTATION LAYER/ANNOTATION
FILE READERS
A file reader is an iTool component object that contains the information necessary to open a file and read its data into the iTools data manager. The FILE READERS container holds the object descriptors of file readers registered with the individual iTool. Default properties of file readers can be set interactively via the System Preferences dialog. See Creating a File Reader for more on file readers.
For example, the relative identifier for the ASCII file reader is:
FILE WRITERS
A file writer is an iTool component object that contains the information necessary to create a file from data stored in the iTools data manager. The FILE WRITERS container holds the object descriptors of file writers registered with the individual iTool. Default properties of file writers can be set interactively via the System Preferences dialog. See Creating a File Writer for more on file writers.
For example, the relative identifier for the Windows Bitmap file writer is:
MANIPULATORS
A manipulator is an iTool component object that performs some action on a visualization selected in an iTool. The MANIPULATORS container holds the object descriptors of manipulators registered with the individual iTool. See Creating a Manipulator for more on manipulators.
For example, the relative identifier for the Rotate manipulator is:
OPERATIONS
An operation is a set of IDL procedure, function, and method calls that acts on either a data item or on the iTool itself. The OPERATIONS container holds the object descriptors of operations registered with the individual iTool. Registered operations appear in the Operations menu of the iTool. See Creating an Operation for more on operations.
The object identifier hierarchy rooted at OPERATIONS is displayed in the iTools Operations Browser in a tree view. The hierarchy may contain multiple levels; the levels are used to organize the individual operations in the iTools Operations menu and in the Operations Browser. For example, the relative identifier of the File Open operation is:
Note that operations that appear in the iTool Operations menu repeat the identifier OPERATIONS. The first instance specifies that the object is stored in the Operations container, the second specifies that it appears in the Operations menu. For example, the relative identifier for the Statistics operation is:
TOOLBAR
A toolbar is an iTool component object that contains information about buttons that should be displayed in the iTool's main interface. The TOOLBAR container holds the object descriptors of operations, manipulators, and annotations that are exposed via the iTool's toolbar. In most cases, these objects are proxies of objects held in other containers. For example, the File Open operation is held by the FILE subcontainer of the OPERATIONS container; it is also exposed (via a proxy) on the iTool toolbar as:
WINDOW
A window is an iTool component that holds (indirectly) the actual graphics object hierarchy displayed in the iTool window. It is a representation of an on-screen area on a display device that serves as a graphics destination. Each window contains one or more views. The relative identifier of a window is always:
The object hierarchy rooted at the WINDOW is displayed in the iTools Visualization Browser in a tree view. The objects in the hierarchy correspond to the levels shown in the Visualization Browser view.
VIEW
A view is an iTool component that represents a rectangular area in which graphics objects are drawn. Each view contains one or more visualization layers and one or more annotation layers. For example the relative identifier of the first view in a window container is:
VISUALIZATION LAYER
A visualization layer is an iTool component that contains visualizations. Each visualization layer contains zero or more data spaces. For example, the relative identifier of the visualization layer in the first view in window container is:
DATA SPACE
A data space is an iTool component that manages the data range, transformation matrix, and other data-centric properties of visualizations in a visualization layer. Each data space contains one or more visualizations. For example, the relative identifier of the second data space in the visualization layer in the first view in window container is:
WINDOW/VIEW_1/VISUALIZATION LAYER/DATA SPACE_1Note
Data space numbering is zero-based — that is, the first data space created is number zero. The object identifier for the first data space, however, does not include the number. Identifiers for additional data spaces do include the number.
A visualization is a group of component objects that are displayed to the iTool user in the main iTool window. Examples of visualizations are plots, surfaces, contours, etc. For example, the relative identifier of the first plot visualization in the first data space in the visualization layer in the first view in window container is:
WINDOW/VIEW_1/VISUALIZATION LAYER/DATA SPACE/PLOTNote
Visualization numbering is zero-based — that is, the first visualization of a specific type created within a data space is number zero. The object identifier for the first visualization, however, does not include the number. Identifiers for additional visualizations of the same type within the same data space do include the number.
Visualizations may be containers themselves, containing other visualizations. The Axis visualization is an example; it contains all of the individual axes inserted into a given data space.
ANNOTATION LAYER
An annotation layer is an iTool component that contains annotations. Each visualization layer contains zero or more annotations. For example, the relative identifier of the annotation layer in the first view in window container is:
An annotation is a graphical component that can be added to the main iTool window by the iTool user in an interactive operation. Examples of annotations are text, lines, polygons, etc. For example, the relative identifier of the first text annotation in the first annotation layer in the first view in window container is:
WINDOW/VIEW_1/ANNOTATION LAYER/TEXTNote
Annotation numbering is zero-based — that is, the first annotation of a specific type created within a data space is number zero. The object identifier for the first annotation, however, does not include the number. Identifiers for additional annotations of the same type within the same data space do include the number.