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 Name | Purpose |
---|
xmPushButton | a simple button |
xmLabel | a fixed piece of text |
xmArrowButton | with an arrow face |
xmTextField | one line text editor |
xmToggleButton | with an on/off box |
xmText | a full text editor |
xmDrawnButton | with user graphics |
xmList | a list selector |
xmFrame | a 3-D border |
xmScale | a slider on a scale |
xmSeparator | a simple line |
xmScrollBar | horizontal 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 Name | Purpose |
---|
xmBulletinBoard | simple x,y layout |
xmForm | layout widgets with relational constraints |
xmRowColumn | for regular geometry management |
xmPanedWindow | multiple 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 Name | Purpose |
---|
xmScrolledWindow | for displaying a clip view over another widget |
xmScrolledList | a partial view of a list |
xmScrolledText | a partial view of a text |
xmMainWindow | contains the main application windows, a menu bar, and so on |
xmCommand | a command entry area with a history list |
xmMessageBox | message display area on its own window |
xmSelectionBox | a list to select from |
xmFileSelectionBox | selection 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 Name | Purpose |
---|
xmMenuBar | a row-Column used to create an horizontal menu |
xmPulldownMenu | a row-Column used to create a vertical menu |
xmPopupMenu | a menu on its own (transient) window |
xmCascadeButton | a 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 Name | Purpose |
---|
xmBulletinBoardDialog | a dialog with arbitrary contents |
xmFormDialog | a dialog based on a form |
xmMessageDialog | a dialog showing a message |
xmInformationDialog | a dialog displaying information |
xmPromptDialog | a dialog with a prompt area |
xmQuestionDialog | a dialog asking a question |
xmWarningDialog | a dialog showing a warning |
xmWorkingDialog | a dialog showing a busy working message |
xmSelectionBoxDialog | a dialog based on xmSelectionBox |
xmFileSelectionDialog | a 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