File: XmGadget.3

package info (click to toggle)
motif 2.3.8-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 36,432 kB
  • sloc: ansic: 452,643; sh: 4,611; makefile: 2,030; yacc: 1,604; lex: 352; cpp: 348
file content (385 lines) | stat: -rw-r--r-- 12,602 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
'\" 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