iTool Widget Interface Concepts

It is beyond the scope of this chapter to discuss the creation of IDL widget interfaces in general; see Creating Widget Applications (User Interface Programming) for a complete discussion. This section describes some things you will need to know about working with the iTool compound widgets that encapsulate the iTool components you can insert into your custom interface.

What Are iTool Compound Widgets?

iTool compound widgets are designed to allow complex iTool components to be included in an IDL widget interface in a way that is familiar to traditional IDL widget programmers. The following iTool compound widgets are available:

CW_ITMENU

Encapsulates a top-level iTool menu. Top-level iTool menus are defined by adding operations to the iTool hierarchy. See iTool Object Hierarchy for information on the organization of the iTool hierarchy.

CW_ITPANEL

Encapsulates an iTool user interface panel. User interface panels allow you to easily add additional IDL widget interface elements to an iTool. In some cases, you may be able to accomplish what you need by adding a user interface panel rather than creating an entire custom user interface. See Creating a User Interface Panel for information on creating panels.

CW_ITTOOLBAR

Encapsulates the iTool toolbar. Toolbars provide access to commonly used operations and manipulators via toolbar buttons. Toolbars are defined by adding operations to the iTool hierarchy. See iTool Object Hierarchy for information on the organization of the iTool hierarchy.

CW_ITSTATUSBAR

Encapsulates the iTool status bar. The status bar typically provides user feedback for iTool components, but can be use to display any sort of message. See Status Messages for information on using the status bar.

CW_ITWINDOW

Encapsulates the iTool drawable area. All of the functionality of the standard iTool window — mouse interactions, display of properties of the selected visualization, context menus — is included in the iTool drawable area.

Special Notes on the iTool Compound Widgets

The iTool compound widgets are designed to look and behave like traditional compound widgets in most ways, but there are several things you should be aware of when using them.

iTool compound widgets:

In addition, the CW_ITPANEL, CW_ITSTATUSBAR, and CW_ITWINDOW compound widgets must be resized using their associated _RESIZE procedures, rather than by explicitly setting the XSIZE and YSIZE keywords.

Example iTool Widget Interfaces

Two examples of functioning iTool widget interface code are included in the IDL distribution:

Example Custom iTool Widget Interface

A functioning custom iTool widget interface definition, an associated iTool class definition, and an associated launch routine are included in the examples/doc/itools subdirectory of the IDL distribution. The example interface is described in detail in Example: a Custom iTool Interface.

Standard iTool Widget Interface

The widget interface code used as the standard iTool interface is included in the IDL distribution in the file idlitwdtool.pro, in the lib/itools/ui_widgets subdirectory. The standard interface is used by all of the iTools included with IDL. Inspecting this file will give you insights into how the developers of the standard iTools intended the iTool compound widgets to be used, as well as other details.