File: XmComboBox.3

package info (click to toggle)
motif 2.3.4-6%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 80,460 kB
  • ctags: 51,584
  • sloc: ansic: 596,738; cpp: 3,951; yacc: 2,854; makefile: 2,063; csh: 1,199; sh: 1,051; lex: 455
file content (699 lines) | stat: -rw-r--r-- 26,181 bytes parent folder | download | duplicates (6)
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
'\" t
...\" ComboBox.sgm /main/16 1996/10/29 16:07: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 "XmComboBox" "library call"
.SH "NAME"
\fBXmComboBox\fP \(em The ComboBox widget class
.iX "XmComboBox"
.iX "widget class" "ComboBox"
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/ComboBox\&.h>
.fi
.SH "DESCRIPTION"
.PP
\fBXmComboBox\fP combines the capabilities of a single-line
TextField widget
and a List widget\&. It allows users to perform opoerations like
typing and pasting information, and it also
provides a list of possible choices that the user
can select from to complete
the TextField entry field\&. The list can either be displayed at all
times or can be dropped down by the user\&. When the list portion of the
ComboBox is hidden, users are given a visual cue (a
downward-pointing arrow)
next to the TextField field\&. The position of the arrow relative to the
TextField field depends on the \fBXmNlayoutDirection\fP resource of the
widget\&. This
version of the
ComboBox is called
the "drop-down" ComboBox\&. Drop-down ComboBoxes are useful
when screen space is limited, or when users will
complete the text entry field more often by typing text than by
selecting the entry field text from the list\&.
The user can access the drop-down ComboBox in either one of two ways:
.IP "   \(bu" 6
By clicking and releasing \fB<Btn1>\fP on the downward-pointing arrow,
which
pops the list up, and the list stays up\&. A later selection of an item
in the list will cause the item to appear in the text entry field, and
the list will unpost itself\&.
.IP "   \(bu" 6
By pressing \fB<Btn1>\fP on the downward-pointing arrow, dragging
it to a list item, and then releasing it there, which selects that
item\&. The list
disappears, and the selected item appears in the text entry field\&.
.PP
The application provides an array of strings that fill the list\&. At
creation time, string items can be passed to the ComboBox via an
arglist\&.
Each string becomes an item in the list, with the first string becoming
the item in position 1, the second string becoming the item in position 2,
and so on\&. The size of the list is
set by specifying the number of items that are visible in the list
(\fBXmNvisibleItemCount\fP)\&. If the number of items in the list exceeds the
number of items that are visible, a vertical scroll bar will
automatically appear that allows the user to scroll through a
large number of items\&.
.PP
ComboBox creates two child widgets: a TextField widget for entering
text and a ScrolledWindow containing a List for the list of items\&.
The name of the items list itself is \fBList\fP, and the name of the
TextField is \fBText\fP\&.
The application or user can specify resource values for these widgets in
a resource file, and the application can use \fBXtNameToWidget\fP
(specifying \fB"*List"\fP for the items list or \fB"*Text"\fP for the
TextField widget) to obtain the widget IDs of the
descendant widgets\&.
At creation time, ComboBox passes appropriate resource values in the
creation arglist, including \fBXmNitems\fP, to the items list\&.
Note that the result of providing the \fBXmNdestroyCallback\fP
resource in the creation \fIarglist\fP is unspecified\&. The
application should use the \fBXtAddCallback\fP function to add
callbacks to the appropriate widget (TextField or List) after
creating it\&.
.PP
ComboBox forces the following resource values
on its List child:
.IP "   \(bu" 6
If \fBXmNcomboBoxType\fP is \fBXmCOMBO_BOX\fP,
\fBXmNtraversalOn\fP is forced to False\&.
.IP "   \(bu" 6
\fBXmNhighlightThickness\fP is forced to 2 in a drop-down ComboBox and
to 0 in other types of ComboBoxes\&.
.IP "   \(bu" 6
\fBXmNborderWidth\fP is forced to 0\&.
.IP "   \(bu" 6
\fBXmNnavigationType\fP is forced to \fBXmNONE\fP\&.
.IP "   \(bu" 6
\fBXmNselectionPolicy\fP is forced to \fBXmBROWSE_SELECT\fP\&.
.IP "   \(bu" 6
\fBXmNlistSizePolicy\fP is forced to \fBXmVARIABLE\fP\&.
.IP "   \(bu" 6
\fBXmNspacing\fP is forced to 0\&.
.IP "   \(bu" 6
\fBXmNvisualPolicy\fP is forced to \fBXmVARIABLE\fP\&.
.IP "   \(bu" 6
\fBXmNselectedPositions\fP is forced to NULL\&.
.IP "   \(bu" 6
\fBXmNselectedPositionsCount\fP is forced to 0\&.
.PP
When \fBXmNcomboBoxType\fP is \fBXmDROP_DOWN_LIST\fP,
ComboBox forces the following resource values on
its TextField child:
.IP "   \(bu" 6
\fBXmNeditable\fP is forced to False\&.
.IP "   \(bu" 6
\fBXmNcursorPositionVisible\fP is forced to False\&.
.IP "   \(bu" 6
\fBXmNshadowThickness\fP is forced to 0\&.
.PP
By contrast, when \fBXmNcomboBoxType\fP is \fBXmCOMBO_BOX\fP or
\fBXmDROP_DOWN_COMBO_BOX\fP, ComboBox forces the following
resource values on its TextField child:
.IP "   \(bu" 6
\fBXmNeditable\fP is forced to True\&.
.IP "   \(bu" 6
\fBXmNcursorPositionVisible\fP is forced to True\&.
.IP "   \(bu" 6
\fBXmNeditMode\fP is forced to \fBXmSINGLE_LINE_EDIT\fP\&.
.PP
ComboBox always forces the values of the following resources on
the TextField:
.IP "   \(bu" 6
\fBXmNnavigationType\fP is forced to \fBXmNONE\fP\&.
.IP "   \(bu" 6
\fBXmNhighlightThickness\fP is forced to 0\&.
.IP "   \(bu" 6
\fBXmNborderWidth\fP is forced to 0\&.
.PP
ComboBox allows a single item to be selected in two ways: by
selecting the desired item from the List or by entering text
into the TextField\&.
ComboBox does not automatically select a list item if the user types
that string into the TextField\&. It selects the item when the user
presses \fBKActivate\fP or moves the focus\&.
ComboBox supports the Browse
Select selection model of List (see the \fBXmList\fP reference page
for a description of this model), so selections are mutually
exclusive\&. Selecting an item from the list causes
that item to be displayed in the TextField portion of the
ComboBox\&.
If an application sets the \fBXmNvalue\fP resource of TextField,
that string is shown in the TextField\&.
If the application has not provided any list items,
or if there is no current selection, the TextField
is empty\&.
.PP
The TextField in the ComboBox widget
can be either editable or noneditable, depending on the value of
the \fBXmNcomboBoxType\fP resource\&.
.PP
If the TextField is editable, the user can type into it\&.
When the user presses the Return key, the ComboBox will
compare the typed entry to the items in the List\&.
If there is an exact match, then the matched List item is
selected\&.
If the application wishes to validate the entered text (for example, to
ensure that the typed selection is a valid one), it can do so by
setting \fBXmNmodifyVerifyCallback\fP on the TextField widget\&.
.PP
If the TextField is noneditable, typing text may invoke a matching
algorithm that will attempt to match the entered text with items in
the list\&. The specific matching algorithm applied, which may be none,
is determined by the value of the \fBXmNmatchBehavior\fP resource in
ComboBox, which can be either \fBXmNONE\fP or
\fBXmQUICK_NAVIGATE\fP\&. A value
of \fBXmNONE\fP indicates that no matching algorithm will occur\&. A value of
\fBXmQUICK_NAVIGATE\fP indicates that when the List widget has focus,
one-character navigation is supported\&. In this algorithm, if the typed
character is the initial character of some item in the List, this
algorithm causes that item to be navigated to and selected, and the
item is displayed in the TextField\&. Subsequently typing the same
character will cycle among the items with the same first character\&.
.PP
Regardless of the selection mechanism used (either selected directly
from the List or typed into the TextField), when an item in the
List is selected, that item is highlighted in the List\&.
In addition, the selected item is displayed in the
TextField of the ComboBox\&. If the user performs an action
that would move focus away from ComboBox, or selects a List item,
the \fBXmNselectionCallback\fP callbacks are invoked to notify
the application of the current contents of the TextField (or choice)\&. The
application then takes whatever action is required based on those
contents (or choice)\&.
.PP
ComboBox uses the \fBXmQTspecifyRenderTable\fP trait and holds the
\fBXmQTaccessTextual\fP trait\&.
.SS "Classes"
.PP
\fBXmComboBox\fP inherits behavior, resources, and traits from \fBCore\fP,
\fBComposite\fP,
and \fBXmManager\fP classes\&.
.PP
The class pointer is \fBxmComboBoxWidgetClass\fP\&.
.PP
The class name is \fBXmComboBox\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 at
creation time (C), set by using \fBXtSetValues\fP (S), retrieved by
using \fBXtGetValues\fP (G), or is not applicable (N/A)\&.
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmComboBox Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNarrowSizeXmCArrowSizeDimensiondynamicCSG
_____
XmNarrowSpacingXmCArrowSpacingDimensiondynamicCSG
_____
XmNcolumnsXmCColumnshortdynamicCSG
_____
XmNcomboBoxTypeXmCComboBoxTypeunsigned charXmCOMBO_BOXCG
_____
XmNfontListXmCFontListXmFontListNULLCSG
_____
XmNhighlightThicknessXmCHighlightThicknessDimension2CSG
_____
XmNitemCountXmCItemCountintdynamicCSG
_____
XmNitemsXmCItemsXmStringTabledynamicCSG
_____
XmNlistXmCListWidgetdynamicG
_____
XmNmarginHeightXmCMarginHeightDimension2CSG
_____
XmNmarginWidthXmCMarginWidthDimension2CSG
_____
XmNmatchBehaviorXmCMatchBehaviorunsigned chardynamicCSG
_____
XmNpositionModeXmCPositionModeXtEnumXmZERO_BASEDCG
_____
XmNrenderTableXmCRenderTableXmRenderTabledynamicCSG
_____
XmNselectedItemXmCSelectedItemXmStringNULLCSG
_____
XmNselectedPositionXmCSelectedPositionintdynamicCSG
_____
XmNselectionCallbackXmCCallbackXmCallbackListNULLC
_____
XmtextFieldXmCTextFieldWidgetdynamicG
_____
XmNvisibleItemCountXmCVisibleItemCountint10CSG
_____
.TE
.IP "\fBXmNarrowSize\fP" 10
Specifies the width of the arrow\&. The default size
depends on the size of the text, as well as
the size of the ComboBox\&.
.IP "\fBXmNarrowSpacing\fP" 10
Specifies the space between the text and arrow visual in pixels\&. The
default value is obtained from the \fBXmNmarginWidth\fP resource\&.
.IP "\fBXmNcolumns\fP" 10
Specifies the number of columns in the text field\&. If unset,
the text field\&'s value is used\&. Refer to the \fBXmTextField\fP man page
for more detailed information\&.
.IP "\fBXmNcomboBoxType\fP" 10
Specifies the type of ComboBox to be created\&. This can be one of
the following:
.RS
.IP "\fBXmCOMBO_BOX\fP" 10
Generates a ComboBox where the list is always displayed, and the text
entry field is editable\&.
.IP "\fBXmDROP_DOWN_COMBO_BOX\fP" 10
Generates a ComboBox where the list is hidden unless specifically
requested, and the text entry field is editable\&.
.IP "\fBXmDROP_DOWN_LIST\fP" 10
Generates a ComboBox where the list is hidden unless specifically
requested, and the text entry field is noneditable\&.
.RE
.IP "\fBXmNfontList\fP" 10
Specifies the fontlist associated with \fBXmComboBox\fP\&. The fontlist
is an obsolete construct, and has been superseded by the render table\&.
It is included for compatibility with earlier versions of Motif, and
for applications that do not easily support render tables\&. The
default fontlist is derived from the default render table, and if
both a fontlist and a render table are specified, the render table
takes precedence\&.
.IP "\fBXmNhighlightThickness\fP" 10
Specifies the thickness of the highlighting rectangle\&.
.IP "\fBXmNitemCount\fP" 10
Specifies the number of items in the list\&. If unset,
the lists\&'s value is used\&.
Refer to the \fBXmList\fP man page for more detailed information\&.
.IP "\fBXmNitems\fP" 10
Specifies the items in the list\&. If unset,
the lists\&'s value is used\&. Refer to the \fBXmList\fP man page for more detailed information\&.
.IP "\fBXmNlist\fP" 10
The list widget\&.
.IP "\fBXmNmarginWidth\fP" 10
Specifies the horizontal spacing between the child widgets and the boundary
of the ComboBox\&.
.IP "\fBXmNmarginHeight\fP" 10
Specifies the vertical spacing between the child widgets and the boundary
of the ComboBox\&.
.IP "\fBXmNmatchBehavior\fP" 10
Defines the matching algorithm applied to match the text
typed by the user in the TextField field with items in the list\&.
The current values are \fBXmNONE\fP and \fBXmQUICK_NAVIGATE\fP, as follows:
.RS
.IP "\fBXmNONE\fP" 10
Indicates that there is no assigned matching algorithm\&.
.IP "\fBXmQUICK_NAVIGATE\fP" 10
Is only valid for noneditable ComboBoxes (\fBXmNcomboBoxType\fP resource value
\fBXmDROP_DOWN_LIST\fP)\&. This algorithm supports 1-character navigation
when the List widget has focus\&. If the typed character is the
initial character of some item in the List, this algorithm causes
that item to be navigated to and selected\&. Subsequently typing the
same character will cycle among the items with the same first character\&.
.RE
.IP "\fBXmNpositionMode\fP" 10
Specifies how the value of the
\fBXmNselectedPosition\fP
resource and the \fBitem_position\fP field
of the callback structure are to be interpreted\&. Note that
the convenience functions \fBXmComboBoxDeletePos\fP and \fBXmComboBoxAddItem\fP
are not affected by this resource, and (like \fBXmList\fP) always use
1-based positions\&. Valid values for this resource are:
.RS
.IP "\fBXmZERO_BASED\fP" 10
(DtComboBox compatibility mode: default) \fBXmNselectedPosition\fP
is in \fB[0,itemcount-1]\fP\&.
The \fBitem_position\fP in the \fBXmComboBoxCallbackStruct\fP
is 0 if the first element in the list
was selected\&. Note that 0 is also returned if no element in the list
was selected (that is, a new item was entered in the text field)\&.
.IP "\fBXmONE_BASED\fP" 10
(Motif mode) Both the resource value and the callback fields
are 1-based\&. This is consistent with other Motif widgets\&.
.RE
.IP "\fBXmNrenderTable\fP" 10
Specifies the render table associated with ComboBox\&.
This render table is used in both the TextField field and the
List in the ComboBox\&. This is used in conjunction with the
\fBXmNvisibleItemCount\fP resource of the List to determine the height
of the ComboBox widget\&.
.IP "" 10
If this value is NULL at initialization, and if the widget parent is
\fBXmBulletinBoard\fP or its subclasses,
\fBVendorShell\fP or its subclasses, or \fBXmMenuShell\fP, then the
widget parent provides the default render table associated with
the widget\&.
If both a render table and a fontlist are specified, the render table
will take precedence\&.
.IP "\fBXmNselectedItem\fP" 10
Specifies a compound string that represents the current selection of
the ComboBox\&. The selected item is the content of the
ComboBox text entry field\&.
.IP "\fBXmNselectedPosition\fP" 10
If the selection in the ComboBox is an item in the list, this is
the index of the selected item in the list\&. If no item in
the list is selected, this is 0\&.
.IP "\fBXmNselectionCallback\fP" 10
Specifies the list of callbacks called when an item is selected\&.
The reason field in the \fBXmComboBoxCallbackStruct\fR is
\fBXmCR_SELECT\fP\&.
.IP "\fBXmNtextField\fP" 10
The text field widget\&.
.IP "\fBXmNvisibleItemCount\fP" 10
Specifies the number of visible items in the list\&. This will override any
value specified for the list\&.
Refer to the \fBXmList\fP man page for more detailed information\&.
.SS "Inherited Resources"
.PP
ComboBox inherits behavior and resources from superclasses described
in the following tables\&. For a complete description of each
resource, refer to the reference page for that superclass\&.
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBXmManager Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG
_____
XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNforegroundXmCForegroundPixeldynamicCSG
_____
XmNhelpCallbackXmCCallbackXtCallbackListNULLC
_____
XmNhighlightColorXmCHighlightColorPixeldynamicCSG
_____
XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG
_____
XmNinitialFocusXmCInitialFocusWidgetNULLCSG
_____
XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG
_____
XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmSTICKY_TAG_GROUPCSG
_____
XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC
_____
XmNshadowThicknessXmCShadowThicknessDimension2CSG
_____
XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCG
_____
XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG
_____
XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG
_____
XmNtraversalOnXmCTraversalOnBooleanTrueCSG
_____
XmNunitTypeXmCUnitTypeunsigned chardynamicCSG
_____
XmNuserDataXmCUserDataXtPointerNULLCSG
_____
.TE
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBComposite Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNchildrenXmCReadOnlyWidgetListNULLG
_____
XmNinsertPositionXmCInsertPositionXtOrderProcNULLCSG
_____
XmNnumChildrenXmCReadOnlyCardinal0G
_____
.TE
.TS
tab() box;
c s s s s
l| l| l| l| l.
\fBCore Resource Set\fP
\fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP
_____
XmNacceleratorsXmCAcceleratorsXtAcceleratorsdynamicCSG
_____
XmNancestorSensitiveXmCSensitiveBooleandynamicG
_____
XmNbackgroundXmCBackgroundPixeldynamicCSG
_____
XmNbackgroundPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderColorXmCBorderColorPixelXtDefaultForegroundCSG
_____
XmNborderPixmapXmCPixmapPixmapXmUNSPECIFIED_PIXMAPCSG
_____
XmNborderWidthXmCBorderWidthDimension0CSG
_____
XmNcolormapXmCColormapColormapdynamicCG
_____
XmNdepthXmCDepthintdynamicCG
_____
XmNdestroyCallbackXmCCallbackXtCallbackListNULLC
_____
XmNheightXmCHeightDimensiondynamicCSG
_____
XmNinitialResourcesPersistentXmCInitialResourcesPersistentBooleanTrueC
_____
XmNmappedWhenManagedXmCMappedWhenManagedBooleanTrueCSG
_____
XmNscreenXmCScreenScreen *dynamicCG
_____
XmNsensitiveXmCSensitiveBooleanTrueCSG
_____
XmNtranslationsXmCTranslationsXtTranslationsdynamicCSG
_____
XmNwidthXmCWidthDimensiondynamicCSG
_____
XmNxXmCPositionPosition0CSG
_____
XmNyXmCPositionPosition0CSG
_____
.TE
.SS "Callback Information"
.PP
A pointer to the following structure is passed to each callback\&.
The callback structure is defined as follows:
.PP
.nf
typedef struct
{
        int \fIreason\fP;
        XEvent *\fIevent\fP;
        XmString \fIitem_or_text\fP;
        int \fIitem_position\fP;
} XmComboBoxCallbackStruct;
.fi
.IP "\fIreason\fP" 10
Indicates why the callback was invoked\&.
.IP "\fIevent\fP" 10
Points to the \fBXEvent\fP that triggered the callback\&. It can be NULL\&.
.IP "\fIitem_or_text\fP" 10
The contents of the text field at the time the event caused the
callback\&. The \fIitem_or_text\fP parameter points to a temporary
storage space that is
reused after the callback is finished\&. If an application needs to save
the item, it should copy \fIitem_or_text\fP into its own data space\&.
.IP "\fIitem_position\fP" 10
The position of item in the list\&'s \fBXmNitems\fP 1-based array\&. If this
is 0, it means that the \fIitem_or_text\fP was not selected from the
List\&.
.SS "Translations"
.PP
The ComboBox translations are listed below\&.
.PP
The following key names are listed in the
X standard key event translation table syntax\&.
This format is the one used by Motif to
specify the widget actions corresponding to a given key\&.
A brief overview of the format is provided under
\fBVirtualBindings\fP(3)\&.
For a complete description of the format, please refer to the
X Toolkit Instrinsics Documentation\&.
.PP
.RS
\fBNote:  
.PP
The KPageUp and KPageDown translations do not take effect unless the
\fBList\fP child widget is posted\&.
.RE
.IP "\fB<Btn1Down>\fP:" 10
CBArmAndDropDownList()
.IP "\fB<Btn1Up>\fP:" 10
CBDisarm()
.PP
The following lists the List translations in the drop-down list\&. When
ComboBox \fBXmNcomboBoxType\fP is
\fBXmDROP_DOWN_LIST\fP,
\fB<osfActivate>\fP, \fB<osfCancel>\fP, and
\fBReturn\fP are overridden by ComboBox actions\&.
.IP "\fB:c\fP <Key>\fB<osfDown>\fP:" 10
CBDropDownList()
.IP "\fB:c\fP <Key>\fB<osfUp>\fP:" 10
CBDropDownList()
.IP "\fB:\fP<Key>\fB<osfCancel>\fP:" 10
CBCancel()
.IP "\fB:\fP<Key>\fB<osfActivate>\fP:" 10
CBActivate()
.IP "\fB\(aps \(apm \(apa\fP<Key>\fBReturn\fP:" 10
CBActivate()
.SS "Accelerators"
.PP
The following accelerators are added to ComboBox and its children\&.
The accelerators may not directly correspond to a translation table\&.
If the translation is not listed below, it may depend on the context
of the event\&.
.IP "\fB:c\fP <Key>\fB<osfUp>\fP:" 10
CBDropDownList()
.IP "\fB:\fP<Key>\fB<osfUp>\fP:" 10
CBListAction(\fBUp\fP)
.IP "\fB:c\fP <Key>\fB<osfDown>\fP:" 10
CBDropDownList()
.IP "\fB:\fP<Key>\fB<osfDown>\fP:" 10
CBListAction(\fBDown\fP)
.IP "\fB:c\fP <Key>\fB<osfBeginLine>\fP:" 10
CBListAction(\fBListBeginData\fP)
.IP "\fB:c\fP <Key>\fB<osfEndLine>\fP:" 10
CBListAction(\fBListEndData\fP)
.IP "\fB:\fP<Key>\fB<osfPageUp>\fP:" 10
CBListAction(\fBListPrevPage\fP)
.IP "\fB:\fP<Key>\fB<osfPageDown>\fP:" 10
CBListAction(\fBListNextPage\fP)
.PP
A drop-down ComboBox also adds accelerators to its List child\&.
Aside from the accelerators that are already listed in this section,
those accelerators are the default TextField key translations\&.
.SS "Action Routines"
.PP
The \fBXmComboBox\fP action routines are as follows:
.IP "CBActivate():" 10
Calls the \fBXmNselectionCallback\fP callbacks\&. If the
\fBXmNcomboBoxType\fP is
\fBXmDROP_DOWN_COMBO_BOX\fP or \fBXmDROP_DOWN_LIST\fP, it unposts the
list\&. If the
parent is a manager, passes the event to the parent\&.
.IP "CBArmAndDropDownList():" 10
If the pointer is within the down arrow, draws the shadow of the arrow
in the selected state, and then posts the list\&.
.IP "CBCancel():" 10
If the \fBXmNcomboBoxType\fP is \fBXmDROP_DOWN_COMBO_BOX\fP or
\fBXmDROP_DOWN_LIST\fP, pops down
the list\&. If the parent is a manager, passes the event to the parent\&.
.IP "CBDisarm():" 10
Redraws the arrow in an unselected state\&.
.IP "CBDropDownList():" 10
If \fBXmNcomboBoxType\fP is \fBXmDROP_DOWN\fP or \fBXmDROP_DOWN_LIST\fP, and
list is not
displayed, posts the list\&. If list is displayed, it unposts the list\&.
.IP "CBListAction(\fBListBeginData\fP):" 10
Moves the location cursor to the first item in the list\&.
In Normal Mode, this also deselects any current selection,
selects the first item in the list, and calls the
\fBXmNbrowseSelectionCallback\fP selection callback\&.
.IP "CBListAction(\fBListEndData\fP):" 10
Moves the location cursor to the last item in the list\&.
In Normal Mode, this also deselects any current selection,
selects the last item in the list, and calls the
\fBXmNbrowseSelectionCallback\fP selection callback\&.
.IP "CBListAction(\fBListPrevPage\fP):" 10
Scrolls the list to the previous page, moving the location cursor to a
new item\&.
This action also selects the new item, deselects any current
selection, and calls the \fBXmNbrowseSelectionCallback\fP callbacks\&.
If the ComboBox is not a drop-down type, then this action does
nothing\&.
.IP "CBListAction(\fBListNextPage\fP):" 10
Scrolls the list to the next page, moving the location cursor to a new
item\&.
This action also selects the new item, deselects any current
selection, and calls the \fBXmNbrowseSelectionCallback\fP callbacks\&.
If the ComboBox is not a drop-down type, then this action does
nothing\&.
.IP "CBListAction(\fBUp\fP):" 10
Moves the location cursor to the previous item in the list\&.
This action also selects the previous item, deselects any current
selection, and calls the \fBXmNbrowseSelectionCallback\fP callbacks\&.
Note that, unlike the List \fBListPrevItem\fP action, this action wraps
around\&.
.IP "CBListAction(\fBDown\fP):" 10
Moves the location cursor to the next item in the list\&.
This action also selects the next item, deselects any current
selection, and calls the \fBXmNbrowseSelectionCallback\fP callbacks\&.
Note that, unlike the List \fBListNextItem\fP action, this action wraps
around\&.
.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 "ERRORS/WARNINGS"
.PP
The toolkit will display a warning if the application tries to
set the value of \fBXmNlist\fP
or the \fBXmNtextField\fP resource, which are read-only (marked G in the resource
table)\&.
.SH "RELATED"
.PP
\fBComposite\fP(3),
\fBCore\fP(3),
\fBXmCreateComboBox\fP(3),
\fBXmList\fP(3),
\fBXmManager\fP(3),
\fBXmTextField\fP(3),
\fBXmVaCreateComboBox\fP(3), and
\fBXmVaCreateManagedComboBox\fP(3)\&.