Blob Blame History Raw
'\" t
...\" Gadget.sgm /main/13 1996/09/08 20:45:20 rws $
.de P!
.fl
\!!1 setgray
.fl
\\&.\"
.fl
\!!0 setgray
.fl			\" force out current output buffer
\!!save /psv exch def currentpoint translate 0 0 moveto
\!!/showpage{}def
.fl			\" prolog
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
\!!psv restore
.
.de pF
.ie     \\*(f1 .ds f1 \\n(.f
.el .ie \\*(f2 .ds f2 \\n(.f
.el .ie \\*(f3 .ds f3 \\n(.f
.el .ie \\*(f4 .ds f4 \\n(.f
.el .tm ? font overflow
.ft \\$1
..
.de fP
.ie     !\\*(f4 \{\
.	ft \\*(f4
.	ds f4\"
'	br \}
.el .ie !\\*(f3 \{\
.	ft \\*(f3
.	ds f3\"
'	br \}
.el .ie !\\*(f2 \{\
.	ft \\*(f2
.	ds f2\"
'	br \}
.el .ie !\\*(f1 \{\
.	ft \\*(f1
.	ds f1\"
'	br \}
.el .tm ? font underflow
..
.ds f1\"
.ds f2\"
.ds f3\"
.ds f4\"
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 
.TH "XmGadget" "library call"
.SH "NAME"
\fBXmGadget\fP \(em The Gadget widget class
.iX "XmGadget"
.iX "widget class" "Gadget"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/Xm\&.h>
.fi
.SH "DESCRIPTION"
.PP
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\&.
.PP
The color and pixmap resources defined by \fBXmManager\fP are directly used by
gadgets\&. If \fBXtSetValues\fP is used
to change one of the resources for a manager
widget, all of the gadget children within the manager also change\&.
.SS "Classes"
.PP
Gadget inherits behavior and resources from \fBObject\fP and
\fBRectObj\fP\&.
.PP
The class pointer is \fBxmGadgetClass\fP\&.
.PP
The class name is \fBXmGadget\fP\&.
.SS "New Resources"
.PP
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 \fBXmN\fP or
\fBXmC\fP prefix and use the remaining letters\&. To specify one of the defined
values for a resource in a \&.Xdefaults file, remove the \fBXm\fP 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 \fBXtSetValues\fP (S),
retrieved by using \fBXtGetValues\fP (G), or is not applicable (N/A)\&.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmGadget Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNbackgroundXmCBackgroundPixeldynamicCSG
_____
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
_____
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapdynamicCSG
_____
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
_____
XmNforegroundXmCForegroundPixeldynamicCSG
_____
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
_____
XmNhighlightOnEnterXmCHighlightOnEnterBooleanFalseCSG
_____
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
_____
XmNhighlightThicknessXmCHighlightThicknessDimension2CSG
_____
XmNlayoutDirectionXmNCLayoutDirectionXmDirectiondynamicCG
_____
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmNONECSG
_____
XmNshadowThicknessXmCShadowThicknessDimension2CSG
_____
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
_____
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
_____
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
_____
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
_____
XmNuserDataXmCUserDataXtPointerNULLCSG
_____
XmNtoolTipStringXmCToolTipStringXmStringNULLCSG
_____
.TE
.IP "\fBXmNbackground\fP" 10
Specifies the background color for the gadget\&.
.IP "\fBXmNbackgroundPixmap\fP" 10
Specifies a pixmap for tiling the background\&. The first tile is
placed at the upper left corner of the widget\&'s window\&.
.IP "\fBXmNbottomShadowColor\fP" 10
Contains the color to use to draw the bottom and right sides of the
border shadow\&.
.IP "\fBXmNbottomShadowPixmap\fP" 10
Specifies the pixmap to use to draw the bottom and right sides of the
border shadow\&.
.IP "\fBXmNforeground\fP" 10
Specifies the foreground drawing color used by Primitive widgets\&.
.IP "\fBXmNhelpCallback\fP" 10
Specifies the list of callbacks that is called when the help key sequence
is pressed\&. The reason sent by the callback is \fBXmCR_HELP\fP\&.
.IP "\fBXmNhighlightColor\fP" 10
Contains the color of the highlighting rectangle\&.
.IP "\fBXmNhighlightOnEnter\fP" 10
Specifies if the highlighting rectangle is drawn when the cursor moves
into the widget\&.
If the shell\&'s focus policy is \fBXmEXPLICIT\fP, this resource is
ignored, and the widget is highlighted when it has the focus\&.
If the shell\&'s focus policy is \fBXmPOINTER\fP 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 \fBXmPOINTER\fP and if this resource is
False, the highlighting rectangle is not drawn when the the cursor moves
into the widget\&.
The default is False\&.
.IP "\fBXmNhighlightPixmap\fP" 10
Specifies the pixmap used to draw the highlighting rectangle\&.
.IP "\fBXmNhighlightThickness\fP" 10
Specifies the thickness of the highlighting rectangle\&.
.IP "\fBXmNlayoutDirection\fP" 10
Specifies the direction in which components of the manager (including
strings) are laid out\&. The values are of type \fBXmDirection\fR\&. If
the widget\&'s parent is a manager or shell, the value is inherited from
the widget\&'s parent\&. Otherwise, it is inherited from the closest
ancestor vendor or menu shell\&.
.IP "\fBXmNnavigationType\fP" 10
Determines whether the widget is a tab group\&.
.RS
.IP "\fBXmNONE\fP" 10
Indicates that the widget is not a tab group\&.
.IP "\fBXmTAB_GROUP\fP" 10
Indicates that the widget is a tab group, unless
the \fBXmNnavigationType\fP of another widget in the hierarchy is
\fBXmEXCLUSIVE_TAB_GROUP\fP\&.
.IP "\fBXmSTICKY_TAB_GROUP\fP" 10
Indicates that the widget is a tab group, even if the \fBXmNnavigationType\fP
of another widget in the hierarchy is
\fBXmEXCLUSIVE_TAB_GROUP\fP\&.
.IP "\fBXmEXCLUSIVE_TAB_GROUP\fP" 10
Indicates that the widget is a tab group and
that widgets in the hierarchy whose \fBXmNnavigationType\fP is
\fBXmTAB_GROUP\fP are not tab groups\&.
.IP "" 10
When a parent widget has an \fBXmNnavigationType\fP of
\fBXmEXCLUSIVE_TAB_GROUP\fP, traversal of non-tab-group widgets within
the group is based on the order of those widgets in their parent\&'s
\fBXmNchildren\fP list\&.
.IP "" 10
When the \fBXmNnavigationType\fP of any widget in a hierarchy is
\fBXmEXCLUSIVE_TAB_GROUP\fP,
traversal of tab groups in the hierarchy
proceeds to widgets in the order in which their \fBXmNnavigationType\fP
resources were specified as \fBXmEXCLUSIVE_TAB_GROUP\fP or
\fBXmSTICKY_TAB_GROUP\fP, whether by creating the widgets with that value,
by calling \fBXtSetValues\fP, or by calling \fBXmAddTabGroup\fP\&.
.RE
.IP "\fBXmNshadowThickness\fP" 10
Specifies the size of the drawn border shadow\&.
.IP "\fBXmNtopShadowColor\fP" 10
Contains the color to use to draw the top and left sides of the border
shadow\&.
.IP "\fBXmNtopShadowPixmap\fP" 10
Specifies the pixmap to use to draw the top and left sides of the border
shadow\&.
.IP "\fBXmNtraversalOn\fP" 10
Specifies traversal activation for this gadget\&.
.IP "\fBXmNunitType\fP" 10
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 \fBXmManager\fP and if the
\fBXmNunitType\fP 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 \fBXmManager\fP, the
resource has a default unit type of \fBXmPIXELS\fP\&.
.IP "" 10
The unit type can also be specified in resource files, with the
following format:
.PP
.nf
\f(CW\fI<floating value><unit>\fP\fR
.fi
.PP
.IP "" 10
where:
.RS
.IP "\fIunit\fP" 10
is <" ", pixels, inches, centimeters, millimeters, points, font units>
.IP "\fIpixels\fP" 10
is <\fIpix\fP, \fIpixel\fP, \fIpixels\fP>
.IP "\fIinches\fP" 10
is <\fIin\fP, \fIinch\fP, \fIinches\fP>
.IP "\fIcentimeter\fP" 10
is <\fIcm\fP, \fIcentimeter\fP, \fIcentimeters\fP>
.IP "\fImillimeters\fP" 10
is <\fImm\fP, \fImillimeter\fP, \fImillimeters\fP>
.IP "\fBpoints\fP" 10
is <\fIpt\fP, \fIpoint\fP, \fIpoints\fP>
.IP "\fBfont units\fP" 10
is <\fIfu\fP, \fBfont_unit\fP, \fBfont_units\fP>
.IP "\fIfloat\fP" 10
is {"+"|"-"}{{<"0"-"9">*}\&.}<"0"-"9">*
.IP "" 10
Note that the type Dimension must always be positive\&.
.RE
.IP "" 10
For example,
.PP
.nf
\f(CWxmfonts*XmMainWindow\&.height: 10\&.4cm
*PostIn\&.width: 3inches\fR
.fi
.PP
.IP "" 10
\fBXmNunitType\fP can have the following values:
.RS
.IP "\fBXmPIXELS\fP" 10
All values provided to the widget are treated as normal
pixel values\&.
.IP "\fBXmMILLIMETERS\fP" 10
All values provided to the widget are treated as normal millimeter
values\&.
.IP "\fBXm100TH_MILLIMETERS\fP" 10
All values provided to the widget are treated
as 1/100 of a millimeter\&.
.IP "\fBXmCENTIMETERS\fP" 10
All values provided to the widget are treated as normal centimeter
values\&.
.IP "\fBXmINCHES\fP" 10
All values provided to the widget are treated as normal inch
values\&.
.IP "\fBXm1000TH_INCHES\fP" 10
All values provided to the widget are treated as
1/1000 of an inch\&.
.IP "\fBXmPOINTS\fP" 10
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\&.
.IP "\fBXm100TH_POINTS\fP" 10
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 inch\&.
.IP "\fBXmFONT_UNITS\fP" 10
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 \fBXmNhorizontalFontUnit\fP
and \fBXmNverticalFontUnit\fP\&.
.IP "\fBXm100TH_FONT_UNITS\fP" 10
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 \fBXmNhorizontalFontUnit\fP
and \fBXmNverticalFontUnit\fP\&.
.RE
.IP "\fBXmNuserData\fP" 10
Allows the application to attach any necessary specific data to the gadget\&.
This is an internally unused resource\&.

.IP "\fBXmNtoolTipString\fP" 10
The XmString to display as the toolTip. If this resource is NULL, no tip
will be displayed. ToolTips are described in VendorShell(3)

.SS "Inherited Resources"
.PP
Gadget inherits resources from the
superclass described in the following table\&.
For a complete description of each resource, refer to the
reference page for that superclass\&.
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBRectObj Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNancestorSensitiveXmCSensitiveBooleandynamicG
_____
XmNborderWidthXmCBorderWidthDimension0N/A
_____
XmNheightXmCHeightDimensiondynamicCSG
_____
XmNsensitiveXmCSensitiveBooleanTrueCSG
_____
XmNwidthXmCWidthDimensiondynamicCSG
_____
XmNxXmCPositionPosition0CSG
_____
XmNyXmCPositionPosition0CSG
_____
.TE
.PP
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBObject Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
_____
.TE
.SS "Callback Information"
.PP
A pointer to the following structure is passed to each callback:
.PP
.nf
typedef struct
{
        int \fIreason\fP;
        XEvent \fI* event\fP;
} XmAnyCallbackStruct;
.fi
.IP "\fIreason\fP" 10
Indicates why the callback was invoked\&.
For this callback, \fIreason\fP is set to \fBXmCR_HELP\fP\&.
.IP "\fIevent\fP" 10
Points to the \fBXEvent\fP that triggered the callback\&.
.SS "Behavior"
.PP
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\&.
.SH "RELATED"
.PP
\fBObject\fP(3),
\fBRectObj\fP(3),
\fBXmManager\fP(3), and
\fBXmScreen\fP(3)\&.
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:24