
346 Chapter 15: Creating a Custom iTool Widget Interface
Adding a Toolbar iTool Developer’s Guide
Adding a Toolbar
iTool toolbars are created using the CW_ITTOOLBAR compound widget. The
signature of the CW_ITTOOLBAR function is:
Result = CW_ITTOOLBAR(Parent, UI, Target [, KEYWORDS])
where:
• Parent is the widget ID of the base widget on which the toolbar will be
displayed.
• UI is the user interface object associated with the interface.
• Target is the iTool identifier, relative to the iTool associated with UI, of the
container whose operations or manipulators should be included in the toolbar.
• KEYWORDS are keywords either handled explicitly by the widget, or passed
through to the widgets that make up the compound widget.
Standard Toolbars
Operations registered in the iTool containers that create the standard toolbars are
automatically sensitized and desensitized to reflect whether the corresponding
operation or manipulator is currently available. Some items are sensitized when the
selected item is of the correct data or visualization type, others (such as
Undo and
Redo) are sensitized when some other criteria are met. Still others (such as the File
Open operation) are always available.
The following statements create the toolbars used by the standard iTools:
wToolbar = WIDGET_BASE(wBase, /ROW, XPAD=0, YPAD=0, SPACE=7)
wTool1 = CW_ITTOOLBAR(wToolbar, oUI, 'Toolbar/File')
wTool2 = CW_ITTOOLBAR(wToolbar, oUI, 'Toolbar/Edit')
wTool3 = CW_ITTOOLBAR(wToolbar, oUI, 'Manipulators', /EXCLUSIVE)
wTool4 = CW_ITTOOLBAR(wToolbar, oUI, 'Manipulators/View',$
/EXCLUSIVE)
wTool5 = CW_ITTOOLBAR(wToolbar, oUI, 'Toolbar/View')
wTool6 = CW_ITTOOLBAR(wToolbar, oUI, 'Manipulators/Annotation', $
/EXCLUSIVE)
There are a couple of points to note:
• Some of the standard operations displayed as toolbar buttons are proxies to
operations that are registered in other containers. For example, the
Toolbar/File container contains proxies to four of the operations registered