user manual

Chapter 14: Creating a User Interface Panel 313
iTool Developer’s Guide Creating a UI Panel Interface
Creating a UI Panel Interface
It is beyond the scope of this manual to provide general information on the creation
of user interfaces. For information on creating a user interface using the IDL widget
toolkit, see “Creating Graphical User Interfaces in IDL” (Building IDL Applications).
Keep the following points in mind when creating IDL widget interface code for iTool
user interface panels.
Panel Creation Routines
A user interface panel creation routine is similar to the widget creation routine that
creates a standalone widget application, but with the following important differences:
Signature
The routine signature of a user interface panel looks like this:
PRO
PanelName
, wPanel, oUI
where PanelName is the name of the routine, wPanel is an input argument that
contains the widget ID of the panel widget associated with this panel, and oUI is an
input argument that contains an object reference to the IDLitUI object associated with
the iTool that includes the user interface panel.
Event Loop and Widget Management
Standalone widget applications must arrange for the management of their widgets
and the creation of an event loop; these details are usually handled by the
XMANAGER or WIDGET_EVENT routines. A user interface panel does not need
to call XMANAGER or WIDGET_EVENT; widget management is handled by the
main iTool interface code. A user interface panel simply attaches itself to the bulk of
the iTool interface.
About the Panel Widget
In the initial release of the iTools, user interface panels are contained in an IDL tab
widget displayed on the right side of the iTool window. We will refer to this tab
widget as the panel widget in this documentation, since all user interface elements in
a UI panel are contained in this widget.
The panel widget itself is created automatically when a user interface panel is
registered with an iTool, and its widget ID is passed to the panel creation routine
along with a reference to the iTool user interface object.