XmGadget(3X) UNIX System V XmGadget(3X)
NAME
XmGadget - the Gadget widget class.
SYNOPSIS
#include <Xm/Xm.h>
DESCRIPTION
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.
Classes
Gadget inherits behavior and resources from Object and RectObj classes.
The class pointer is xmGadgetClass.
The class name is XmGadget.
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).
_____________________________________________________________________________________
XmGadget Resource Set
_____________________________________________________________________________________
Name Class Type Default Access
_____________________________________________________________________________________
_____________________________________________________________________________________
XmNhelpCallback XmCCallback XtCallbackList NULL C
_____________________________________________________________________________________
XmNhighlightOnEnter XmCHighlightOnEnter Boolean False CSG
_____________________________________________________________________________________
XmNhighlightThickness XmCHighlightThickness Dimension 2 CSG
10/89 Page 1
XmGadget(3X) UNIX System V XmGadget(3X)
|_____________________|_______________________|__________________|_________|________|
|XmNnavigationType | XmCNavigationType | XmNavigationType| XmNONE | G |
|_____________________|_______________________|__________________|_________|________|
|XmNshadowThickness | XmCShadowThickness | Dimension | 2 | CSG |
|_____________________|_______________________|__________________|_________|________|
|XmNtraversalOn | XmCTraversalOn | Boolean | True | CSG |
|_____________________|_______________________|__________________|_________|________|
|XmNunitType | XmCUnitType | unsigned char | dynamic| CSG |
|_____________________|_______________________|__________________|_________|________|
|XmNuserData | XmCUserData | Pointer | NULL | CSG |
|_____________________|_______________________|__________________|_________|________|
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.
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 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.
XmNhighlightThickness
Specifies the thickness of the highlighting rectangle.
XmNnavigationType
Controls whether the Widget is a navigation group.
⊕ XmNONE indicates that the Widget is not a navigation group.
⊕ XmTAB_GROUP indicates that the Widget is included automatically
in keyboard navigation, unless XmAddTabGroup has been called.
⊕ XmSTICKY_TAB_GROUP indicates that the Widget is included
automatically in keyboard navigation, even if XmAddTabGroup has
been called.
⊕ XmEXCLUSIVE_TAB_GROUP indicates that the Widget is included
explicitly in keyboard navigation by the application. With
XmEXCLUSIVE_TAB_GROUP, traversal of widgets within the group is
based on the order of children.
If the gadget's parent is a shell, the default is XmTAB_GROUP;
otherwise, the default is XmNONE.
Page 2 10/89
XmGadget(3X) UNIX System V XmGadget(3X)
XmNshadowThickness
Specifies the size of the drawn border shadow.
XmNtraversalOn
Specifies traversal activation for this gadget.
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.
XmNunitType can have the following values:
⊕ XmPIXELS - all values provided to the widget are treated as
normal pixel values.
⊕ Xm100TH_MILLIMETERS - all values provided to the widget are
treated as 1/100 millimeter.
⊕ Xm1000TH_INCHES - all values provided to the widget are treated
as 1/1000 inch.
⊕ Xm100TH_POINTS - all values provided to the widget are treated
as 1/100 point. A point is a unit used in text processing
applications and is defined as 1/72 inch.
⊕ Xm100TH_FONT_UNITS - all values provided to the widget are
treated as 1/100 of a font unit. The value to be used for the
font unit is determined in one of three ways:
⊕ The application can use XmSetFontUnits to specify the font
unit values.
⊕ If the application has not called XmSetFontUnits, the font
units can be derived from a font. The user specifies this
font by using the font resource in a defaults file or on
the command line, or by using the standard command line
options -fn and -font.
⊕ If the application has not called XmSetFontUnits and the
user has not specified a font resource, the horizontal and
vertical font units default to 10.
A horizontal font unit is derived from a font as follows:
⊕ If the font has an AVERAGE_WIDTH property, the horizontal
font unit is the AVERAGE_WIDTH property divided by 10.
10/89 Page 3
XmGadget(3X) UNIX System V XmGadget(3X)
⊕ If the font has no AVERAGE_WIDTH property but has a
QUAD_WIDTH property, the horizontal font unit is the
QUAD_WIDTH property.
⊕ If the font has no AVERAGE_WIDTH or QUAD_WIDTH property, the
horizontal font unit is the sum of the font struct's
min_bounds.width and max_bounds.width divided by 2.3.
A vertical font unit is derived from a font as follows:
⊕ If the font has a PIXEL_SIZE property, the vertical font unit
is the PIXEL_SIZE property divided by 1.8.
⊕ If the font has no PIXEL_SIZE property but has POINT_SIZE and
RESOLUTION_Y properties, the vertical font unit is the
product of the POINT_SIZE and RESOLUTION_Y properties divided
by 1400.
⊕ If the font has no PIXEL_SIZE, POINT_SIZE, or RESOLUTION_Y
properties, the vertical font unit is the sum of the font
struct's max_bounds.ascent and max_bounds.descent divided by
2.2.
XmNuserData
Allows the application to attach any necessary specific data to the
gadget. This is an internally unused resource.
Inherited Resources
Gadget inherits the following resources from the named superclass. For a
complete description of each resource, refer to the man page for that
superclass.
______________________________________________________________________
RectObj Resource Set
______________________________________________________________________
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
Page 4 10/89
XmGadget(3X) UNIX System V XmGadget(3X)
|_____________________|________________|___________|_________|________|
______________________________________________________________________
| Object Resource Set |
|___________________|_____________|________________|_________|________|
| Name | Class | Type | Default| Access|
|___________________|_____________|________________|_________|________|
|___________________|_____________|________________|_________|________|
| XmNdestroyCallback| XmCCallback| XtCallbackList| NULL | C |
|___________________|_____________|________________|_________|________|
Behavior
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.
RELATED INFORMATION
Object(3X), RectObj(3X), and XmManager(3X).
10/89 Page 5