![]() |
For your reference, here are some simple charts that list the Motif widget classes with their superclasses and their public header file. The header files are those used by X11R6 and Motif 1.2, which are a little different from earlier releases.
The classes are grouped by type (intrinsic, shell, primitive, gadget, manager). The new Motif 2.0 and 2.1 widgets are listed in separate sections.
More information on the X Window System and OSF/Motif is available on my home page.
These widget classes are provided by the X Toolkit intrinsics, not Motif. There are listed here for completeness.
| Widget Class | Superclass | Header File |
| RectObj | N/A | X11/RectObj.h |
| Core | RectObj | X11/Core.h |
| Composite | Core | X11/Composite.h |
| Constraint | Composite | X11/Constraint.h |
| Shell | Composite | X11/Shell.h |
| OverrideShell | Shell | X11/Shell.h |
| WMShell | Shell | X11/Shell.h |
| VendorShell | WMShell | X11/Shell.h |
| Transient | VendorShell | X11/Vendor.h |
| TopLevelShell | VendorShell | X11/Shell.h |
| ApplicationShell | TopLevelShell | X11/Shell.h |
Note that the Motif VendorShell replaces the X Toolkit VendorShell.
| Widget Class | Superclass | Header File |
| VendorShell | WMShell | Xm/VendorS.h |
| XmDialogShell | TransientShell | Xm/DialogS.h |
| XmMenuShell | OverrideShell | Xm/MenuS.h |
Note that the XmSash widget class is used only by XmPanedWindow; there is no public API to XmSash.
| Widget Class | Superclass | Header File |
| XmPrimitive | Core | Xm/Primitive.h |
| XmArrowButton | XmPrimitive | Xm/ArrowB.h |
| XmLabel | XmPrimitive | Xm/Label.h |
| XmCascadeButton | XmLabel | Xm/CascadeB.h |
| XmDrawnButton | XmLabel | Xm/DrawnB.h |
| XmPushButton | XmLabel | Xm/PushB.h |
| XmToggleButton | XmLabel | Xm/ToggleB.h |
| XmList | XmPrimitive | Xm/List.h |
| XmSash | XmPrimitive | N/A |
| XmScrollBar | XmPrimitive | Xm/ScrollBar.h |
| XmSeparator | XmPrimitive | Xm/Separator.h |
| XmText | XmPrimitive | Xm/Text.h |
| XmTextField | XmPrimitive | Xm/TextF.h |
In addition to these, Motif 1.2 defines several non-GUI widgets, such as XmScreen, XmDisplay, XmDragContext, XmDragIcon, and XmDropSite. I'm not listing these here, since they generally not directly instantiated by application programs.
Gadgets are designed to be lightweight alternatives to the equivalent primitive widgets.
| Widget Class | Superclass | Header File |
| XmGadget | RectObj | Xm/Gadget.h |
| XmArrowButtonGadget | XmGadget | Xm/ArrowBG.h |
| XmLabelGadget | XmGadget | Xm/LabelG.h |
| XmCascadeButtonGadget | XmLabelGadget | Xm/CascadeBG.h |
| XmPushButtonGadget | XmLabelGadget | Xm/PushBG.h |
| XmToggleButtonGadget | XmLabelGadget | Xm/ToggleBG.h |
| XmSeparatorGadget | XmGadget | Xm/SeparatoG.h |
Note that XmManager, and thus all Motif manager widgets, are subclassed from Constraint. No Motif widgets are subclassed directly from Composite.
| Widget Class | Superclass | Header File |
| XmManager | Constraint | Xm/Manager.h |
| XmDrawingArea | XmManager | Xm/DrawingA.h |
| XmFrame | XmManager | Xm/Frame.h |
| XmPanedWindow | XmManager | Xm/PanedW.h |
| XmRowColumn | XmManager | Xm/RowColumn.h |
| XmScale | XmManager | Xm/Scale.h |
| XmScrolledWindow | XmManager | Xm/ScrolledW.h |
| XmMainWindow | XmScrolledWindow | Xm/MainW.h |
| XmBulletinBoard | XmManager | Xm/BulletinB.h |
| XmForm | XmBulletinBoard | Xm/Form.h |
| XmMessageBox | XmBulletinBoard | Xm/MessageB.h |
| XmSelectionBox | XmBulletinBoard | Xm/SelectionB.h |
| XmCommand | XmSelectionBox | Xm/Command.h |
| XmFileSelectionBox | XmSelectionBox | Xm/FileSB.h |
These widgets are new for Motif 2.0. The CSText widget is not included in Motif 2.1; use it with care.
Note that the XmClipWindow widget class is used only by internally by the XmContainer and XmScrolledWindow widgets; there is no public API to XmClipWindow.
| Widget Class | Superclass | Header File |
| XmClipWindow | XmDrawingArea | N/A |
| XmComboBox | XmManager | Xm/ComboBox.h |
| XmContainer | XmManager | Xm/Container.h |
| XmCSText | XmPrimitive | Xm/CSText.h |
| XmGrabShell | VendorShell | Xm/GrabShell.h |
| XmIconGadget | XmGadget | Xm/IconG.h |
| XmIconHeader | XmIconGadget | Xm/IconH.h |
| XmNotebook | XmManager | Xm/Notebook.h |
| XmSpinBox | XmManager | Xm/SpinB.h |
Motif 2.1 was released in February, 1997. Motif 2.1 includes all the Motif 2.0 widgets except for the CSText widget. Motif 2.1 also adds these widgets:
| Widget Class | Superclass | Header File |
| XmPrintShell | ApplicationShell | Xm/Print.h |
| XmSimpleSpinBox | XmSpinBox | Xm/SSpinB.h |
More information on the X Window System and OSF/Motif is available on my home page.