XmGadget - The Gadget widget class
#include <Xm/Xm.h>
Gadget is a widget class used as a supporting superclass for other gadget classes. It handles shadow-border drawing and highlighting, traversal activation and deactivation, and various callback lists needed by gadgets.
The color and pixmap resources defined by XmManager are directly used by gadgets. If XtSetValues is used to change one of the resources for a manager widget, all of the gadget children within the manager also change.
Gadget inherits behavior and resources from Object and RectObj classes.
The class pointer is xmGadgetClass.
The class name is XmGadget.
The following table defines a set of widget resources used by the
programmer to specify data. The programmer can also set the resource
values for the inherited classes to set attributes for this widget. To
reference a resource by name or by class in a .Xdefaults
file, remove the XmN or XmC prefix
and use the remaining letters. To specify one of the defined values
for a resource in a .Xdefaults
file, remove the
Xm prefix and use the remaining letters (in either
lowercase or uppercase, but include any underscores between words).
The codes in the access column indicate if the given resource can be
set at creation time (C), set by using XtSetValues
(S), retrieved by using XtGetValues (G), or is not
applicable (N/A).
Name | Class | Type | Default | Access |
---|---|---|---|---|
XmNbottomShadowColor | XmCBottomShadowColor | Pixel | dynamic | G |
XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C |
XmNhighlightColor | XmCHighlightColor | Pixel | dynamic | G |
XmNhighlightOnEnter | XmCHighlightOnEnter | Boolean | False | CSG |
XmNhighlightThickness | XmCHighlightThickness | Dimension | 2 | CSG |
XmNnavigationType | XmCNavigationType | XmNavigationType | XmNONE | CSG |
XmNshadowThickness | XmCShadowThickness | Dimension | 2 | CSG |
XmNtopShadowColor | XmCTopShadowColor | Pixel | dynamic | G |
XmNtraversalOn | XmCTraversalOn | Boolean | True | CSG |
XmNunitType | XmCUnitType | unsigned char | dynamic | CSG |
XmNuserData | XmCUserData | XtPointer | NULL | CSG |
When a parent widget has an XmNnavigationType of XmEXCLUSIVE_TAB_GROUP, traversal of non-tab-group widgets within the group is based on the order of those widgets in their parent's XmNchildren list.
When any widget in a hierarchy has an XmNnavigationType of XmEXCLUSIVE_TAB_GROUP, traversal of tab groups in the hierarchy proceeds to widgets in the order in which their XmNnavigationType resources were specified as XmEXCLUSIVE_TAB_GROUP or XmSTICKY_TAB_GROUP, whether by creating the widgets with that value, by calling XtSetValues, or by calling XmAddTabGroup.
XmNunitType can have the following values:
Gadget inherits the following resources from the named superclass. For a complete description of each resource, refer to the man page for that superclass.
Name | Class | Type | Default | Access |
---|---|---|---|---|
XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G |
XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG |
XmNheight | XmCHeight | Dimension | dynamic | CSG |
XmNsensitive | XmCSensitive | Boolean | True | CSG |
XmNwidth | XmCWidth | Dimension | dynamic | CSG |
XmNx | XmCPosition | Position | 0 | CSG |
XmNy | XmCPosition | Position | 0 | CSG |
Name | Class | Type | Default | Access |
---|---|---|---|---|
XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C |
A pointer to the following structure is passed to each callback:
typedef struct { int reason; XEvent * event; } XmAnyCallbackStruct;
Gadgets cannot have translations associated with them. Because of this, a Gadget's behavior is determined by the Manager widget into which the Gadget is placed. If focus is on a Gadget, events are passed to the Gadget by its Manager.