Content-type: text/html
XmPrimitive - The Primitive widget class
#include <Xm/Xm.h>
Primitive
is a widget class used as a supporting superclass for other widget classes.
It handles border drawing and highlighting, traversal activation and deactivation,
and various callback lists needed by Primitive widgets.
Primitive inherits behavior and resources from Core class.
The class pointer is xmPrimitiveWidgetClass.
The class name is XmPrimitive.
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).
XmPrimitive Resource Set
Class: XmCBottomShadowColor Default: dynamic Type: Pixel Access: CSG Class: XmCBottomShadowPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG Class: XmCForeground Default: dynamic Type: Pixel Access: CSG Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCHighlightColor Default: dynamic Type: Pixel Access: CSG Class: XmCHighlightOnEnter Default: False Type: Boolean Access: CSG Class: XmCHighlightPixmap Default: dynamic Type: Pixmap Access: CSG Class: XmCHighlightThickness Default: 2 Type: Dimension Access: CSG Class: XmCNavigationType Default: XmNONE Type: XmNavigationType Access: CSG Class: XmCShadowThickness Default: 2 Type: Dimension Access: CSG Class: XmCTopShadowColor Default: dynamic Type: Pixel Access: CSG Class: XmCTopShadowPixmap Default: dynamic Type: Pixmap Access: CSG Class: XmCTraversalOn Default: True Type: Boolean Access: CSG Class: XmCUnitType Default: dynamic Type: unsigned char Access: CSG Class: XmCUserData Default: NULL Type: XtPointer Access: CSG
The foreground, background, top shadow, bottom shadow, and highlight color resources are dynamically defaulted. If no color data is specified, the colors are automatically generated. On a single-plane system, a black and white color scheme is generated. Otherwise, four colors are generated, which display the correct shading for the 3-D visuals. If the background is the only color specified for a widget, the top shadow and bottom shadow colors are generated to give the 3-D appearance. Foreground and highlight colors are generated to provide sufficient contrast with the background color.
Colors are generated only at creation. Resetting the background through XtSetValues does not regenerate the other colors. XmChangeColor can be used to recalculate all associated colors based on a new
background color.
Primitive inherits behavior and resources from the following superclass. For a complete description of each resource, refer to the man page for that superclass.
Core Resource Set
Class: XmCAccelerators Default: dynamic Type: XtAccelerators Access: CSG Class: XmCSensitive Default: dynamic Type: Boolean Access: G Class: XmCBackground Default: dynamic Type: Pixel Access: CSG Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG Class: XmCBorderColor Default: XtDefaultForeground Type: Pixel Access: CSG Class: XmCPixmap Default: XmUNSPECIFIED_PIXMAP Type: Pixmap Access: CSG Class: XmCBorderWidth Default: 0 Type: Dimension Access: CSG Class: XmCColormap Default: dynamic Type: Colormap Access: CG Class: XmCDepth Default: dynamic Type: int Access: CG Class: XmCCallback Default: NULL Type: XtCallbackList Access: C Class: XmCHeight Default: dynamic Type: Dimension Access: CSG Class: XmCInitialResourcesPersistent Default: True Type: Boolean Access: C Class: XmCMappedWhenManaged Default: True Type: Boolean Access: CSG Class: XmCScreen Default: dynamic Type: Screen * Access: CG Class: XmCSensitive Default: True Type: Boolean Access: CSG Class: XmCTranslations Default: dynamic Type: XtTranslations Access: CSG Class: XmCWidth Default: dynamic Type: Dimension Access: CSG Class: XmCPosition Default: 0 Type: Position Access: CSG Class: XmCPosition Default: 0 Type: Position Access: CSG
A pointer to the following structure is passed to each callback:
typedef struct
{
int reason;
XEvent * event;
} XmAnyCallbackStruct;
Indicates why the callback was invoked. For this callback, reason is set to XmCR_HELP.
Points to the XEvent that triggered the
callback.
The XmPrimitive translations are listed below. These translations may not directly correspond to a translation table.
Note that for buttons in menus, altering translations in #override or #augment mode is undefined. KUp: PrimitiveTraverseUp() KDown: PrimitiveTraverseDown() KLeft: PrimitiveTraverseLeft() KRight: PrimitiveTraverseRight() KBeginLine: PrimitiveTraverseHome() KNextField: PrimitiveNextTabGroup() KPrevField: PrimitivePrevTabGroup() KActivate: PrimitiveParentActivate() KCancel: PrimitiveParentCancel() KHelp: PrimitiveHelp()
The XmPrimitive action routines are described below:
Calls the callbacks for XmNhelpCallback if any exist. If there are no help callbacks for this widget,
this action calls the help callbacks for the nearest ancestor that has them.
Traverses to the first item in the next tab group. If the
current tab group is the last entry in the tab group list, it wraps to the
beginning of the tab group list.
If the parent is a manager, passes the KActivate event received by the widget to the parent.
If the parent is a manager, Passes the KCancel
event received by the widget to the parent.
Traverses to the first item in the previous tab group. If
the beginning of the tab group list is reached, it wraps to the end of the
tab group list.
Traverses to the next item below the current widget in the
current tab group, wrapping if necessary.
Traverses to the first widget or gadget in the current tab
group.
Traverses to the next item to the left of the current widget
in the current tab group, wrapping if necessary.
Traverses to the next item in the current tab group, wrapping
if necessary.
Traverses to the previous item in the current tab group, wrapping
if necessary.
Traverses to the next item to the right of the current gadget
in the current tab group, wrapping if necessary.
Traverses to the next item above the current gadget in the
current tab group, wrapping if necessary.
This widget has the additional behavior described below:
If the shell's keyboard focus policy is XmEXPLICIT, highlights the widget and gives it the focus.
If the shell's keyboard focus policy is XmEXPLICIT, unhighlights the widget and removes the focus.
The bindings for virtual keys are vendor specific. For information about
bindings for virtual buttons and keys, see
VirtualBindings(3X).
Core(3X), XmChangeColor(3X), XmScreen(3X)