XmPrimitive(3Xm) XmPrimitive(3Xm)
NAME
XmPrimitive - the Primitive widget class.
AES SUPPORT LEVEL
full-use
SYNOPSIS
#include <Xm/Xm.h>
DESCRIPTION
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.
Classes
Primitive inherits behavior and resources from Core
class.
The class pointer is xmPrimitiveWidgetClass.
The class name is XmPrimitive.
New Resources
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
lower case or upper case, 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).
- 1 -
XmPrimitive(3Xm) XmPrimitive(3Xm)
XmPrimitive Resource Set
Name Class Type Default Access
______________________________________________________________________________________________
XmNbottomShadowColor XmCForeground Pixel dynamic CSG
XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNforeground XmCForeground Pixel dynamic CSG
XmNhelpCallback XmCCallback XtCallbackList NULL C
XmNhighlightColor XmCForeground Pixel Black CSG
XmNhighlightOnEnter XmCHighlightOnEnter Boolean False CSG
XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
XmNhighlightThickness XmCHighlightThickness short 0 CSG
XmNshadowThickness XmCShadowThickness short 2 CSG
XmNtopShadowColor XmCBackground Pixel dynamic CSG
XmNtopShadowPixmap XmCTopShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNtraversalOn XmCTraversalOn Boolean False CSG
XmNuserData XmCUserData caddr_t NULL CSG
XmNbottomShadowColor
Specifies the pixmap to use to draw the top and
left sides of the border shadow.
XmNbottomShadowPixmap
Specifies the pixmap to use to draw the bottom and
right sides of the border shadow.
XmNforeground
Specifies the foreground drawing color used by
Primitive widgets.
XmNhelpCallback
Specifies the list of callbacks that is called
when the help key sequence is pressed. The reason
sent by the callback is XmCR_HELP. There is not a
translation bound to this resource. It is up to
the application to install a translation for help.
XmNhighlightColor
Specifies the color of the highlighting rectangle.
This color is used if the highlight pixmap
resource is XmUNSPECIFIED_PIXMAP.
XmNhighlightOnEnter
Specifies if the highlighting rectangle is drawn
when the cursor moves into the widget. If this
resource is True and XmNtraversalOn is False, then
the rectangle highlights the window when the
cursor is moved into it. This resource is ignored
if the XmNtraversalOn resource is set to True.
XmNhighlightPixmap
Specifies the pixmap used to draw the highlighting
- 2 -
XmPrimitive(3Xm) XmPrimitive(3Xm)
rectangle.
XmNhighlightThickness
Specifies the thickness of the highlighting
rectangle.
XmNshadowThickness
Specifies the size of the drawn border shadow.
XmNtopShadowColor
Specifies the pixmap to use to draw the top and
left sides of the border shadow. This color is
used if the XmNtopShadowPixmap resource is NULL.
XmNtopShadowPixmap
Specifies the pixmap to use to draw the top and
left sides of the border shadow.
XmNtraversalOn
Specifies if traversal is activated for this
widget.
XmNuserData
Allows the application to attach any necessary
specific data to the widget. It is an internally
unused resource.
Dynamic Color Defaults
The foreground, background, top shadow, and bottom
shadow resources are dynamically defaulted. If no
color data is specified, the colors are automatically
generated. On a monochrome system, a black and white
color scheme is generated. On a color system, a set of
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, bottom shadow, and foreground
colors are generated to give the 3-D appearance. The
color generation works best with non-saturated colors.
Using pure red, green, or blue yields poor results.
Colors are generated at creation only. Resetting the
background through XtSetValues will not regenerate the
other colors.
Inherited Resources
Primitive inherits behavior and resources from the
following superclass. For a complete description of
these resources, refer to the man page for that
- 3 -
XmPrimitive(3Xm) XmPrimitive(3Xm)
superclass.
Core Resource Set
Name Class Type Default Access
____________________________________________________________________________________________
XmNaccelerators XmCAccelerators XtTranslations NULL CSG
XmNancestorSensitive XmCSensitive Boolean True G
XmNbackground XmCBackground Pixel dynamic CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel Black CSG
XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 0 CSG
XmNcolormap XmCColormap Colormap XtCopyFromParent CG
XmNdepth XmCDepth int XtCopyFromParent CG
XmNdestroyCallback XmCCallback XtCallbackList NULL C
XmNheight XmCHeight Dimension 0 CSG
XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Pointer XtCopyScreen CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtranslations XmCTranslations XtTranslations NULL CSG
XmNwidth XmCWidth Dimension 0 CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG
Behavior
Shift<Key>Tab:
Moves the focus to the first item contained within
the previous tab group. If the beginning of the
tab group list is reached, it will wrap to the end
of the tab group list.
<Key>Tab:
Moves the focus to the first item contained within
the next tab group. If the current tab group is
the last entry in the tab group list, it will wrap
to the beginning of the tab group list.
<Key>Up or <Key>Left:
Moves the keyboard focus to the previous Primitive
widget or gadget within the current tab group.
The previous widget or gadget is the one which is
the previous entry in the tab group's list of
children. Wrapping will occur, if necessary.
<Key>Down or <Key>Right:
Moves the Keyboard focus to the next Primitive
widget or gadget within the current tab group.
The previous widget or gadget is the one which is
the next entry in the tab group's list of
children. Wrapping will occur, if necessary.
- 4 -
XmPrimitive(3Xm) XmPrimitive(3Xm)
<Key>Home:
Moves the keyboard focus to the first Primitive
widget or gadget in the current tab group.
Default Translations
The following are the default translations for
Primitive:
<FocusIn>: PrimitiveFocusIn()
<FocusOut>: PrimitiveFocusOut()
<Unmap>: PrimitiveUnmap()
Shift<Key>Tab: PrimitivePrevTabGroup()
<Key>Tab: PrimitiveNextTabGroup()
<Key>Up: PrimitiveTraversePrev()
<Key>Down: PrimitiveTraverseNext()
<Key>Left: PrimitiveTraversePrev()
<Key>Right: PrimitiveTraverseNext()
<Key>Home: PrimitiveTraverseHome()
RELATED INFORMATION
Core(3X).
- 5 -