Kenton Lee

The OSF/Motif Widget Class Hierarchy


Copyright © 1996-1997 by Kenton Lee, Palo Alto, California, USA. All Rights Reserved.

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.

X Toolkit Intrinsics Widgets

These widget classes are provided by the X Toolkit intrinsics, not Motif. There are listed here for completeness.

Widget Class Superclass Header File
RectObjN/AX11/RectObj.h
CoreRectObjX11/Core.h
CompositeCoreX11/Composite.h
ConstraintCompositeX11/Constraint.h
ShellCompositeX11/Shell.h
OverrideShellShellX11/Shell.h
WMShellShellX11/Shell.h
VendorShellWMShellX11/Shell.h
TransientVendorShellX11/Vendor.h
TopLevelShellVendorShellX11/Shell.h
ApplicationShellTopLevelShellX11/Shell.h

Motif Shell Widgets

Note that the Motif VendorShell replaces the X Toolkit VendorShell.

Widget Class Superclass Header File
VendorShellWMShellXm/VendorS.h
XmDialogShellTransientShellXm/DialogS.h
XmMenuShellOverrideShellXm/MenuS.h

Motif Primitive Widgets

Note that the XmSash widget class is used only by XmPanedWindow; there is no public API to XmSash.

Widget Class Superclass Header File
XmPrimitiveCoreXm/Primitive.h
XmArrowButtonXmPrimitiveXm/ArrowB.h
XmLabelXmPrimitiveXm/Label.h
XmCascadeButtonXmLabelXm/CascadeB.h
XmDrawnButtonXmLabelXm/DrawnB.h
XmPushButtonXmLabelXm/PushB.h
XmToggleButtonXmLabelXm/ToggleB.h
XmListXmPrimitiveXm/List.h
XmSashXmPrimitiveN/A
XmScrollBarXmPrimitiveXm/ScrollBar.h
XmSeparatorXmPrimitiveXm/Separator.h
XmTextXmPrimitiveXm/Text.h
XmTextFieldXmPrimitiveXm/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.

Motif Gadgets

Gadgets are designed to be lightweight alternatives to the equivalent primitive widgets.

Widget Class Superclass Header File
XmGadgetRectObjXm/Gadget.h
XmArrowButtonGadgetXmGadgetXm/ArrowBG.h
XmLabelGadgetXmGadgetXm/LabelG.h
XmCascadeButtonGadgetXmLabelGadgetXm/CascadeBG.h
XmPushButtonGadgetXmLabelGadgetXm/PushBG.h
XmToggleButtonGadgetXmLabelGadgetXm/ToggleBG.h
XmSeparatorGadgetXmGadgetXm/SeparatoG.h

Motif Manager Widgets

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
XmManagerConstraintXm/Manager.h
XmDrawingAreaXmManagerXm/DrawingA.h
XmFrameXmManagerXm/Frame.h
XmPanedWindowXmManagerXm/PanedW.h
XmRowColumnXmManagerXm/RowColumn.h
XmScaleXmManagerXm/Scale.h
XmScrolledWindowXmManagerXm/ScrolledW.h
XmMainWindowXmScrolledWindowXm/MainW.h
XmBulletinBoardXmManagerXm/BulletinB.h
XmFormXmBulletinBoardXm/Form.h
XmMessageBoxXmBulletinBoardXm/MessageB.h
XmSelectionBoxXmBulletinBoardXm/SelectionB.h
XmCommandXmSelectionBoxXm/Command.h
XmFileSelectionBoxXmSelectionBoxXm/FileSB.h

Motif 2.0 Widgets

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
XmClipWindowXmDrawingAreaN/A
XmComboBoxXmManagerXm/ComboBox.h
XmContainerXmManagerXm/Container.h
XmCSTextXmPrimitiveXm/CSText.h
XmGrabShellVendorShellXm/GrabShell.h
XmIconGadgetXmGadgetXm/IconG.h
XmIconHeaderXmIconGadgetXm/IconH.h
XmNotebookXmManagerXm/Notebook.h
XmSpinBoxXmManagerXm/SpinB.h

Motif 2.1 Widgets

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
XmPrintShellApplicationShellXm/Print.h
XmSimpleSpinBoxXmSpinBoxXm/SSpinB.h

More information on the X Window System and OSF/Motif is available on my home page.


Please send me your comments on this page:


Name: E-Mail:

[X Consulting] [Home] [Mail] [X Papers] [X WWW Sites] [Yahoo!]
Kenton Lee, kenton @ rahul.net
Last modified June 3, 1997.