Gadgets provide essentially the same functionality as the equivalent primitive widgets. The primary motivation behind providing a set of gadgets is to improve performance, both in execution time and data space. This applies to both the application and server processes and minimizes the amount of lost functionality. The performance difference between widgets and gadgets is dramatic, so it is highly recommended that applications use gadgets whenever possible.
Gadgets can be thought of as a windowless widget. This means that they do not have windows, translations, actions, or popup children. Also, gadgets do not have any of the visual resources found in the XmPrimitive class for primitive widgets. These visuals are referenced by a gadget from its parent. Examples of display gadgets include buttons, labels and separators. All of these gadgets are built from the classes of Object, RectObj, and XmGadget. The following list provides an overview of the set of display gadgets.
Object
The Object class is an Xt Intrinsics meta class and is therefore never instantiated. It is used as a supporting superclass to provide common resources to other classes.
RectObj
It is used as a supporting superclass to provide common
resources to other classes.
XmGadget
It is used as a supporting superclass to provide common
resources to other gadget classes.
XmArrowButtonGadget
ArrowButtonGadget has the same functionality as
PushButtonGadget but displays a directional arrow.
XmLabelGadget
A LabelGadget consists of either text or graphics similar
to a Label widget.
XmPushButtonGadget
PushButtonGadgets are used to issue commands within an
application.
XmSeparatorGadget
SeparatorGadget is used to provide a visual separation
between groups of widgets.
XmToggleButtonGadget
XmToggleButtonGadget consists of a text or graphics button
face with an indicator (a square or diamonshaped box) placed
to the left of the text or graphics.