1XmSpinBox(library call) XmSpinBox(library call)
2
3
4
6 XmSpinBox — The SpinBox widget class
7
9 #include <Xm/SpinB.h>
10
12 SpinBox allows the user to select a value from a ring of related but
13 mutually exclusive choices which are displayed in sequence. The SpinBox
14 always has an increment arrow, a decrement arrow, and one or more other
15 children. The choices are displayed, one at a time, in a traversable
16 text child ( XmText or XmTextField. The user clicks <Btn1> on an arrow
17 to display the next (or previous) item in the ring of choices. By
18 pressing and holding <Btn1> on an arrow, the user continuously cycles
19 through the choices.
20
21 The traversable children in a SpinBox can be of type XmNUMERIC or
22 XmSTRING, as defined by the XmNspinBoxChildType constraint resource.
23 The ring of choices for numeric children is defined by minimum, maxi‐
24 mum, incremental, and decimal point values. The ring of choices for
25 string children is defined in an array of compound strings.
26
27 The application programmer can include multiple traversable children in
28 the SpinBox. For example, a SpinBox might consist of a pair of arrows
29 and month, day, and year text fields. The arrows only spin the child
30 that currently has focus.
31
32 Arrow size is specified by the SpinBox resource XmNarrowSize. This
33 value sets both width and height of each arrow in pixels.
34
35 The programmer can display SpinBox arrows in one of several layouts, as
36 specified by the XmNarrowLayout resource:
37
38 XmARROWS_BEGINNING
39 Places a pair of left and right arrows before the children.
40
41 XmARROWS_END
42 Places a pair of left and right arrows after the children.
43
44 XmARROWS_SPLIT
45 Places one arrow on each side of the children.
46
47 XmARROWS_FLAT_BEGINNING
48 Places a pair of arrows side by side before the XmSpinBox
49 children.
50
51 XmARROWS_FLAT_BEGINNING
52 Places a pair of arrows side by side after the XmSpinBox
53 children.
54
55 Positions for XmARROWS_BEGINNING and XmARROWS_END are dependent on the
56 VendorShell resource XmNlayoutDirection. When layout direction is left-
57 to-right, beginning arrows are positioned to the left of the children.
58 When layout direction is right-to-left, beginning arrows are positioned
59 to the right.
60
61 The actions of the arrows are determined by the VendorShell resource
62 XmNlayoutDirection. For left-to-right layouts, the right arrow is the
63 increment arrow and the left arrow is the decrement arrow. For right-
64 to-left layouts, the right arrow is the decrement arrow and the left
65 arrow is the increment arrow.
66
67 For a numeric type child, the increment arrow increases the displayed
68 value by the incremental value up to the maximum. The decrement arrow
69 decreases the displayed value by the given incremental value down to
70 the minimum.
71
72 The increment arrow for a string type child moves toward the last entry
73 of the array of compound strings (by increasing the SpinBox constraint
74 resource XmNposition). The decrement arrow moves toward the first entry
75 of the compound string array.
76
77 The programmer can also control the sensitivity of each arrow in the
78 SpinBox. Sensitive arrows spin choices; insensitive arrows do not spin
79 choices. Arrow sensitivity is set for the SpinBox widget by using the
80 XmNdefaultArrowSensitivity resource, but it can be modified on a per
81 child basis by using the XmNarrowSensitivity constraint resource.
82
83 SpinBox provides two callbacks to application programmers. (In addi‐
84 tion, the callbacks of the SpinBox's children may be invoked.) Each of
85 these callbacks receives a pointer to XmSpinBoxCallbackStruct. The
86 XmNmodifyVerifyCallback procedures are called before a new choice is
87 displayed. The XmNvalueChangedCallback procedures are called after a
88 new choice is displayed.
89
90 XmNmodifyVerifyCallback tells the application what the new position
91 will be in the ring of choices. This callback can be used to make the
92 SpinBox stop at the upper and lower limits or go to a different, non‐
93 consecutive choice. The application allows the change in position by
94 leaving the doit member set to True. The application can spin to a
95 position other than the next consecutive position by leaving doit set
96 to True and by changing the position member to the desired position.
97 When doit is set to False by an application, there is no change in the
98 choice displayed.
99
100 After a new choice is displayed, the XmNvalueChangedCallback procedure
101 is called. The application can use this procedure to perform tasks when
102 specific values are reached or when boundaries are crossed. For exam‐
103 ple, if the user spins from January back to December, the application
104 could change to the previous year. If the user spins from December to
105 January, the application could change to the next year.
106
107 SpinBox dimensions can be set using the Core resources XmNheight and
108 XmNwidth. If dimensions are not specified, the SpinBox size is deter‐
109 mined by the sizes of its arrows and children. The SpinBox will attempt
110 to grow so that the arrows and all children are visible.
111
112 SpinBox uses the XmQTaccessTextual trait and holds the XmQTnavigator
113 trait.
114
115 Classes
116 SpinBox inherits behavior, resources, and traits from the Core, Compos‐
117 ite, Constraint, and XmManager classes.
118
119 The class pointer is xmSpinBoxWidgetClass.
120
121 The class name is XmSpinBox.
122
123 New Resources
124 The following table defines a set of widget resources used by the pro‐
125 grammer to specify data. The programmer can also set the resource val‐
126 ues for the inherited classes to set attributes for this widget. To
127 reference a resource by name or by class in a .Xdefaults file, remove
128 the XmN or XmC prefix and use the remaining letters. To specify one of
129 the defined values for a resource in a .Xdefaults file, remove the Xm
130 prefix and use the remaining letters (in either lowercase or uppercase,
131 but include any underscores between words). The codes in the access
132 column indicate whether the given resource can be set at creation time
133 (C), set by using XtSetValues (S), retrieved by using XtGetValues (G),
134 or is not applicable (N/A).
135
136 XmSpinBox Resource
137 Set
138 Name Class Type Default Access
139 XmNarrowLayout XmCArrowLayout unsigned char XmARROWS_BEGINNING CSG
140 XmNarrowOrientation XmCArrowOrientation unsigned char XmARROWS_VERTICAL CSG
141 XmNarrowSize XmCArrowSize Dimension 16 CSG
142 XmNdefaultArrowSensitivity XmCDefaultArrowSensitivity unsigned char XmARROWS_SENSITIVE CSG
143 XmNdetailShadowThickness XmCDetailShadowThickness Dimension 2 CSG
144 XmNinitialDelay XmCInitialDelay unsigned int 250 ms CSG
145 XmNmarginHeight XmCMarginHeight Dimension dynamic CSG
146 XmNmarginWidth XmCMarginWidth Dimension dynamic CSG
147 XmNmodifyVerifyCallback XmCCallback XtCallbackList NULL C
148 XmNrepeatDelay XmCRepeatDelay unsigned int 200 ms CSG
149 XmNspacing XmCSpacing Dimension dynamic CSG
150 XmNvalueChangedCallback XmCCallback XtCallbackList NULL C
151
152 XmNarrowLayout
153 Specifies placement of the two arrows in the widget. Possible
154 layouts are as follows:
155
156 XmARROWS_BEGINNING
157 Places left and right arrows beside each other,
158 before the child(ren). Positioning for this layout
159 is dependent on the VendorShell resource XmNlayout‐
160 Direction.
161
162 XmARROWS_END
163 Places left and right arrows beside each other,
164 after the child(ren). Positioning for this layout
165 is dependent on the VendorShell resource XmNlayout‐
166 Direction.
167
168 XmARROWS_FLAT_BEGINNING
169 Places a pair of arrows side by side before the
170 XmSpinBox children. Positioning for this layout is
171 dependent on the VendorShell resource XmNlayoutDi‐
172 rection.
173
174 XmARROWS_FLAT_END
175 Places a pair of arrows side by side after the
176 XmSpinBox children. Positioning for this layout is
177 dependent on the VendorShell resource XmNlayoutDi‐
178 rection.
179
180 XmARROWS_SPLIT
181 Places a left arrow on the left side and a right
182 arrow on the right side of the child(ren).
183
184 XmNarrowSize
185 Specifies both the width and height of the arrow in pixels.
186
187 XmNdefaultArrowSensitivity
188 Specifies the default sensitivity of the arrows in the wid‐
189 get. Insensitive arrows change color, cannot be depressed,
190 and perform no action. (This resource may be overridden by
191 the constraint resource XmNarrowSensitivity for individual
192 traversable text children of the SpinBox.) Possible default
193 sensitivity values are as follows:
194
195 XmARROWS_SENSITIVE
196 Both arrows are sensitive.
197
198 XmARROWS_DECREMENT_SENSITIVE
199 Only the decrement arrow (as determined by XmNlay‐
200 outDirection) is sensitive. The increment arrow is
201 insensitive.
202
203 XmARROWS_INCREMENT_SENSITIVE
204 Only the increment arrow (as determined by XmNlay‐
205 outDirection) is sensitive. The decrement arrow is
206 insensitive.
207
208 XmARROWS_INSENSITIVE
209 Both arrows are insensitive.
210
211 XmNdetailShadowThickness
212 Specifies the thickness of the inside arrow shadows. The
213 default thickness is 2 pixels.
214
215 XmNinitialDelay
216 Specifies how long, in milliseconds, the mouse button must be
217 held down before automatic spinning begins. In other words,
218 when the user selects the increment or decrement arrow and
219 keeps it depressed, this delay occurs before the choices
220 start spinning. If XmNinitialDelay is 0, then XmNrepeatDelay
221 is used as the initial delay.
222
223 XmNmarginHeight
224 Specifies the amount of blank space between the top edge of
225 the SpinBox widget and the first item in each column, and the
226 bottom edge of the SpinBox widget and the last item in each
227 column.
228
229 XmNmarginWidth
230 Specifies the amount of blank space between the left edge of
231 the SpinBox widget and the first item in each row, and the
232 right edge of the SpinBox widget and the last item in each
233 row.
234
235 XmNmodifyVerifyCallback
236 This callback is called before the SpinBox position changes
237 (see the Constraint resource XmNposition). The application
238 can use this callback to set the next position, change Spin‐
239 Box resources, or cancel the impending action. For example,
240 this callback can be used to stop the spinning just before
241 wrapping at the upper and lower position boundaries. If the
242 doit member is set to False, nothing happens. Otherwise the
243 position changes. Reasons sent by the callback are
244 XmCR_SPIN_NEXT, XmCR_SPIN_PRIOR, XmCR_SPIN_FIRST, or
245 XmCR_SPIN_LAST.
246
247 XmNrepeatDelay
248 When the user selects and keeps an arrow button depressed by
249 pressing and holding <Btn1>, spinning begins. After the time
250 specified in XmNinitialDelay elapses, the SpinBox position
251 changes automatically until the arrow button is released.
252 The XmNrepeatDelay resource specifies the delay in millisec‐
253 onds between each automatic change. If XmNrepeatDelay is set
254 to 0 (zero), automatic spinning is turned off and XmNini‐
255 tialDelay is ignored.
256
257 XmNspacing
258 Specifies the horizontal and vertical spacing between items
259 contained within the SpinBox widget.
260
261 XmNvalueChangedCallback
262 This is called n+1 times for n SpinBox position changes (see
263 the Constraint resource XmNposition). Reasons sent by the
264 callback are XmCR_OK, XmCR_SPIN_NEXT, XmCR_SPIN_PRIOR,
265 XmCR_SPIN_FIRST, or XmCR_SPIN_LAST. Other members are
266 detailed in the callback structure description.
267
268
269 XmSpinBox Constraint
270 Resource Set
271 Name Class Type Default Access
272 XmNarrowSensitivity XmCArrowSensitivity unsigned char XmARROWS_DEFAULT_SENSITIVITY CSG
273 XmNdecimalPoints XmCDecimalPoints short 0 CSG
274 XmNincrementValue XmCIncrementValue int 1 CSG
275 XmNmaximumValue XmCMaximumValue int 10 CSG
276 XmNminimumValue XmCMinimumValue int 0 CSG
277 XmNnumValues XmCNumValues int 0 CSG
278 XmNposition XmCPosition int 0 CSG
279 XmNpositionType XmCPositionType char XmPOSITION_VALUE CG
280 XmNspinBoxChildType XmSpinBoxChildType unsigned char XmSTRING CG
281 XmNvalues XmCValues XmStringTable NULL CSG
282
283 XmNarrowSensitivity
284 Specifies the sensitivity of the arrows for a SpinBox child.
285 By using this resource in the definition of a SpinBox child,
286 the application programmer can override the default SpinBox
287 sensitivity (set by XmNdefaultArrowSensitivity) for a partic‐
288 ular child. This allows each traversable child to have a dif‐
289 ferent arrow sensitivity. The arrow sensitivity values are as
290 follows:
291
292 XmARROWS_SENSITIVE
293 Both arrows are sensitive.
294
295 XmARROWS_DECREMENT_SENSITIVE
296 Only the decrement arrow (as determined by XmNlay‐
297 outDirection) is sensitive.
298
299 XmARROWS_INCREMENT_SENSITIVE
300 Only the increment arrow (as determined by XmNlay‐
301 outDirection) is sensitive.
302
303 XmARROWS_INSENSITIVE
304 Both arrows are insensitive.
305
306 XmARROWS_DEFAULT_SENSITIVITY
307 Use the sensitivity specified in the XmNdefaultAr‐
308 rowSensitivity resource.
309
310 XmNdecimalPoints
311 Specifies the number of decimal places used when displaying
312 the value of a SpinBox numeric type child. If the number of
313 decimal places specified is greater than the number of digits
314 in a displayed value, the value is padded with 0 (zeros). For
315 example, when XmNinitialValue is 1 and XmNmaximumValue is
316 1000 and XmNdecimalPoints is 3, the range of values displayed
317 in the SpinBox is 0.001 to 1.000. This is used only when XmN‐
318 spinBoxChildType is XmNUMERIC.
319
320 XmNincrementValue
321 Specifies the amount by which to increment or decrement a
322 SpinBox numeric type child. This is used only when XmNspin‐
323 BoxChildType is XmNUMERIC.
324
325 XmNmaximumValue
326 Specifies the highest possible value for a numeric SpinBox.
327 This is used only when XmNspinBoxChildType is XmNUMERIC.
328
329 XmNminimumValue
330 Specifies the lowest possible value for a numeric SpinBox.
331 This is used only when XmNspinBoxChildType is XmNUMERIC.
332
333 XmNnumValues
334 Specifies the number of strings in XmNvalues. The application
335 must change this value when strings are added or removed from
336 XmNvalues. This is used only when XmNspinBoxChildType is
337 XmSTRING.
338
339 XmNposition
340 Specifies the position of the currently displayed item. The
341 interpritation of XmNposition is dependent upon the value of
342 the XmNpositionType resource.
343
344 When XmNpositionType is XmPOSITION_INDEX the XmNposition
345 value is interpreted as follows: For XmSpinBox children of
346 type XmNUMERIC, the XmNposition resource is interpreted as an
347 index into an array of items. The minimum allowable value for
348 XmNposition is 0. The maximum allowable value for XmNposition
349 is (XmNmaximumValue-XmNminimumValue)/XmNincrementValue. The
350 value display by the XmSpinBox child is XmNminimumValue+(XmN‐
351 position*XmNincrementValue). For XmSpinBox children of type
352 XmSTRING, the XmNposition resource is interpreted as an index
353 into an array of XmNnumValues items. The minimum allowable
354 value for XmNposition is 0. The maximum allowable value for
355 XmNposition is XmNnumValues - 1. The value displayed by the
356 XmSpinBox is the XmNposition'th value in the XmNvalues array.
357
358 When XmNpositionType is XmPOSITION_VALUE the XmNposition
359 value is interpreted as follows:
360
361 For XmSpinBox children of type XmNUMERIC, the XmNposition
362 resource is interpreted as the actual value to be displayed.
363 The minimum allowable value for XmNposition is XmNminimum‐
364 Value. The maximum allowable value for XmNposition is XmNmax‐
365 imumValue. The value displayed by the XmSpinBox child is
366 XmNposition. For XmSpinBox children of type XmSTRING, the
367 interpretation is the same for XmPOSITION_VALUE as for XmPO‐
368 SITION_INDEX.
369
370 Position values falling outside the specified range are
371 invalid. When an application assigns a value to XmNposition
372 which is less than the minimum, XmNposition is set to the
373 minimum and an error message is displayed. When an applica‐
374 tion assigns a value to XmNposition which is greater than the
375 maximum, XmNposition is set to the maximum and an error mes‐
376 sage is displayed.
377
378 XmNpositionType
379 Specifies how values the XmNposition resource are to be
380 interpreted. Valid values include XmPOSITION_INDEX and XmPO‐
381 SITION_VALUE.
382
383 XmNspinBoxChildType
384 Specifies the type of data displayed in the child:
385
386 XmNUMERIC The SpinBox choice range is defined by numeric min‐
387 imum, maximum, and incremental values.
388
389 XmSTRING The SpinBox choices are alphanumeric.
390
391 XmNvalues Specifies the array of XmStrings to be displayed in a SpinBox
392 string type child. The application must change XmNnumValues
393 when strings are added to or removed from XmNvalues. This is
394 used only when XmNspinBoxChildType is XmSTRING.
395
396 Inherited Resources
397 SpinBox inherits behavior and resources from the superclasses described
398 in the following tables. For a complete description of each resource,
399 refer to the reference page for that superclass.
400
401 XmManager Resource
402 Set
403 Name Class Type Default Access
404
405 XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
406 XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
407 XmNforeground XmCForeground Pixel dynamic CSG
408 XmNhelpCallback XmCCallback XtCallbackList NULL C
409 XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
410 XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
411 XmNinitialFocus XmCInitialFocus Widget dynamic CSG
412 XmNlayoutDirection XmCLayoutDirection XmDirection dynamic CG
413 XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG
414 XmNpopupHandlerCallback XmCCallback XtCallbackList NULL C
415 XmNshadowThickness XmCShadowThickness Dimension 0 CSG
416 XmNstringDirection XmCStringDirection XmStringDirection dynamic CG
417 XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
418 XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
419 XmNtraversalOn XmCTraversalOn Boolean True CSG
420 XmNunitType XmCUnitType unsigned char dynamic CSG
421 XmNuserData XmCUserData XtPointer NULL CSG
422
423 Composite Resource
424 Set
425 Name Class Type Default Access
426 XmNchildren XmCReadOnly WidgetList NULL G
427 XmNinsertPosition XmCInsertPosition XtOrderProc NULL CSG
428 XmNnumChildren XmCReadOnly Cardinal 0 G
429
430 Core Resource Set
431 Name Class Type Default Access
432 XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG
433 XmNancestorSensitive XmCSensitive Boolean dynamic G
434 XmNbackground XmCBackground Pixel dynamic CSG
435 XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
436 XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
437 XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
438 XmNborderWidth XmCBorderWidth Dimension 0 CSG
439 XmNcolormap XmCColormap Colormap dynamic CG
440 XmNdepth XmCDepth int dynamic CG
441 XmNdestroyCallback XmCCallback XtCallbackList NULL C
442 XmNheight XmCHeight Dimension dynamic CSG
443 XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C
444 XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
445 XmNscreen XmCScreen Screen * dynamic CG
446 XmNsensitive XmCSensitive Boolean True CSG
447 XmNtranslations XmCTranslations XtTranslations dynamic CSG
448 XmNwidth XmCWidth Dimension dynamic CSG
449 XmNx XmCPosition Position 0 CSG
450 XmNy XmCPosition Position 0 CSG
451
452 Callback
453 A pointer to the following structure is passed to each callback:
454
455 typedef struct
456 {
457 int reason;
458 XEvent * event;
459 Widget widget;
460 Boolean doit;
461 int position;
462 XmString value;
463 Boolean crossed_boundary;
464 } XmSpinBoxCallbackStruct;
465
466 reason Indicates why the callback was invoked. Reasons may be the
467 following:
468
469 XmCR_OK Spinning has stopped because the SpinBox arrow has
470 been disarmed. XmCR_OK is either the last or only
471 call.
472
473 XmCR_SPIN_NEXT
474 The increment arrow has been armed and position is
475 increasing. Further callbacks will come. For a
476 numeric type child, the values displayed are
477 approaching the maximum. For a string SpinBox, the
478 values displayed are approaching the last entry in
479 the array of XmString s.
480
481 XmCR_SPIN_PRIOR
482 The decrement arrow has been armed and position is
483 decreasing. Further callbacks will come. For a
484 numeric type child, the values displayed are
485 approaching the minimum. For a string type child,
486 the values displayed are approaching the first
487 entry in the array of XmStrings.
488
489 XmCR_SPIN_FIRST
490 The begin data (<osfBeginData>) key sequence has
491 been pressed. The SpinBox is at its first position,
492 displaying the lowest value or the first entry in
493 the array of XmStrings.
494
495 XmCR_SPIN_LAST
496 The end data (<osfEndData>) key sequence has been
497 pressed. The SpinBox is at its last position, dis‐
498 playing the highest value or the last entry in the
499 array of XmStrings.
500
501 event Points to the XEvent that triggered this callback.
502
503 widget Specifies the child widget affected by this callback.
504
505 doit When the callback is XmNmodifyVerifyCallback, doit indicates
506 whether or not an action will be performed before the SpinBox
507 position changes. If the callback leaves doit set to True
508 (the default), the spinning action is performed. If the call‐
509 back sets doit to False, the spinning action is not per‐
510 formed. When the callback is XmNvalueChangedCallback, doit
511 is ignored.
512
513 position Specifies the next value of the SpinBox position (same as
514 XmNposition). This is an output field for the XmNmodifyVeri‐
515 fyCallback, which may change the next position as dictated by
516 the needs of an application.
517
518 value Specifies the new XmString value in the text child widget.
519 The user program must copy this string if it is to be used
520 outside the callback routine.
521
522 crossed_boundary
523 Specifies whether or not the SpinBox has crossed the upper or
524 lower boundary (the last or first compound string, or the
525 maximum or minimum value). The crossed_boundary value is
526 True if the SpinBox has just crossed a boundary, and False if
527 it has not.
528
529 Translations
530 The XmSpinBox translations are as follows:
531
532 The following key names are listed in the X standard key event transla‐
533 tion table syntax. This format is the one used by Motif to specify the
534 widget actions corresponding to a given key. A brief overview of the
535 format is provided under VirtualBindings(3). For a complete description
536 of the format, please refer to the X Toolkit Instrinsics Documentation.
537
538 <Btn1Down>:
539 SpinBArm()
540
541 <Btn1Up>: SpinBDisarm()
542
543 :<Key><osfUp> :
544 SpinBPrior()
545
546 :<Key><osfDown> :
547 SpinBNext()
548
549 :<Key><osfLeft> :
550 SpinBLeft()
551
552 :<Key><osfRight> :
553 SpinBRight()
554
555 :<Key><osfBeginData> :
556 SpinBFirst()
557
558 :<Key><osfEndData> :
559 SpinBLast()
560
561 Accelerators
562 The XmNaccelerators resource of a SpinBox are added to each traversable
563 text child. The default XmNaccelerators are defined in the following
564 list. The bindings for <Key><osfUp> and <Key><osfDown> cannot be
565 changed.
566
567 <Key> <osfUp>:
568 SpinBPrior()
569
570 <Key> <osfDown>:
571 SpinBNext()
572
573 <KeyUp> <osfUp>:
574 SpinBDisarm()
575
576 <KeyUp> <osfDown>:
577 SpinBDisarm()
578
579 <Key> <osfLeft>:
580 SpinBLeft()
581
582 <Key> <osfRight>:
583 SpinBRight()
584
585 <KeyUp> <osfLeft>:
586 SpinBDisarm()
587
588 <KeyUp> <osfRight>:
589 SpinBDisarm()
590
591 <Key> <osfBeginData>:
592 SpinBFirst()
593
594 <Key> <osfEndData>:
595 SpinBLast()
596
597 Action Routines
598 The XmSpinBox action routines are as follows:
599
600 SpinBArm():
601 Visually arms the SpinBox by drawing the armed arrow so that
602 it appears to be depressed. This action is initiated when the
603 user presses <Btn1> while the pointer is within the bound‐
604 aries of either the increment or decrement arrow. The arrow
605 remains visually armed as long as <Btn1> remains depressed.
606
607 If the time period specified by XmNrepeatDelay is not greater
608 than zero milliseconds, nothing else happens while <Btn1>
609 remains depressed.
610
611 If the time period specified by XmNrepeatDelay is greater
612 than zero milliseconds, and the arrow is disarmed before the
613 time period specified by XmNinitialDelay has elapsed, nothing
614 else happens in this action.
615
616 If the time period specified by XmNrepeatDelay is greater
617 than zero milliseconds, and the arrow is still armed after
618 the time period specified by XmNinitialDelay has elapsed, the
619 following occurs:
620
621 · The reason member of the SpinBox callback structure,
622 XmSpinBoxCallbackStruct, is set to XmCR_SPIN_NEXT if
623 the increment arrow is armed, or to XmCR_SPIN_PRIOR if
624 the decrement arrow is armed.
625
626 · The position member is set to the next position.
627
628 · The doit member is set to True.
629
630 · XmNmodifyVerifyCallback, if it exists, is invoked. The
631 application may change the value of position and doit.
632 If the application sets doit to False, nothing else
633 happens until the XmNrepeatDelay period has elapsed, or
634 until <Btn1> is released.
635
636 If doit remains set to True, the following occurs:
637
638 · The value of XmNposition is changed to the value of
639 position in the SpinBox callback structure.
640
641 · The text corresponding to the new position is displayed
642 in the traversable text child that currently has focus.
643
644 · The reason member of the SpinBox callback structure is
645 set to XmCR_SPIN_NEXT if the increment arrow is armed,
646 or XmCR_SPIN_PRIOR if the decrement arrow is armed.
647
648 · The position member is set to the current (new) value
649 of XmNposition.
650
651 · XmNvalueChangedCallback, if it exists, is called. Spin‐
652 Box ignores any changes to position or doit members
653 made by XmNvalueChangedCallback.
654
655 These events are repeated each time the XmNrepeatDelay period
656 elapses and the arrow remains armed.
657
658 SpinBDisarm():
659 Visually disarms the SpinBox by drawing the previously armed
660 arrow so that it no longer appears to be depressed.
661
662 If the time period specified by XmNrepeatDelay is not greater
663 than zero milliseconds, or the time period specified by
664 XmNinitialDelay has not elapsed, the following then occurs:
665
666 · The reason member of the SpinBox callback structure,
667 XmSpinBoxCallbackStruct, is set to XmCR_SPIN_NEXT if
668 the increment arrow is armed, or to XmCR_SPIN_PRIOR if
669 the decrement arrow is armed.
670
671 · The position member is set to the next position.
672
673 · The doit member is set to True.
674
675 · The XmNmodifyVerifyCallback, if there is one, is
676 invoked. The application may change the value of posi‐
677 tion and doit. If the application sets doit to False,
678 nothing else happens until the XmNrepeatDelay period
679 has elapsed, or until <Btn1> is released.
680
681 If doit remains set to True, the following occurs:
682
683 · The value of XmNposition is changed to the value of
684 position in the SpinBox callback structure.
685
686 · The text corresponding to the new position is displayed
687 in the traversable text child that currently has focus.
688
689 · The reason member of the SpinBox callback structure is
690 set to XmCR_SPIN_NEXT if the increment arrow is armed,
691 or XmCR_SPIN_PRIOR if the decrement arrow is armed.
692
693 · The position member is set to the current (new) value
694 of XmNposition.
695
696 · XmNvalueChangedCallback, if it exists, is called. Spin‐
697 Box ignores any changes to position or doit members
698 made by an XmNvalueChangedCallback.
699
700 If an XmNvalueChangedCallback procedure is issued after the
701 button has been armed, regardless of the value of XmNrepeat‐
702 Delay or whether the XmNinitialDelay has expired:
703
704 · The reason member of the SpinBox callback structure is
705 set to XmCR_OK.
706
707 · The position member is set to the current value of XmN‐
708 position.
709
710 · XmNvalueChangedCallback, if it exists, is called.
711
712 SpinBFirst():
713 The following occurs:
714
715 · The reason member of the SpinBox callback structure,
716 XmSpinBoxCallbackStruct, is set to XmCR_SPIN_FIRST.
717
718 · The position member is set to the first (0) position.
719
720 · The doit member is set to True.
721
722 · XmNmodifyVerifyCallback, if it exists, is invoked. The
723 application may change the value of position and doit.
724 If the application sets doit to False, nothing else
725 happens until the XmNrepeatDelay period has elapsed, or
726 until <Btn1> is released.
727
728 If doit remains set to True, the following occurs:
729
730 · The value of XmNposition is changed to the value of
731 position in the SpinBox callback structure.
732
733 · The text corresponding to the new position is displayed
734 in the traversable text child that currently has focus.
735
736 · The reason member of the SpinBox callback structure is
737 set to XmCR_SPIN_FIRST.
738
739 · The position member is set to the current (new) value
740 of XmNposition.
741
742 · XmNvalueChangedCallback, if it exists, is called.
743
744 · The reason member of the SpinBox callback structure is
745 set to XmCR_OK.
746
747 · The position member is set to the current (new) XmNpo‐
748 sition value.
749
750 · The XmNvalueChangedCallback is called again. SpinBox
751 ignores any changes to position or doit members made by
752 XmNvalueChangedCallback.
753
754 SpinBLast():
755 The following occurs:
756
757 · The reason member of the SpinBox callback structure,
758 XmSpinBoxCallbackStruct, is set to XmCR_SPIN_LAST.
759
760 · The position member is set to the last position.
761
762 · The doit member is set to True.
763
764 · XmNmodifyVerifyCallback, if it exists, is invoked. The
765 application may change the value of position and doit.
766 If the application sets doit to False, nothing else
767 happens until the XmNrepeatDelay period has elapsed, or
768 until <Btn1> is released.
769
770 If doit remains set to True, the following occurs:
771
772 · The value of XmNposition is changed to the value of
773 position in the SpinBox callback structure.
774
775 · The text corresponding to the new position is displayed
776 in the traversable text child that currently has focus.
777
778 · The reason member of the SpinBox callback structure is
779 set to XmCR_SPIN_LAST.
780
781 · The position member is set to the current (new) value
782 XmNposition.
783
784 · XmNvalueChangedCallback, if it exists, is called.
785
786 · The reason member of the SpinBox callback structure is
787 set to XmCR_OK.
788
789 · The position member is set to the current (new) of XmN‐
790 position.
791
792 · XmNvalueChangedCallback is called again. SpinBox
793 ignores any changes to the position or doit members
794 made by XmNvalueChangedCallback.
795
796 SpinBLeft():
797 If the VendorShell resource XmNlayoutDirection is left-to-
798 right, the SpinBPrior action is invoked. Otherwise, the
799 SpinBNext action is invoked.
800
801 SpinBNext():
802 Visually arms the SpinBox by drawing the increment arrow so
803 that it appears to be depressed. The following occurs:
804
805 · The reason member of the SpinBox callback structure,
806 XmSpinBoxCallbackStruct, is set to XmCR_SPIN_NEXT.
807
808 · The position member is set to the next position.
809
810 · The doit member is set to True.
811
812 · XmNmodifyVerifyCallback, if it exists, is invoked. The
813 application may change the value of position and doit.
814 If the application sets doit to False, nothing else
815 happens until the XmNrepeatDelay period has elapsed, or
816 until <Btn1> is released.
817
818 If doit remains set to True, the following occurs:
819
820 · The value of XmNposition is changed to the value of
821 position in the SpinBox callback structure.
822
823 · The text corresponding to the new position is displayed
824 in the traversable text child that currently has focus.
825
826 · The reason member of the SpinBox callback structure is
827 set to XmCR_SPIN_NEXT.
828
829 · The position member is set to the current (new) value
830 of XmNposition.
831
832 · XmNvalueChangedCallback, if it exists, is called.
833
834 · The reason member of the SpinBox callback structure is
835 set to XmCR_OK.
836
837 · The position member is set to the current (new) XmNpo‐
838 sition.
839
840 · The XmNvalueChangedCallback is called again. SpinBox
841 ignores any changes to position or doit members made by
842 XmNvalueChangedCallback.
843
844 SpinBPrior():
845 Visually arms the SpinBox by drawing the decrement arrow so
846 that it appears to be depressed. The following occurs:
847
848 · The reason member of the SpinBox callback structure,
849 XmSpinBoxCallbackStruct, is set to XmCR_SPIN_PRIOR.
850
851 · The position member is set to the next position.
852
853 · The doit member is set to True.
854
855 · XmNmodifyVerifyCallback, if it exists, is invoked. The
856 application may change the value of position and doit.
857 If the application sets doit to False, nothing else
858 happens until the XmNrepeatDelay period has elapsed, or
859 until <Btn1> is released.
860
861 If doit remains set to True, the following occurs:
862
863 · The value of XmNposition is changed to the value of
864 position in the SpinBox callback structure.
865
866 · The text corresponding to the new position is displayed
867 in the traversable text child that currently has focus.
868
869 · The reason member of the SpinBox callback structure is
870 set to XmCR_SPIN_PRIOR.
871
872 · The position member is set to the current (new) value
873 of XmNposition.
874
875 · XmNvalueChangedCallback, if it exists, is called.
876
877 · The reason member of the SpinBox callback structure is
878 set to XmCR_OK.
879
880 · The position member is set to the current (new) value
881 of XmNposition.
882
883 · XmNvalueChangedCallback is called again. SpinBox
884 ignores any changes to position or doit members made by
885 XmNvalueChangedCallback.
886
887 SpinBRight():
888 If the VendorShell resource XmNlayoutDirection is left-to-
889 right, the SpinBNext action is invoked. Otherwise, the
890 SpinBPrior action is invoked.
891
893 Composite(3), Constraint(3), Core(3), XmCreateSpinBox(3), XmManager(3),
894 XmString(3), XmVaCreateSpinBox(3), and XmVaCreateManagedSpinBox(3).
895
896
897
898 XmSpinBox(library call)