xenial (3) XmPrimitive.3.gz

Provided by: libmotif-dev_2.3.4-10_amd64 bug

NAME

       XmPrimitive — The Primitive widget class "XmPrimitive" "widget class" "Primitive"

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.  Primitive and all its subclasses hold the XmQTcareParentVisual trait.

   Data Transfer Behavior
       Primitive has no widget class conversion or destination procedure.  Subclasses and the XmNconvertCallback
       procedures  are  responsible  for  any  conversion  of   selections.    Subclasses   and   the   subclass
       XmNdestinationCallback procedures are responsible for any data transfers to the widget.

   Classes
       Primitive inherits behavior, resources, and traits from Core.

       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  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).

       ┌───────────────────────────────────────────────────────────────────────────────────────────────────┐
       │                        │            XmPrimitiveResource Set      │                      │        │
       │NameClassTypeDefaultAccess │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNbottomShadowColor    │ XmCBottomShadowColor  │ Pixel            │ dynamic              │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNbottomShadowPixmap   │ XmCBottomShadowPixmap │ Pixmap           │ XmUNSPECIFIED_PIXMAP │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNconvertCallback      │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNforeground           │ XmCForeground         │ Pixel            │ dynamic              │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNhelpCallback         │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNhighlightColor       │ XmCHighlightColor     │ Pixel            │ dynamic              │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNhighlightOnEnter     │ XmCHighlightOnEnter   │ Boolean          │ False                │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNhighlightPixmap      │ XmCHighlightPixmap    │ Pixmap           │ dynamic              │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNhighlightThickness   │ XmCHighlightThickness │ Dimension        │ 2                    │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNlayoutDirection      │ XmCLayoutDirection    │ XmDirection      │ dynamic              │ CG     │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNnavigationType       │ XmCNavigationType     │ XmNavigationType │ XmNONE               │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNpopupHandlerCallback │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNshadowThickness      │ XmCShadowThickness    │ Dimension        │ 2                    │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNtoolTipString        │ XmCToolTipString      │ XmString         │ NULL                 │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNtopShadowColor       │ XmCTopShadowColor     │ Pixel            │ dynamic              │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNtopShadowPixmap      │ XmCTopShadowPixmap    │ Pixmap           │ dynamic              │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNtraversalOn          │ XmCTraversalOn        │ Boolean          │ True                 │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNunitType             │ XmCUnitType           │ unsigned char    │ dynamic              │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       │XmNuserData             │ XmCUserData           │ XtPointer        │ NULL                 │ CSG    │
       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
       └────────────────────────┴───────────────────────┴──────────────────┴──────────────────────┴────────┘
       XmNbottomShadowColor
                 Specifies the color to use to draw the bottom and right sides of the border shadow.  This color
                 is used if the XmNtopShadowPixmap resource is unspecified.

       XmNbottomShadowPixmap
                 Specifies the pixmap to use to draw the bottom and right sides of the border shadow.

       XmNconvertCallback
                 Specifies a list of callbacks called when the widget is asked to convert a selection.  The type
                 of the structure whose address is passed to these callbacks  is  XmConvertCallbackStruct.   The
                 reason is XmCR_OK.

       XmNforeground
                 Specifies the foreground drawing color used by Primitive widgets.

       XmNhelpCallback
                 Specifies the list of callbacks that is called when the help key is pressed. The reason sent by
                 the callback is XmCR_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 the
                 shell's focus policy is XmEXPLICIT, this resource is ignored, and  the  widget  is  highlighted
                 when  it has the focus.  If the shell's focus policy is XmPOINTER and if this resource is True,
                 the highlighting rectangle is drawn when the cursor moves into  the  widget.   If  the  shell's
                 focus  policy  is  XmPOINTER  and  if this resource is False, the highlighting rectangle is not
                 drawn when the the cursor moves into the widget.  The default is False.

       XmNhighlightPixmap
                 Specifies the pixmap used to draw the highlighting rectangle.

       XmNhighlightThickness
                 Specifies the thickness of the highlighting rectangle.

       XmNlayoutDirection
                 Specifies the direction in which components of the primitive (including strings) are laid  out.
                 The  values  are of type XmDirection. If the widget's parent is a primitive or shell, the value
                 is inherited from the widget's parent. Otherwise, it is inherited  from  the  closest  ancestor
                 vendor  or  menu  shell.  Refer to the XmDirection(3) reference page for the possible direction
                 values.

       XmNnavigationType
                 Determines whether the widget is a tab group.

                 XmNONE    Indicates that the widget is not a tab group.

                 XmTAB_GROUP
                           Indicates that the widget is a tab group, unless  the  XmNnavigationType  of  another
                           widget in the hierarchy is XmEXCLUSIVE_TAB_GROUP.

                 XmSTICKY_TAB_GROUP
                           Indicates  that  the  widget is a tab group, even if the XmNnavigationType of another
                           widget in the hierarchy is XmEXCLUSIVE_TAB_GROUP.

                 XmEXCLUSIVE_TAB_GROUP
                           Indicates that the widget is a tab group and that  widgets  in  the  hierarchy  whose
                           XmNnavigationType is XmTAB_GROUP are not tab groups.

                           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  the  XmNnavigationType  of  any widget in a hierarchy is 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.

       XmNpopupHandlerCallback
                 Allows the application to control which popup menu will be automatically posted. The reason can
                 either be XmCR_POST or XmCR_REPOST:

                 XmCR_POST Indicates that this is a regular posting request.

                 XmCR_REPOST
                           Indicates that the menu was just unposted and that this callback  was  invoked  on  a
                           replay.

                 This callback uses the XmPopupHandlerCallbackStruct structure to pass information.

       XmNshadowThickness
                 Specifies the size of the drawn border shadow.

       XmNtoolTipString
                 The  XmString  to  display  as the toolTip. If this resource is NULL, no tip will be displayed.
                 ToolTips are described in VendorShell(3)

       XmNtopShadowColor
                 Specifies the color to use to draw the top and left sides of the border shadow.  This color  is
                 used if the XmNtopShadowPixmap resource is unspecified.  If a default top shadow pixmap exists,
                 it will need to be removed for the XmNtopShadowColor to take effect.

       XmNtopShadowPixmap
                 Specifies the pixmap to use to draw the top and left sides of the border shadow.   A  Primitive
                 top  shadow  pixmap  is  created  in  two  situations. In either of these situations, a default
                 50-foreground top shadow pixmap is created.

                    •  If the Primitive top shadow color is the same as the Core background pixel color.

                    •  If the depth of the screen is only one.

                 For example, if a widget with the same top shadow and background color is  created,  a  default
                 shadow  pixmap  is  generated.  Such  a  pixmap  needs  to be removed for the XmNtopShadowColor
                 resource to take effect.

       XmNtraversalOn
                 Specifies if traversal is activated for this widget. In CascadeButton and  CascadeButtonGadget,
                 this resource is forced to True unless the parent is an OptionMenu.

       XmNunitType
                 Provides  the basic support for resolution independence.  It defines the type of units a widget
                 uses with sizing and positioning resources.  If the widget's parent is a subclass of  XmManager
                 and  if  the  XmNunitType  resource  is not explicitly set, it defaults to the unit type of the
                 parent widget.  If the widget's parent is not a subclass  of  XmManager,  the  resource  has  a
                 default unit type of XmPIXELS.

                 The unit type can also be specified in resource files, with the following format:

       <floating value><unit>

                 where:

                 unit      is <" ", pixels, inches, centimeters, millimeters, points, font units>

                 pixels    is <pix, pixel, pixels>

                 inches    is <in, inch, inches>

                 centimeter
                           is <cm, centimeter, centimeters>

                 millimeters
                           is <mm, millimeter, millimeters>

                 points    is <pt, point, points>

                 font units
                           is <fu, font_unit, font_units>

                 float     is {"+"|"-"}{{<"0"-"9">*}.}<"0"-"9">*

                           Note that the type Dimension must always be positive.

                 For example,

       xmfonts*XmMainWindow.height: 10.4cm
       *PostIn.width: 3inches

                 XmNunitType can have the following values:

                 XmPIXELS  All values provided to the widget are treated as normal pixel values.

                 XmMILLIMETERS
                           All values provided to the widget are treated as normal millimeter values.

                 Xm100TH_MILLIMETERS
                           All values provided to the widget are treated as 1/100 of a millimeter.

                 XmCENTIMETERS
                           All values provided to the widget are treated as normal centimeter values.

                 XmINCHES  All values provided to the widget are treated as normal inch values.

                 Xm1000TH_INCHES
                           All values provided to the widget are treated as 1/1000 of an inch.

                 XmPOINTS  All  values  provided  to the widget are treated as normal point values. A point is a
                           unit used in text processing applications and is defined as 1/72 of an inch.

                 Xm100TH_POINTS
                           All values provided to the widget are treated as 1/100 of a point. A point is a  unit
                           used in text processing applications and is defined as 1/72 of an inch.

                 XmFONT_UNITS
                           All  values  provided to the widget are treated as normal font units. A font unit has
                           horizontal and vertical components.  These are the values of the  XmScreen  resources
                           XmNhorizontalFontUnit and XmNverticalFontUnit.

                 Xm100TH_FONT_UNITS
                           All  values  provided to the widget are treated as 1/100 of a font unit.  A font unit
                           has horizontal and vertical  components.   These  are  the  values  of  the  XmScreen
                           resources XmNhorizontalFontUnit and XmNverticalFontUnit.

       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, 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.

   Inherited Resources
       Primitive  inherits  behavior  and resources from the superclass described in the following table.  For a
       complete description of each resource, refer to the reference page for that superclass.

       ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
--
       Core(3), XmDirection(3), XmChangeColor(3), and XmScreen(3).

                                                                                                  XmPrimitive(3)