Next | Prev | Up | Top | Contents | Index

Widget Creation Commands

The set of classes generally mirrors the Motif set. Some classes (Core, Shell and Primitive) are not accessible from Tm because they are intended for inheritance use only. The section "Basic Widgets" discusses the widgets listed in Table 4-1:

Basic Widgets
Widget NamePurpose
xmPushButtona simple button
xmLabela fixed piece of text
xmArrowButtonwith an arrow face
xmTextFieldone line text editor
xmToggleButtonwith an on/off box
xmTexta full text editor
xmDrawnButtonwith user graphics
xmLista list selector
xmFramea 3-D border
xmScalea slider on a scale
xmSeparatora simple line
xmScrollBarhorizontal or vertical

Manager widgets are used to lay out several widgets together. Placing widgets inside widgets enables the creation of hierarchies suitable for complex user interface design. The section "Manager Widgets" discusses the widgets listed in Table 4-2:

Manager Widgets
Widget NamePurpose
xmBulletinBoardsimple x,y layout
xmFormlayout widgets with relational constraints
xmRowColumnfor regular geometry management
xmPanedWindowmultiple panes separated by sashes

Motif provides composite widgets, several object appearing together as one widget. The section "More Widgets" discusses the widgets listed in Table 4-3.

Composite Widgets
Widget NamePurpose
xmScrolledWindowfor displaying a clip view over another widget
xmScrolledLista partial view of a list
xmScrolledTexta partial view of a text
xmMainWindowcontains the main application windows, a menu bar, and so on
xmCommanda command entry area with a history list
xmMessageBoxmessage display area on its own window
xmSelectionBoxa list to select from
xmFileSelectionBoxselection of a file from a list

The section "Menus" presents widgets for building menus. Menus may contain button or separators, and of course any menu widget listed in Table 4-4:

Menu Widgets
Widget NamePurpose
xmMenuBar a row-Column used to create an horizontal menu
xmPulldownMenua row-Column used to create a vertical menu
xmPopupMenua menu on its own (transient) window
xmCascadeButtona special pushbutton to call a sub-menu

Motif also has convenience functions for creating dialog boxes, which appear in their own transient window, with push buttons on the bottom line (Accept/Cancel/Help). The section "Dialogs" discusses the widgets listed in Table 4-5:

Dialog Widgets
Widget NamePurpose
xmBulletinBoardDialoga dialog with arbitrary contents
xmFormDialoga dialog based on a form
xmMessageDialoga dialog showing a message
xmInformationDialoga dialog displaying information
xmPromptDialoga dialog with a prompt area
xmQuestionDialoga dialog asking a question
xmWarningDialoga dialog showing a warning
xmWorkingDialoga dialog showing a busy working message
xmSelectionBoxDialoga dialog based on xmSelectionBox
xmFileSelectionDialoga dialog based on xmFileSelectionBox

When you have to destroy such widgets, you must destroy the real dialog widget; that is, the parent of the usually manipulated widget:

xmQuestionDialog .askMe managed
[.askMe parent] destroyWidget

Next | Prev | Up | Top | Contents | Index