1XmSelectionBox(library call) XmSelectionBox(library call)
2
3
4
6 XmSelectionBox — The SelectionBox widget class
7
9 #include <Xm/SelectioB.h>
10
12 SelectionBox is a general dialog widget that allows the user to select
13 one item from a list. By default, a SelectionBox includes the follow‐
14 ing:
15
16 · A scrolling list of alternatives
17
18 · An editable text field for the selected alternative
19
20 · Labels for the list and text field
21
22 · Three or four buttons
23
24 The default button labels are OK, Cancel, and Help. By default an
25 Apply button is also created; if the parent of the SelectionBox is a
26 DialogShell, it is managed; otherwise it is unmanaged. Additional
27 children may be added to the SelectionBox after creation. The first
28 child is used as a work area. The value of XmNchildPlacement determines
29 if the work area is placed above or below the Text area, or above or
30 below the List area. Additional children are laid out in the following
31 manner:
32
33 Menubar The first menu bar child is placed at the top of the window.
34 The XmQTmenuSystem trait is used to check that it is the
35 first MenuBar child.
36
37 Buttons All XmPushButton widgets or gadgets, and their subclasses are
38 placed after the OK button in the order of their creation
39 (this order is checked using the XmQTactivatable trait). The
40 layout direction of the buttons depends on the XmNlayoutDi‐
41 rection resource.
42
43 The layout of additional children that are not in the above categories
44 is undefined.
45
46 The user can select an item in two ways: by scrolling through the list
47 and selecting the desired item or by entering the item name directly
48 into the text edit area. Selecting an item from the list causes that
49 item name to appear in the selection text edit area.
50
51 The user may select a new item as many times as desired. The item is
52 not actually selected until the user presses the OK PushButton.
53
54 The default value for the XmBulletinBoard resource XmNcancelButton is
55 the Cancel button, unless XmNdialogType is XmDIALOG_COMMAND, when the
56 default is NULL. The default value for the XmBulletinBoard XmNdefault‐
57 Button resource is the OK button, unless XmNdialogType is XmDIALOG_COM‐
58 MAND, when the default is NULL.
59
60 For SelectionBox and its subclasses, the default value for XmNinitial‐
61 Focus is the text edit area.
62
63 The user can specify resources in a resource file for the automatically
64 created widgets and gadgets of SelectionBox. The following list identi‐
65 fies the names of these widgets (or gadgets) and the associated Selec‐
66 tionBox areas:
67
68 List Items Label
69 Items
70
71 List Items
72 ItemsList
73
74 Selection Label
75 Selection
76
77 Selection Text
78 Text or TextField
79
80 Selection Separator
81 Separator
82
83 SelectionBox uses the XmQTaccessTextual, XmQTactivatable, and XmQT‐
84 menuSystem traits.
85
86 Descendants
87 SelectionBox automatically creates the descendants shown in the follow‐
88 ing table. An application can use XtNameToWidget to gain access to the
89 named descendant. In addition, a user or an application can use the
90 named descendant when specifying resource values.
91
92 ┌─────────────────┬────────────────────┬────────────────────────────────────┐
93 │Named Descendant │ Class │ Identity │
94 ├─────────────────┼────────────────────┼────────────────────────────────────┤
95 ├─────────────────┼────────────────────┼────────────────────────────────────┤
96 ├─────────────────┼────────────────────┼────────────────────────────────────┤
97 │Apply │ XmPushButtonGadget │ Apply button │
98 ├─────────────────┼────────────────────┼────────────────────────────────────┤
99 │Cancel │ XmPushButtonGadget │ Cancel button │
100 ├─────────────────┼────────────────────┼────────────────────────────────────┤
101 │Help │ XmPushButtonGadget │ Help button │
102 ├─────────────────┼────────────────────┼────────────────────────────────────┤
103 │Items │ XmLabelGadget │ title above the list of items │
104 ├─────────────────┼────────────────────┼────────────────────────────────────┤
105 │ItemsList │ XmList │ list of items from which the user │
106 │ │ │ will select │
107 ├─────────────────┼────────────────────┼────────────────────────────────────┤
108 │ItemsListSW │ XmScrolledWindow │ ScrolledWindow parent of ItemsList │
109 ├─────────────────┼────────────────────┼────────────────────────────────────┤
110 │OK │ XmPushButtonGadget │ OK button │
111 ├─────────────────┼────────────────────┼────────────────────────────────────┤
112 │Selection │ XmLabelGadget │ title above the selection box │
113 ├─────────────────┼────────────────────┼────────────────────────────────────┤
114 │Separator │ XmSeparatorGadget │ dividing line between selection │
115 │ │ │ box and buttons │
116 ├─────────────────┼────────────────────┼────────────────────────────────────┤
117 │Text │ XmTextField │ selection box containing text of │
118 │ │ │ selected item │
119 ├─────────────────┼────────────────────┼────────────────────────────────────┤
120 └─────────────────┴────────────────────┴────────────────────────────────────┘
121 Classes
122 SelectionBox inherits behavior, resources, and traits from Core, Com‐
123 posite, Constraint, XmManager, and XmBulletinBoard.
124
125 The class pointer is xmSelectionBoxWidgetClass.
126
127 The class name is XmSelectionBox.
128
129 New Resources
130 The following table defines a set of widget resources used by the pro‐
131 grammer to specify data. The programmer can also set the resource val‐
132 ues for the inherited classes to set attributes for this widget. To
133 reference a resource by name or by class in a .Xdefaults file, remove
134 the XmN or XmC prefix and use the remaining letters. To specify one of
135 the defined values for a resource in a .Xdefaults file, remove the Xm
136 prefix and use the remaining letters (in either lowercase or uppercase,
137 but include any underscores between words). The codes in the access
138 column indicate if the given resource can be set at creation time (C),
139 set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
140 not applicable (N/A).
141
142 ┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
143 │ │ XmSelectionBo│x Resource Set │ │ │
144 │Name │ Class │ Type │ Default │ Access │
145 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
146 │XmNapplyCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
147 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
148 │XmNapplyLabelString │ XmCApplyLabelString │ XmString │ dynamic │ CSG │
149 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
150 │XmNcancelCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
151 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
152 │XmNcancelLabelString │ XmCCancelLabelString │ XmString │ dynamic │ CSG │
153 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
154 │XmNchildPlacement │ XmCChildPlacement │ unsigned char │ XmPLACE_ABOVE_SELECTION │ CSG │
155 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
156 │XmNdialogType │ XmCDialogType │ unsigned char │ dynamic │ CG │
157 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
158 │XmNhelpLabelString │ XmCHelpLabelString │ XmString │ dynamic │ CSG │
159 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
160 │XmNlistItemCount │ XmCItemCount │ int │ 0 │ CSG │
161 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
162 │XmNlistItems │ XmCItems │ XmStringTable │ NULL │ CSG │
163 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
164 │XmNlistLabelString │ XmCListLabelString │ XmString │ dynamic │ CSG │
165 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
166 │XmNlistVisibleItemCount │ XmCVisibleItemCount │ int │ dynamic │ CSG │
167 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
168 │XmNminimizeButtons │ XmCMinimizeButtons │ Boolean │ False │ CSG │
169 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
170 │XmNmustMatch │ XmCMustMatch │ Boolean │ False │ CSG │
171 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
172 │XmNnoMatchCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
173 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
174 │XmNokCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
175 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
176 │XmNokLabelString │ XmCOkLabelString │ XmString │ dynamic │ CSG │
177 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
178 │XmNselectionLabelString │ XmCSelectionLabelString │ XmString │ dynamic │ CSG │
179 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
180 │XmNtextAccelerators │ XmCTextAccelerators │ XtAccelerators │ default │ C │
181 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
182 │XmNtextColumns │ XmCColumns │ short │ dynamic │ CSG │
183 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
184 │XmNtextString │ XmCTextString │ XmString │ "" │ CSG │
185 ├────────────────────────┼─────────────────────────┼────────────────┼─────────────────────────┼────────┤
186 └────────────────────────┴─────────────────────────┴────────────────┴─────────────────────────┴────────┘
187 XmNapplyCallback
188 Specifies the list of callbacks called when the user acti‐
189 vates the Apply button. The callback reason is XmCR_APPLY.
190
191 XmNapplyLabelString
192 Specifies the string label for the Apply button. The default
193 for this resource depends on the locale. In the C locale the
194 default is Apply.
195
196 Now that some default localized label strings are provided
197 through message catalogs for the children of composite wid‐
198 gets, the labelString resources cannot be set on the child
199 through default resource files. Instead, the resource pro‐
200 vided at the parent level must be used.
201
202 XmNcancelCallback
203 Specifies the list of callbacks called when the user acti‐
204 vates the Cancel button. The callback reason is XmCR_CANCEL.
205
206 XmNcancelLabelString
207 Specifies the string label for the Cancel button. The
208 default for this resource depends on the locale. In the C
209 locale the default is Cancel.
210
211 Now that some default localized label strings are provided
212 through message catalogs for the children of composite wid‐
213 gets, the labelString resources cannot be set on the child
214 through default resource files. Instead, the resource pro‐
215 vided at the parent level must be used.
216
217 XmNchildPlacement
218 Specifies the placement of the work area child. The possible
219 values are
220
221 XmPLACE_ABOVE_SELECTION
222 Places the work area child above the Text area
223
224 XmPLACE_BELOW_SELECTION
225 Places the work area child below the Text area
226
227 XmPLACE_TOP
228 Places the work area child above the List area, and
229 below a MenuBar, if one is present
230
231 XmNdialogType
232 Determines the set of SelectionBox children widgets that are
233 created and managed at initialization. The possible values
234 are
235
236 XmDIALOG_PROMPT
237 All standard children except the list and list
238 label are created, and all except the Apply button
239 are managed
240
241 XmDIALOG_COMMAND
242 Only the list, the selection label, and the text
243 field are created and managed
244
245 XmDIALOG_SELECTION
246 All standard children are created and managed
247
248 XmDIALOG_FILE_SELECTION
249 All standard children are created and managed
250
251 XmDIALOG_WORK_AREA
252 All standard children are created, and all except
253 the Apply button are managed
254
255 If the parent of the SelectionBox is a DialogShell, the
256 default is XmDIALOG_SELECTION; otherwise, the default is
257 XmDIALOG_WORK_AREA. XmCreatePromptDialog and XmCreateSelec‐
258 tionDialog set and append this resource to the creation
259 arglist supplied by the application. This resource cannot be
260 modified after creation.
261
262 XmNhelpLabelString
263 Specifies the string label for the Help button. The default
264 for this resource depends on the locale. In the C locale the
265 default is Help.
266
267 Now that some default localized label strings are provided
268 through message catalogs for the children of composite wid‐
269 gets, the labelString resources cannot be set on the child
270 through default resource files. Instead, the resource pro‐
271 vided at the parent level must be used.
272
273 XmNlistItems
274 Specifies the items in the SelectionBox list. XtGetValues
275 for this resource returns the list items themselves, not a
276 copy of the list items. The application must not free the
277 returned items.
278
279 XmNlistItemCount
280 Specifies the number of items in the SelectionBox list. The
281 value must not be negative.
282
283 XmNlistLabelString
284 Specifies the string label to appear above the SelectionBox
285 list containing the selection items. The default for this
286 resource depends on the locale. In the C locale the default
287 is Items unless XmNdialogType is XmDIALOG_PROMPT; in this
288 case the default is NULL.
289
290 Now that some default localized label strings are provided
291 through message catalogs for the children of composite wid‐
292 gets, the labelString resources cannot be set on the child
293 through default resource files. Instead, the resource pro‐
294 vided at the parent level must be used.
295
296 XmNlistVisibleItemCount
297 Specifies the number of items displayed in the SelectionBox
298 list. The value must be greater than 0 (zero) unless XmNdi‐
299 alogType is XmDIALOG_PROMPT; in this case, the value is
300 always 0. The default is dynamic based on the height of the
301 list.
302
303 XmNminimizeButtons
304 Sets the buttons to the width of the widest button and height
305 of the tallest button if False. If True, button width and
306 height are not modified.
307
308 XmNmustMatch
309 Specifies whether the selection widget should check if the
310 user's selection in the text edit field has an exact match in
311 the SelectionBox list when the OK button is activated. If
312 the selection does not have an exact match, and XmNmustMatch
313 is True, the XmNnoMatchCallback callbacks are called. If the
314 selection does have an exact match or if XmNmustMatch is
315 False, XmNokCallback callbacks are called.
316
317 XmNnoMatchCallback
318 Specifies the list of callbacks called when the user makes a
319 selection from the text edit field that does not have an
320 exact match with any of the items in the list box. The call‐
321 back reason is XmCR_NO_MATCH. Callbacks in this list are
322 called only if XmNmustMatch is true.
323
324 XmNokCallback
325 Specifies the list of callbacks called when the user acti‐
326 vates the OK button. The callback reason is XmCR_OK. If the
327 selection text does not match a list item, and XmNmustMatch
328 is True, the XmNnoMatchCallback callbacks are called instead.
329
330 XmNokLabelString
331 Specifies the string label for the OK button. The default
332 for this resource depends on the locale. In the C locale the
333 default is OK.
334
335 Now that some default localized label strings are provided
336 through message catalogs for the children of composite wid‐
337 gets, the labelString resources cannot be set on the child
338 through default resource files. Instead, the resource pro‐
339 vided at the parent level must be used.
340
341 XmNselectionLabelString
342 Specifies the string label for the selection text edit field.
343 The default for this resource depends on the locale. In the
344 C locale the default is Selection.
345
346 Now that some default localized label strings are provided
347 through message catalogs for the children of composite wid‐
348 gets, the labelString resources cannot be set on the child
349 through default resource files. Instead, the resource pro‐
350 vided at the parent level must be used.
351
352 XmNtextAccelerators
353 Specifies translations added to the Text widget child of the
354 SelectionBox. The default includes bindings for the up and
355 down keys for auto selection of list items. This resource is
356 ignored if XmNaccelerators is initialized to a nondefault
357 value.
358
359 XmNtextColumns
360 Specifies the number of columns in the Text widget. The
361 value must be greater than 0 (zero).
362
363 XmNtextString
364 Specifies the text in the text edit selection field.
365
366 Inherited Resources
367 SelectionBox inherits behavior and resources from the superclasses in
368 the following tables. For a complete description of each resource,
369 refer to the reference page for that superclass.
370
371 ┌─────────────────────────────────────────────────────────────────────────────────────┐
372 │ │ XmBulletinBoard │Resource Set │ │ │
373 │Name │ Class │ Type │ Default │ Access │
374 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
375 │XmNallowOverlap │ XmCAllowOverlap │ Boolean │ True │ CSG │
376 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
377 │XmNautoUnmanage │ XmCAutoUnmanage │ Boolean │ True │ CG │
378 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
379 │XmNbuttonFontList │ XmCButtonFontList │ XmFontList │ dynamic │ CSG │
380 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
381 │XmNbuttonRenderTable │ XmCButtonRenderTable │ XmRenderTable │ dynamic │ CSG │
382 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
383 │XmNcancelButton │ XmCWidget │ Widget │ dynamic │ SG │
384 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
385 │XmNdefaultButton │ XmCWidget │ Widget │ dynamic │ SG │
386 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
387 │XmNdefaultPosition │ XmCDefaultPosition │ Boolean │ True │ CSG │
388 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
389 │XmNdialogStyle │ XmCDialogStyle │ unsigned char │ dynamic │ CSG │
390 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
391 │XmNdialogTitle │ XmCDialogTitle │ XmString │ NULL │ CSG │
392 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
393 │XmNfocusCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
394 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
395 │XmNlabelFontList │ XmCLabelFontList │ XmFontList │ dynamic │ CSG │
396 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
397 │XmNlabelRenderTable │ XmCLabelRenderTable │ XmRenderTable │ dynamic │ CSG │
398 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
399 │XmNmapCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
400 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
401 │XmNmarginHeight │ XmCMarginHeight │ Dimension │ 10 │ CSG │
402 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
403 │XmNmarginWidth │ XmCMarginWidth │ Dimension │ 10 │ CSG │
404 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
405 │XmNnoResize │ XmCNoResize │ Boolean │ False │ CSG │
406 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
407 │XmNresizePolicy │ XmCResizePolicy │ unsigned char │ XmRESIZE_ANY │ CSG │
408 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
409 │XmNshadowType │ XmCShadowType │ unsigned char │ XmSHADOW_OUT │ CSG │
410 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
411 │XmNtextFontList │ XmCTextFontList │ XmFontList │ dynamic │ CSG │
412 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
413 │XmNtextRenderTable │ XmCTextRenderTable │ XmRenderTable │ dynamic │ CSG │
414 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
415 │XmNtextTranslations │ XmCTranslations │ XtTranslations │ NULL │ C │
416 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
417 │XmNunmapCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
418 ├─────────────────────┼──────────────────────┼────────────────┼──────────────┼────────┤
419 └─────────────────────┴──────────────────────┴────────────────┴──────────────┴────────┘
420 ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
421 │ │ XmManager │Resource Set │ │ │
422 │Name │ Class │ Type │ Default │ Access │
423 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
424 │XmNbottomShadowColor │ XmCBottomShadowColor │ Pixel │ dynamic │ CSG │
425 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
426 │XmNbottomShadowPixmap │ XmCBottomShadowPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
427 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
428 │XmNforeground │ XmCForeground │ Pixel │ dynamic │ CSG │
429 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
430 │XmNhelpCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
431 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
432 │XmNhighlightColor │ XmCHighlightColor │ Pixel │ dynamic │ CSG │
433 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
434 │XmNhighlightPixmap │ XmCHighlightPixmap │ Pixmap │ dynamic │ CSG │
435 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
436 │XmNinitialFocus │ XmCInitialFocus │ Widget │ dynamic │ CSG │
437 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
438 │XmNlayoutDirection │ XmCLayoutDirection │ XmDirection │ dynamic │ CG │
439 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
440 │XmNnavigationType │ XmCNavigationType │ XmNavigationType │ XmTAB_GROUP │ CSG │
441 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
442 │XmNpopupHandlerCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
443 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
444 │XmNshadowThickness │ XmCShadowThickness │ Dimension │ dynamic │ CSG │
445 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
446 │XmNstringDirection │ XmCStringDirection │ XmStringDirection │ dynamic │ CG │
447 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
448 │XmNtopShadowColor │ XmCTopShadowColor │ Pixel │ dynamic │ CSG │
449 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
450 │XmNtopShadowPixmap │ XmCTopShadowPixmap │ Pixmap │ dynamic │ CSG │
451 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
452 │XmNtraversalOn │ XmCTraversalOn │ Boolean │ True │ CSG │
453 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
454 │XmNunitType │ XmCUnitType │ unsigned char │ dynamic │ CSG │
455 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
456 │XmNuserData │ XmCUserData │ XtPointer │ NULL │ CSG │
457 ├────────────────────────┼───────────────────────┼───────────────────┼──────────────────────┼────────┤
458 └────────────────────────┴───────────────────────┴───────────────────┴──────────────────────┴────────┘
459 ┌───────────────────────────────────────────────────────────────────────┐
460 │ │ Composite Reso│urce Set │ │ │
461 │Name │ Class │ Type │ Default │ Access │
462 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
463 │XmNchildren │ XmCReadOnly │ WidgetList │ NULL │ G │
464 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
465 │XmNinsertPosition │ XmCInsertPosition │ XtOrderProc │ NULL │ CSG │
466 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
467 │XmNnumChildren │ XmCReadOnly │ Cardinal │ 0 │ G │
468 ├──────────────────┼───────────────────┼─────────────┼─────────┼────────┤
469 └──────────────────┴───────────────────┴─────────────┴─────────┴────────┘
470 ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
471 │ │ Core Resource Se│t │ │ │
472 │Name │ Class │ Type │ Default │ Access │
473 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
474 │XmNaccelerators │ XmCAccelerators │ XtAccelerators │ dynamic │ N/A │
475 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
476 │XmNancestorSensitive │ XmCSensitive │ Boolean │ dynamic │ G │
477 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
478 │XmNbackground │ XmCBackground │ Pixel │ dynamic │ CSG │
479 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
480 │XmNbackgroundPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
481 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
482 │XmNborderColor │ XmCBorderColor │ Pixel │ XtDefaultForeground │ CSG │
483 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
484 │XmNborderPixmap │ XmCPixmap │ Pixmap │ XmUNSPECIFIED_PIXMAP │ CSG │
485 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
486 │XmNborderWidth │ XmCBorderWidth │ Dimension │ 0 │ CSG │
487 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
488 │XmNcolormap │ XmCColormap │ Colormap │ dynamic │ CG │
489 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
490 │XmNdepth │ XmCDepth │ int │ dynamic │ CG │
491 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
492 │XmNdestroyCallback │ XmCCallback │ XtCallbackList │ NULL │ C │
493 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
494 │XmNheight │ XmCHeight │ Dimension │ dynamic │ CSG │
495 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
496 │XmNinitialResourcesPersistent │ XmCInitialResourcesPersistent │ Boolean │ True │ C │
497 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
498 │XmNmappedWhenManaged │ XmCMappedWhenManaged │ Boolean │ True │ CSG │
499 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
500 │XmNscreen │ XmCScreen │ Screen * │ dynamic │ CG │
501 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
502 │XmNsensitive │ XmCSensitive │ Boolean │ True │ CSG │
503 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
504 │XmNtranslations │ XmCTranslations │ XtTranslations │ dynamic │ CSG │
505 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
506 │XmNwidth │ XmCWidth │ Dimension │ dynamic │ CSG │
507 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
508 │XmNx │ XmCPosition │ Position │ 0 │ CSG │
509 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
510 │XmNy │ XmCPosition │ Position │ 0 │ CSG │
511 ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
512 └──────────────────────────────┴───────────────────────────────┴────────────────┴──────────────────────┴────────┘
513 Callback Information
514 A pointer to the following structure is passed to each callback:
515
516 typedef struct
517 {
518 int reason;
519 XEvent * event;
520 XmString value;
521 int length;
522 } XmSelectionBoxCallbackStruct;
523
524 reason Indicates why the callback was invoked
525
526 event Points to the XEvent that triggered the callback
527
528 value Indicates the XmString value selected by the user from the
529 SelectionBox list or entered into the SelectionBox text field
530
531 length Indicates the size in bytes of the XmString value This member
532 is obsolete and exists for compatibility with earlier
533 releases.
534
535 Translations
536 XmSelectionBox inherits translations from XmBulletinBoard.
537
538 Accelerators
539 The XmNtextAccelerators are added to the Text descendant of XmSelec‐
540 tionBox. The default accelerators are described in the following list.
541
542 The following key names are listed in the X standard key event transla‐
543 tion table syntax. This format is the one used by Motif to specify the
544 widget actions corresponding to a given key. A brief overview of the
545 format is provided under VirtualBindings(3). For a complete descrip‐
546 tion of the format, please refer to the X Toolkit Instrinsics Documen‐
547 tation.
548
549 :<Key><osfUp>:
550 SelectionBoxUpOrDown(Previous)
551
552 :<Key><osfDown>:
553 SelectionBoxUpOrDown(Next)
554
555 :<Key><osfBeginLine>:
556 SelectionBoxUpOrDown(First)
557
558 :<Key><osfEndLine>:
559 SelectionBoxUpOrDown(Last)
560
561 :<Key><osfRestore>:
562 SelectionBoxRestore()
563
564 s c ∼m ∼a <Key>space:
565 SelectionBoxRestore()
566
567 Action Routines
568 The XmSelectionBox action routines are
569
570 SelectionBoxUpOrDown(Previous|Next|First|Last):
571 When called with an argument of Previous, or 0 (zero) for
572 compatibility, selects the previous item in the list and
573 replaces the text with that item.
574
575 When called with an argument of Next, or 1 for compatibility,
576 selects the next item in the list and replaces the text with
577 that item.
578
579 When called with an argument of First, or 2 for compatibil‐
580 ity, selects the first item in the list and replaces the text
581 with that item.
582
583 When called with an argument of Last, or 3 for compatibility,
584 selects the last item in the list and replaces the text with
585 that item.
586
587 SelectionBoxRestore():
588 Replaces the text value with the list selection. If no item
589 in the list is selected, clears the text.
590
591 Additional Behavior
592 The SelectionBox widget has the following additional behavior:
593
594 <Key><osfCancel>:
595 Calls the activate callbacks for the cancel button if it is
596 sensitive. If no cancel button exists and the parent of the
597 SelectionBox is a manager, passes the event to the parent.
598
599 <Key><osfActivate>:
600 Calls the activate callbacks for the button with the keyboard
601 focus. If no button has the keyboard focus, calls the acti‐
602 vate callbacks for the default button if it is sensitive. In
603 a List widget or single-line Text widget, the List or Text
604 action associated with <Key><osfActivate> is called before
605 the SelectionBox actions associated with <Key><osfActivate>.
606 In a multiline Text widget, any <Key><osfActivate> event
607 except <Key><osfEnter> calls the Text action associated with
608 <Key><osfActivate>, then the SelectionBox actions associated
609 with <Key><osfActivate>. If no button has the focus, no
610 default button exists, and the parent of the SelectionBox is
611 a manager, passes the event to the parent.
612
613 <OK Button Activated>:
614 If XmNmustMatch is True and the text does not match an item
615 in the file list, calls the XmNnoMatchCallback callbacks with
616 reason XmCR_NO_MATCH. Otherwise, calls the XmNokCallback
617 callbacks with reason XmCR_OK.
618
619 <Apply Button Activated>:
620 Calls the XmNapplyCallback callbacks with reason XmCR_APPLY.
621
622 <Cancel Button Activated>:
623 Calls the XmNcancelCallback callbacks with reason XmCR_CAN‐
624 CEL.
625
626 <Help Button Activated>:
627 Calls the XmNhelpCallback callbacks with reason XmCR_HELP.
628
629 <MapWindow>:
630 Calls the callbacks for XmNmapCallback if the SelectionBox is
631 a child of a Dialog shell.
632
633 <UnmapWindow>:
634 Calls the callbacks for XmNunmapCallback if the SelectionBox
635 is the child of a DialogShell.
636
637 Virtual Bindings
638 The bindings for virtual keys are vendor specific. For information
639 about bindings for virtual buttons and keys, see VirtualBindings(3).
640
642 Composite(3), Constraint(3), Core(3), XmBulletinBoard(3), XmCreateSe‐
643 lectionBox(3), XmCreateSelectionDialog(3), XmCreatePromptDialog(3),
644 XmManager(3), and XmSelectionBoxGetChild(3).
645
646
647
648 XmSelectionBox(library call)