File: XmToggleButtonGadget.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 (735 lines) | stat: -rw-r--r-- 28,551 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
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
'\" t
...\" ToggleBB.sgm /main/15 1996/09/25 13:46:27 cdedoc $
.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 "XmToggleButtonGadget" "library call"
.SH "NAME"
\fBXmToggleButtonGadget\fP \(em The ToggleButtonGadget widget class
.iX "XmToggleButtonGadget"
.iX "widget class" "ToggleButtonGadget"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/ToggleBG\&.h>
.fi
.SH "DESCRIPTION"
.PP
ToggleButtonGadget sets nontransitory state data within an
application\&. Usually this gadget consists of an indicator
(square, diamond, or round)
with either text or a pixmap on one side of it\&.
However,
it can also consist of just text or a pixmap without the indicator\&.
.PP
The toggle graphics display a \fB1-of-many\fP, \fBN-of-many\fP, or
\fBN-of-many-round\fP selection state\&.
When a toggle indicator is displayed, a square indicator shows an
\fBN-of-many\fP
selection state, a diamond-shaped indicator shows a
\fB1-of-many\fP selection state, and a circle-shaped indicator shows a
\fB1-of-many-round\fP selection state\&.
.PP
ToggleButtonGadget
implies a set or unset state\&.
In the case of a label and an indicator, an
empty indicator (square, diamond, or round) indicates that
ToggleButtonGadget
is unset, and a filled indicator shows that it is
set\&. The indicator may be filled with a check mark or the
select color\&. In the case of a pixmap
toggle, different pixmaps are used to display the set/unset
states\&.
ToggleButtonGadget can also indicate an indeterminate state\&. In the case of
a label and an indicator, an indeterminate state is indicated by a
stippled flat box\&.
In the case of a pixmap toggle, a different pixmap is used to display
the indeterminate state\&.
.PP
The default behavior associated with a ToggleButtonGadget in a menu depends on
the type of menu system in which it resides\&.
By default, \fB<Btn1>\fP controls the behavior of the ToggleButtonGadget\&.
In addition, \fB<Btn3>\fP controls the behavior of the ToggleButtonGadget if
it resides in a PopupMenu system\&.
The actual mouse button used is determined by its RowColumn parent\&.
.PP
Label\&'s resource \fBXmNmarginLeft\fP may
be increased
to accommodate the toggle indicator when it is created\&.
.PP
ToggleButtonGadget uses the \fBXmQTmenuSystem\fP and
\fBXmQTspecifyRenderTable\fP traits\&.
.SS "Classes"
.PP
ToggleButtonGadget inherits behavior,
resources, and traits from \fBObject\fP, \fBRectObj\fP, \fBXmGadget\fP
and \fBXmLabelGadget\fP\&.
.PP
The class pointer is \fBxmToggleButtonGadgetClass\fP\&.
.PP
The class name is \fBXmToggleButtonGadget\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 \fB\&.Xdefaults\fP 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 \fB\&.Xdefaults\fP 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.
\fBXmToggleButtonGadget Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNarmCallbackXmCArmCallbackXtCallbackListNULLC
_____
XmNdetailShadowThicknessXmCDetailShadowThicknessDimension2CSG
_____
XmNdisarmCallbackXmCDisarmCallbackXtCallbackListNULLC
_____
XmNfillOnSelectXmCFillOnSelectBooleandynamicCSG
_____
XmNindeterminatePixmapXmCIndeterminatePixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNindicatorOnXmCIndicatorOnunsigned charXmINDICATOR_FILLCSG
_____
XmNindicatorSizeXmCIndicatorSizeDimensiondynamicCSG
_____
XmNindicatorTypeXmCIndicatorTypeunsigned chardynamicCSG
_____
XmNselectColorXmCSelectColorPixeldynamicCSG
_____
XmNselectInsensitivePixmapXmCSelectInsensitivePixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNselectPixmapXmCSelectPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNsetXmCSetunsigned charXmUNSETCSG
_____
XmNspacingXmCSpacingDimension4CSG
_____
XmNtoggleModeXmCToggleModeunsigned charXmTOGGLE_BOOLEANCSG
_____
XmNunselectColorXmCUnselectColorPixeldynamicCSG
_____
XmNvalueChangedCallbackXmCValueChangedCallbackXtCallbackListNULLC
_____
XmNvisibleWhenOffXmCVisibleWhenOffBooleandynamicCSG
_____
.TE
.IP "\fBXmNarmCallback\fP" 10
Specifies a list of callbacks
that is called when the ToggleButtonGadget is armed\&.
To arm this gadget, press the active mouse button
while the pointer is inside the ToggleButtonGadget\&.
For this callback, the reason is \fBXmCR_ARM\fP\&.
.IP "\fBXmNdetailShadowThickness\fP" 10
Specifies the thickness of the indicator shadow\&. The default thickness
is 2 pixels\&.
.IP "\fBXmNdisarmCallback\fP" 10
Specifies a list of callbacks
called when ToggleButtonGadget is disarmed\&.
To disarm this gadget, press and release the active
mouse button while the pointer is inside the ToggleButtonGadget\&.
The gadget is also disarmed
when the user moves out of the gadget
and releases the mouse button when the pointer is outside the gadget\&.
For this callback, the reason is \fBXmCR_DISARM\fP\&.
.IP "\fBXmNfillOnSelect\fP" 10
Fills the indicator with the color specified in
\fBXmNselectColor\fP and switches the top and bottom shadow
colors when set to True\&. If unset, fills the indicator with the
unselect color\&. If indeterminate, fills the indicator with
half select color and half unselect color\&.
Otherwise, it switches only the top
and bottom shadow colors\&. The default is set
True only if a box type of indicator
(such as a check box) is specified, or if the \fBXmNindicatorType\fP is a
\fB1-of\fP type and a toggle indicator is drawn\&.
If \fBXmNfillOnSelect\fP is True, \fBXmNset\fP is \fBXmSET\fP, and
\fBXmNindicatorOn\fP is \fBXmINDICATOR_NONE\fP the ToggleButtonGadget\&'s
background is set to \fBXmNselectColor\fP\&. For the other
\fBXmNindicatorOn\fP values, only the indicator is filled with
\fBXmNselectColor\fP\&.
.IP "\fBXmNindeterminateInsensitivePixmap\fP" 10
Specifies the pixmap to be displayed as the button face when
the Label \fBXmNlableType\fP resource is \fBXmPIXMAP\fP or
\fBXmPIXMAP_AND_STRING\fP, the ToggleButtonGadget \fBXmNset\fP
resource is \fBXmINDETERMINATE\fP,
and the \fBCore\fP \fBXmNsensitive\fP resource is False\&.
.IP "\fBXmNindeterminatePixmap\fP" 10
Specifies the pixmap to be displayed as the button face when
the Label \fBXmNlableType\fP resource is \fBXmPIXMAP\fP or
\fBXmPIXMAP_AND_STRING\fP,
the ToggleButtonGadget \fBXmNset\fP resource is \fBXmINDETERMINATE\fP,
and the \fBCore\fP \fBXmNsensitive\fP resource is True\&.
.IP "\fBXmNindicatorOn\fP" 10
Specifies that if a toggle indicator is to be drawn, it will be drawn
to one side of the toggle
text or pixmap, depending on the \fBXmNlayoutDirection\fP resource of
the widget\&. The default value is \fBXmINDICATOR_FILL\fP\&.
Toggles accept the following values:
.RS
.IP "\fBXmINDICATOR_NONE\fP" 10
No space is allocated
for the indicator, and it is not displayed\&. Any shadows around the
entire widget are switched when the toggle is selected or unselected\&.
.IP "\fBXmINDICATOR_BOX\fP" 10
The toggle indicator is in the shape of a shadowed box\&.
.IP "\fBXmINDICATOR_FILL\fP" 10
If the value of the
\fBXmDisplay XmNenableToggleVisual\fP
resource is
\fBTrue\fP
, the visuals are those of
\fBXmINDICATOR_CHECK_BOX\fP
; if
\fBFalse\fP
, the indicator visuals are those of
\fBXmINDICATOR_BOX\fP\&.
.IP "\fBXmINDICATOR_CHECK\fP" 10
The toggle indicator is in the shape of a checkmark in the
foreground color\&.
.IP "\fBXmINDICATOR_CHECK_BOX\fP" 10
The toggle indicator is in the shape of a checkmark enclosed in a box\&.
This is the default if the \fBXmDisplay XmNenableToggleVisual\fP
resource is set\&.
.IP "\fBXmINDICATOR_CROSS_BOX\fP" 10
The toggle indicator is in the shape of a cross enclosed in a box\&.
.IP "\fBXmINDICATOR_CROSS\fP" 10
The toggle indicator is in the shape of a cross\&.
.RE
.IP "" 10
All ToggleButton checks and crosses should be drawn in the
foreground color\&.
.IP "" 10
If this resource is not \fBXmINDICATOR_NONE\fP, it will control the
appearance of the toggle visual\&. If \fBXmNset\fP is
\fBXmINDETERMINATE\fP and \fBXmNindicatorOn\fP is not
\fBXmINDICATOR_NONE\fP, this resource
shows a stippled flat box\&.
If \fBXmNset\fP is \fBXmINDETERMINATE\fP, \fBXmNindicatorOn\fP is
\fBXmINDICATOR_NONE\fP, and \fBXmNtoggleMode\fP is
\fBXmTOGGLE_INDETERMINATE\fP, the label and the ToggleButton are stippled with
a combination of the \fBXmNselectColor\fP and
the \fBXmNunselectColor\fP color,
and the border is flat\&.
.IP "\fBXmNindicatorSize\fP" 10
Sets the size of the indicator\&.
If no value is specified, the size of the indicator is based on the size
of the label string or pixmap\&.
If the label string or pixmap changes, the size of the indicator is
recomputed based on the size of the label string or pixmap\&.
Once a
value has been specified for \fBXmNindicatorSize\fP, the
indicator has that size, regardless of the size of the label string or
pixmap, until a new value is specified\&.
The size of indicators inside menus may differ from those outside of menus\&.
Note that a change in this resource may also cause a change in the
values of the inherited resources \fBXmNmarginTop\fP,
\fBXmNmarginBottom\fP, and \fBXmNmarginLeft\fP\&.
.IP "\fBXmNindicatorType\fP" 10
Specifies if the indicator is a \fB1-of\fP or
\fBN-of\fP indicator\&. For the \fB1-of\fP indicator, the
value can be \fBXmONE_OF_MANY\fP,
\fBXmONE_OF_MANY_ROUND\fP, or
\fBXmONE_OF_MANY_DIAMOND\fP\&.
For the \fBN-of\fP indicator,
the value is \fBXmN_OF_MANY\fP\&.
This value specifies only the visuals and does not enforce the
behavior\&. When the ToggleButton is in a radio box, the default is
\fBXmONE_OF_MANY\fP; otherwise,
the default is
\fBXmN_OF_MANY\fP\&. Legal values
are:
.RS
.IP "\fBXmONE_OF_MANY\fP" 10
When the Display \fBXmNenableToggleVisual\fP
resource is set,
indicators are drawn with the same appearance as
\fBXmONE_OF_MANY_ROUND\fP;
otherwise, they appear the same as
\fBXmONE_OF_MANY_DIAMOND\fP\&.
.IP "\fBXmN_OF_MANY\fP" 10
The indicators are drawn as specified by the
\fBXmNindicatorOn\fP
resource\&.
.IP "\fBXmONE_OF_MANY_ROUND\fP" 10
A shadowed circle\&.
.IP "\fBXmONE_OF_MANY_DIAMOND\fP" 10
A shadowed diamond\&.
.RE
.IP "\fBXmNselectColor\fP" 10
Allows the application to specify what color fills
the center of the square, diamond-shaped, or round indicator when it is set\&.
If this color is the same as either the top or the bottom shadow color of the
indicator, a one-pixel-wide margin is left between the shadows and the fill;
otherwise, it is filled completely\&.
The results of this resource depend on the value of the Display
resource \fBXmNenableToggleColor\fP\&. A value of True causes the fill
color to use the \fBXmHIGHLIGHT_COLOR\fP color by default\&. A value of False
causes the fill
color to use the background color\&.
This resource\&'s default for a color display is a color between the background
and the bottom shadow color\&. For a monochrome display, the default is set to
the foreground color\&. To set the background of the button to
\fBXmNselectColor\fP when \fBXmNindicatorOn\fP is \fBXmINDICATOR_NONE\fP,
the value of
\fBXmNfillOnSelect\fP must be explicitly set to True\&.
.IP "" 10
This resource can take the following values:
.RS
.IP "\fBXmDEFAULT_SELECT_COLOR\fP" 10
Is the same as the current dynamic default, which is a color between
the background and the bottom shadow color\&.
.IP "\fBXmREVERSED_GROUND_COLORS\fP" 10
Forces the select color to the
foreground color and causes the default color of any text rendered over the
select color to be in the background color\&.
.IP "\fBXmHIGHLIGHT_COLOR\fP" 10
Forces the fill color to use the highlight color\&.
.RE
.IP "\fBXmNselectInsensitivePixmap\fP" 10
Specifies a pixmap used as the button face when the ToggleButtonGadget
is selected,
the button is insensitive, and the LabelGadget resource \fBXmNlabelType\fP
is \fBXmPIXMAP\fP or \fBXmPIXMAP_AND_STRING\fP\&. If the ToggleButtonGadget
is unselected and the button is insensitive, the pixmap in
\fBXmNlabelInsensitivePixmap\fP is used as the button face\&.
If no value is specified for \fBXmNlabelInsensitivePixmap\fP, that
resource is set to the value specified for
\fBXmNselectInsensitivePixmap\fP\&.
.IP "\fBXmNselectPixmap\fP" 10
Specifies the pixmap to be used as the button
face if \fBXmNlabelType\fP is \fBXmPIXMAP\fP or \fBXmPIXMAP_AND_STRING\fP, and
the ToggleButtonGadget is selected\&.
When the ToggleButtonGadget is unselected,
the pixmap specified in LabelGadget\&'s \fBXmNlabelPixmap\fP is used\&.
If no value is specified for \fBXmNlabelPixmap\fP, that resource is set
to the value specified for \fBXmNselectPixmap\fP\&.
.IP "\fBXmNset\fP" 10
Represents the state of the ToggleButton\&. A value of \fBXmUNSET\fP indicates
that the ToggleButton is not set\&. A value of \fBXmSET\fP indicates that
the ToggleButton is set\&. A value of \fBXmINDETERMINATE\fP indicates that the
ToggleButton is in an indeterminate state (neither set nor unset)\&.
The ToggleButton states cycle through in the order of \fBXmSET\fP,
\fBXmINDETERMINATE\fP (if \fBXmNtoggleMode\fP is set to
\fBXmTOGGLE_INDETERMINATE\fP), and \fBXmUNSET\fP, and then
back around to \fBXmSET\fP\&. If \fBXmNtoggleMode\fP is
set to \fBXmTOGGLE_BOOLEAN\fP, then the ToggleButton states cycle
through in the order of \fBXmSET\fP, then \fBXmUNSET\fP, and then
back around to \fBXmSET\fP\&.
Setting this resource sets the state of the
ToggleButton\&.
.IP "\fBXmNspacing\fP" 10
Specifies the amount of spacing between the toggle indicator and the
toggle label (text or pixmap)\&.
.IP "\fBXmNtoggleMode\fP" 10
Specifies the mode of the ToggleButtonGadget as either
\fBXmTOGGLE_BOOLEAN\fP or \fBXmTOGGLE_INDETERMINATE\fP\&. The
\fBXmTOGGLE_INDETERMINATE\fP value allows the \fBXmNset\fP resource to
be able to accept the values \fBXmINDETERMINATE\fP, \fBXmSET\fP, and
\fBXmUNSET\fP\&. The \fBXmNtoggleMode\fP resource is forced to
\fBXmTOGGLE_BOOLEAN\fP if the toggle is in an \fBXmRowColumn\fP widget
whose radio behavior is \fBXmONE_OF_MANY\fP\&. In
\fBXmTOGGLE_BOOLEAN\fP mode, the \fBXmNset\fP resource can only accept
\fBXmSET\fP and \fBXmUNSET\fP\&.
.IP "\fBXmNunselectColor\fP" 10
Allows the application to specify what color fills
the center of the square, diamond-shaped, or round indicator when it
is not set\&.
If this color is the same as either the top or the bottom shadow color of the
indicator, a one-pixel-wide margin is left between the shadows and the fill;
otherwise, it is filled completely\&.
This resource\&'s default for a color display is \fBXmNbackground\fP\&.
For a monochrome display, the default is set to
the background color\&. To set the background of the button to
\fBXmNunselectColor\fP when \fBXmNindicatorOn\fP is
\fBXmINDICATOR_NONE\fP, the value of
\fBXmNfillOnSelect\fP must be explicitly set to True\&. This resource
acts like the \fBXmNselectColor\fP resource, but for the case when
\fBXmNset\fP is \fBXmUNSET\fP\&.
.IP "\fBXmNvalueChangedCallback\fP" 10
Specifies a list of callbacks
called when the ToggleButtonGadget value
is changed\&. To change the value,
press and release the active mouse button while the pointer
is inside the ToggleButtonGadget\&. This action
also causes the gadget to be disarmed\&.
For this callback, the reason is \fBXmCR_VALUE_CHANGED\fP\&.
.IP "\fBXmNvisibleWhenOff\fP" 10
Indicates that the toggle indicator is visible in the unselected state when
the Boolean value is True\&.
When the ToggleButtonGadget is in a menu, the default value is False\&.
When the ToggleButtonGadget is in a RadioBox, the default value is True\&.
.SS "Inherited Resources"
.PP
ToggleButtonGadget inherits behavior and resources from the
superclasses described in the following tables\&.
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.
\fBXmLabelGadget Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNacceleratorXmCAcceleratorStringNULLCSG
_____
XmNacceleratorTextXmCAcceleratorTextXmStringNULLCSG
_____
XmNalignmentXmCAlignmentunsigned chardynamicCSG
_____
XmNfontListXmCFontListXmFontListdynamicCSG
_____
XmNlabelInsensitivePixmapXmCLabelInsensitivePixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNlabelPixmapXmCLabelPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNlabelStringXmCXmStringXmStringdynamicCSG
_____
XmNlabelTypeXmCLabelTypeunsigned charXmSTRINGCSG
_____
XmNmarginBottomXmCMarginBottomDimensiondynamicCSG
_____
XmNmarginHeightXmCMarginHeightDimension2CSG
_____
XmNmarginLeftXmCMarginLeftDimensiondynamicCSG
_____
XmNmarginRightXmCMarginRightDimension0CSG
_____
XmNmarginTopXmCMarginTopDimensiondynamicCSG
_____
XmNmarginWidthXmCMarginWidthDimension2CSG
_____
XmNmnemonicXmCMnemonicKeySymNULLCSG
_____
XmNmnemonicCharSetXmCMnemonicCharSetStringdynamicCSG
_____
XmNpixmapPlacementXmCPixmapPlacementunsigned intXmPIXMAP_LEFTCSG
_____
XmNpixmapTextPaddingXmCSpaceDimension2CSG
_____
XmNrecomputeSizeXmCRecomputeSizeBooleanTrueCSG
_____
XmNrenderTableXmCRenderTableXmRenderTabledynamicCSG
_____
XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCSG
_____
.TE
.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
_____
XmNshadowThicknessXmCShadowThicknessDimensiondynamicCSG
_____
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
_____
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
_____
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
_____
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
_____
XmNuserDataXmCUserDataXtPointerNULLCSG
_____
.TE
.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;
        int \fIset\fP;
} XmToggleButtonCallbackStruct;
.fi
.IP "\fIreason\fP" 10
Indicates why the callback was invoked
.IP "\fIevent\fP" 10
Points to the \fBXEvent\fP that triggered the callback
.IP "\fIset\fP" 10
Reflects the ToggleButtonGadget\&'s state, either
\fBXmSET\fP (selected), \fBXmUNSET\fP (unselected), or
\fBXmINDETERMINATE\fP (neither)\&.
Note that the reported state is the state that the ToggleButtonGadget
is in after the \fIevent\fP has been processed\&. For example,
suppose that a user clicks on a ToggleButtonGadget to change it from
the unselected state to the selected state\&. In this case,
ToggleButtonGadget changes the value of \fIset\fP from \fBXmUNSET\fP
to \fBXmSET\fP prior to calling the callback\&.
.SS "Behavior"
.PP
\fBXmToggleButtonGadget\fP includes behavior from \fBXmGadget\fP\&.
\fBXmToggleButtonGadget\fP includes menu traversal behavior from \fBXmLabelGadget\fP\&.
Additional \fBXmToggleButtonGadget\fP behavior is described in the
following list:
.IP "\fB<Btn2Down>\fP:" 10
Drags the contents of a ToggleButtonGadget label, identified when
\fB<Btn2>\fP is pressed\&.
This action is undefined for ToggleButtonGadgets used in a menu system\&.
.IP "\fB<Btn1Down>\fP:" 10
In a menu, this action unposts any menus posted by the ToggleButtonGadget\&'s
parent menu,
disables keyboard traversal for the menu, and enables mouse traversal
for the menu\&.
It draws the shadow in the armed state
and, unless the button is already armed, calls the \fBXmNarmCallback\fP
callbacks\&.
.IP "" 10
Outside a menu, if the button was previously unset, this action does the
following:
if \fBXmNindicatorOn\fP is True, it draws the indicator shadow so that
the indicator looks pressed; if \fBXmNfillOnSelect\fP is True, it fills
the indicator with the color specified by \fBXmNselectColor\fP\&.
If \fBXmNindicatorOn\fP is False, it draws the button shadow so that the
button looks pressed\&.
If \fBXmNlabelType\fP is \fBXmPIXMAP\fP or \fBXmPIXMAP_AND_STRING\fP,
the \fBXmNselectPixmap\fP is used as the button face\&.
This resource calls the \fBXmNarmCallback\fP callbacks\&.
.IP "" 10
Outside a menu, if the button was previously set, this action does the
following:
if both \fBXmNindicatorOn\fP and \fBXmNvisibleWhenOff\fP are True, it
draws the indicator shadow so that the indicator looks raised; if
\fBXmNfillOnSelect\fP is True, it fills the indicator with the
background color\&.
If \fBXmNindicatorOn\fP is False, it draws the button shadow so that the
button looks raised\&.
If \fBXmNlabelType\fP is \fBXmPIXMAP\fP or \fBXmPIXMAP_AND_STRING\fP,
the \fBXmNlabelPixmap\fP is used as the button face\&.
This resource calls the \fBXmNarmCallback\fP callbacks\&.
.IP "\fB<Btn1Up>\fP:" 10
In a menu, this action
unposts all menus in the menu hierarchy\&.
If the ToggleButtonGadget was previously set, this action
unsets it; if the ToggleButtonGadget
was previously unset, this action sets it\&.
It calls the \fBXmNvalueChangedCallback\fP callbacks and then the
\fBXmNdisarmCallback\fP callbacks\&.
.IP "" 10
If the button is outside a menu and the pointer is within the button,
this action does the following:
if the button was previously unset, sets it; if the button was
previously set, unsets it\&.
This action calls the \fBXmNvalueChangedCallback\fP callbacks\&.
.IP "" 10
If the button is outside a menu, this action calls the \fBXmNdisarmCallback\fP
callbacks\&.
.IP "\fB<Key>\fP\fB<osfHelp>\fP:" 10
In a Pulldown or Popup MenuPane, unposts all menus in the menu hierarchy
and,
when the shell\&'s keyboard focus policy is
\fBXmEXPLICIT\fP,
restores keyboard focus to the widget that had the focus before
the menu system was entered\&.
Calls the callbacks for \fBXmNhelpCallback\fP if any exist\&.
If there are no help callbacks for this widget, this action calls the
help callbacks for the nearest ancestor that has them\&.
.IP "\fB<Key>\fP\fB<osfActivate>\fP:" 10
In a menu, this action unposts all menus in the menu hierarchy\&.
Unless the button is already armed, this action calls the \fBXmNarmCallback\fP
callbacks; and calls the \fBXmNvalueChangedCallback\fP and
\fBXmNdisarmCallback\fP callbacks\&. Outside a menu,
if the parent is a manager, this action passes the event to the parent\&.
.IP "\fB<Key>\fP\fB<osfSelect>\fP:" 10
If the ToggleButtonGadget was previously set, this action unsets it; if the
ToggleButtonGadget was previously unset, this action sets it\&.
.IP "" 10
In a menu, this action
unposts all menus in the menu hierarchy\&.
Unless the button is already armed,
this action calls the \fBXmNarmCallback\fP,
the \fBXmNvalueChangedCallback\fP, and
\fBXmNdisarmCallback\fP callbacks\&.
.IP "" 10
Outside a menu, if the button was previously unset, this action does the
following:
If \fBXmNindicatorOn\fP is True, it draws the indicator shadow so that
the indicator looks pressed; if \fBXmNfillOnSelect\fP is True, it fills
the indicator with the color specified by \fBXmNselectColor\fP\&.
If \fBXmNindicatorOn\fP is False, it draws the button shadow so that the
button looks pressed\&.
If \fBXmNlabelType\fP
is \fBXmPIXMAP\fP or \fBXmPIXMAP_AND_STRING\fP, the \fBXmNselectPixmap\fP is
used as the button face\&.
This action calls the \fBXmNarmCallback\fP, \fBXmNvalueChangedCallback\fP,
\fBXmNdisarmCallback\fP callbacks\&.
.IP "" 10
Outside a menu, if the button was previously set, this action does the
following:
If both \fBXmNindicatorOn\fP and \fBXmNvisibleWhenOff\fP are True, it
draws the indicator shadow so that the indicator looks raised; if
\fBXmNfillOnSelect\fP is True, it fills the indicator with the
background color\&.
If \fBXmNindicatorOn\fP is False, it draws the button shadow so that the
button looks raised\&.
If \fBXmNlabelType\fP is \fBXmPIXMAP\fP or \fBXmPIXMAP_AND_STRING\fP,
the \fBXmNlabelPixmap\fP is used as the button face\&.
Calls the \fBXmNarmCallback\fP, \fBXmNvalueChangedCallback\fP, and
\fBXmNdisarmCallback\fP callbacks\&.
.IP "\fB<Key>\fP\fB<osfCancel>\fP:" 10
In a toplevel Pulldown MenuPane from a MenuBar, unposts the menu,
disarms the MenuBar CascadeButton and the MenuBar, and,
when the shell\&'s keyboard focus policy is
\fBXmEXPLICIT\fP,
restores keyboard
focus to the widget that had the focus before the MenuBar was
entered\&.
In other Pulldown MenuPanes, this action unposts the menu\&.
Outside a menu, if the parent is a manager, this action passes the event to the
parent\&.
.IP "" 10
In a Popup MenuPane, this action unposts the menu and restores keyboard focus to the
widget from which the menu was posted\&.
.IP "\fB<Enter>\fP:" 10
In a menu, if keyboard traversal is enabled, this action does nothing\&.
Otherwise, it draws the shadow in the armed state and calls the
\fBXmNarmCallback\fP callbacks\&.
.IP "" 10
If the ToggleButtonGadget is not in a menu and the cursor leaves and then
reenters the ToggleButtonGadget while the button is pressed, this
action restores the button\&'s armed appearance\&.
.IP "\fB<Leave>\fP:" 10
In a menu, if keyboard traversal is enabled, this action does nothing\&.
Otherwise, it draws the shadow in the unarmed state and calls the
\fBXmNdisarmCallback\fP callbacks\&.
.IP "" 10
If the ToggleButtonGadget is not in a menu and the cursor leaves the
ToggleButtonGadget while the button is pressed, this action restores
the button\&'s unarmed appearance\&.
.SS "Virtual Bindings"
.PP
The bindings for virtual keys are vendor specific\&.
For information about bindings for virtual buttons and keys, see \fBVirtualBindings\fP(3)\&.
.SH "RELATED"
.PP
\fBObject\fP(3),
\fBRectObj\fP(3),
\fBXmCreateRadioBox\fP(3),
\fBXmCreateToggleButtonGadget\fP(3),
\fBXmGadget\fP(3),
\fBXmLabelGadget\fP(3),
\fBXmRowColumn\fP(3),
\fBXmToggleButtonGadgetGetState\fP(3),
\fBXmToggleButtonGadgetSetState\fP(3),
\fBXmVaCreateToggleButtonGadget\fP(3), and
\fBXmVaCreateManagedToggleButtonGadget\fP(3)\&.