'\" t ...\" SpinBox.sgm /main/15 1996/09/08 21:02:25 rws $ .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed -e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "XmSpinBox" "library call" .SH "NAME" \fBXmSpinBox\fP \(em The SpinBox widget class .iX "XmSpinBox" .iX "widget class" "SpinBox" .SH "SYNOPSIS" .PP .nf #include .fi .SH "DESCRIPTION" .PP SpinBox allows the user to select a value from a ring of related but mutually exclusive choices which are displayed in sequence\&. The SpinBox always has an increment arrow, a decrement arrow, and one or more other children\&. The choices are displayed, one at a time, in a traversable text child ( \fBXmText\fP or \fBXmTextField\fP\&. The user clicks \fB\fP on an arrow to display the next (or previous) item in the ring of choices\&. By pressing and holding \fB\fP on an arrow, the user continuously cycles through the choices\&. .PP The traversable children in a SpinBox can be of type \fBXmNUMERIC\fP or \fBXmSTRING\fP, as defined by the \fBXmNspinBoxChildType\fP constraint resource\&. The ring of choices for numeric children is defined by minimum, maximum, incremental, and decimal point values\&. The ring of choices for string children is defined in an array of compound strings\&. .PP The application programmer can include multiple traversable children in the SpinBox\&. For example, a SpinBox might consist of a pair of arrows and month, day, and year text fields\&. The arrows only spin the child that currently has focus\&. .PP Arrow size is specified by the SpinBox resource \fBXmNarrowSize\fP\&. This value sets both width and height of each arrow in pixels\&. .PP The programmer can display SpinBox arrows in one of several layouts, as specified by the \fBXmNarrowLayout\fP resource: .IP "\fBXmARROWS_BEGINNING\fP" 10 Places a pair of left and right arrows before the children\&. .IP "\fBXmARROWS_END\fP" 10 Places a pair of left and right arrows after the children\&. .IP "\fBXmARROWS_SPLIT\fP" 10 Places one arrow on each side of the children\&. .IP "\fBXmARROWS_FLAT_BEGINNING\fP" 10 Places a pair of arrows side by side before the \fBXmSpinBox\fP children\&. .IP "\fBXmARROWS_FLAT_BEGINNING\fP" 10 Places a pair of arrows side by side after the \fBXmSpinBox\fP children\&. .PP Positions for \fBXmARROWS_BEGINNING\fP and \fBXmARROWS_END\fP are dependent on the \fBVendorShell\fP resource \fBXmNlayoutDirection\fP\&. When layout direction is left-to-right, beginning arrows are positioned to the left of the children\&. When layout direction is right-to-left, beginning arrows are positioned to the right\&. .PP The actions of the arrows are determined by the \fBVendorShell\fP resource \fBXmNlayoutDirection\fP\&. For left-to-right layouts, the right arrow is the increment arrow and the left arrow is the decrement arrow\&. For right-to-left layouts, the right arrow is the decrement arrow and the left arrow is the increment arrow\&. .PP For a numeric type child, the increment arrow increases the displayed value by the incremental value up to the maximum\&. The decrement arrow decreases the displayed value by the given incremental value down to the minimum\&. .PP The increment arrow for a string type child moves toward the last entry of the array of compound strings (by increasing the SpinBox constraint resource \fBXmNposition\fP)\&. The decrement arrow moves toward the first entry of the compound string array\&. .PP The programmer can also control the sensitivity of each arrow in the SpinBox\&. Sensitive arrows spin choices; insensitive arrows do not spin choices\&. Arrow sensitivity is set for the SpinBox widget by using the \fBXmNdefaultArrowSensitivity\fP resource, but it can be modified on a per child basis by using the \fBXmNarrowSensitivity\fP constraint resource\&. .PP SpinBox provides two callbacks to application programmers\&. (In addition, the callbacks of the SpinBox\&'s children may be invoked\&.) Each of these callbacks receives a pointer to \fBXmSpinBoxCallbackStruct\fR\&. The \fBXmNmodifyVerifyCallback\fP procedures are called \fIbefore\fP a new choice is displayed\&. The \fBXmNvalueChangedCallback\fP procedures are called \fIafter\fP a new choice is displayed\&. .PP \fBXmNmodifyVerifyCallback\fP tells the application what the new position will be in the ring of choices\&. This callback can be used to make the SpinBox stop at the upper and lower limits or go to a different, nonconsecutive choice\&. The application allows the change in position by leaving the \fIdoit\fP member set to True\&. The application can spin to a position other than the next consecutive position by leaving \fIdoit\fP set to True and by changing the \fIposition\fP member to the desired position\&. When \fIdoit\fP is set to False by an application, there is no change in the choice displayed\&. .PP After a new choice is displayed, the \fBXmNvalueChangedCallback\fP procedure is called\&. The application can use this procedure to perform tasks when specific values are reached or when boundaries are crossed\&. For example, if the user spins from January back to December, the application could change to the previous year\&. If the user spins from December to January, the application could change to the next year\&. .PP SpinBox dimensions can be set using the Core resources \fBXmNheight\fP and \fBXmNwidth\fP\&. If dimensions are not specified, the SpinBox size is determined by the sizes of its arrows and children\&. The SpinBox will attempt to grow so that the arrows and all children are visible\&. .PP SpinBox uses the \fBXmQTaccessTextual\fP trait and holds the \fBXmQTnavigator\fP trait\&. .SS "Classes" .PP SpinBox inherits behavior, resources, and traits from the \fBCore\fP, \fBComposite\fP, \fBConstraint\fP, and \fBXmManager\fP classes\&. .PP The class pointer is \fBxmSpinBoxWidgetClass\fP\&. .PP The class name is \fBXmSpinBox\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 whether the given resource can be set at creation time (C), set by using \fBXtSetValues\fP (S), retrieved by using \fBXtGetValues\fP (G), or is not applicable (N/A)\&. .TS tab(); lw(1.35in) lw(1.48in) lw(1.18in) lw(1.39in) lw(1.00in). \fBXmSpinBox Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP XmNarrowLayoutXmCArrowLayoutunsigned charXmARROWS_BEGINNINGCSG XmNarrowOrientationXmCArrowOrientationunsigned charXmARROWS_VERTICALCSG XmNarrowSizeXmCArrowSizeDimension16CSG XmNdefaultArrowSensitivityXmCDefaultArrowSensitivityunsigned charXmARROWS_SENSITIVECSG XmNdetailShadowThicknessXmCDetailShadowThicknessDimension2CSG XmNinitialDelayXmCInitialDelayunsigned int250 msCSG XmNmarginHeightXmCMarginHeightDimensiondynamicCSG XmNmarginWidthXmCMarginWidthDimensiondynamicCSG XmNmodifyVerifyCallbackXmCCallbackXtCallbackListNULLC XmNrepeatDelayXmCRepeatDelayunsigned int200 msCSG XmNspacingXmCSpacingDimensiondynamicCSG XmNvalueChangedCallbackXmCCallbackXtCallbackListNULLC .TE .IP "\fBXmNarrowLayout\fP" 10 Specifies placement of the two arrows in the widget\&. Possible layouts are as follows: .RS .IP "\fBXmARROWS_BEGINNING\fP" 10 Places left and right arrows beside each other, before the child(ren)\&. Positioning for this layout is dependent on the VendorShell resource \fBXmNlayoutDirection\&.\fP .IP "\fBXmARROWS_END\fP" 10 Places left and right arrows beside each other, after the child(ren)\&. Positioning for this layout is dependent on the VendorShell resource \fBXmNlayoutDirection\fP\&. .IP "\fBXmARROWS_FLAT_BEGINNING\fP" 10 Places a pair of arrows side by side before the \fBXmSpinBox\fP children\&. Positioning for this layout is dependent on the VendorShell resource \fBXmNlayoutDirection\&.\fP .IP "\fBXmARROWS_FLAT_END\fP" 10 Places a pair of arrows side by side after the \fBXmSpinBox\fP children\&. Positioning for this layout is dependent on the VendorShell resource \fBXmNlayoutDirection\&.\fP .IP "\fBXmARROWS_SPLIT\fP" 10 Places a left arrow on the left side and a right arrow on the right side of the child(ren)\&. .RE .IP "\fBXmNarrowSize\fP" 10 Specifies both the width and height of the arrow in pixels\&. .IP "\fBXmNdefaultArrowSensitivity\fP" 10 Specifies the default sensitivity of the arrows in the widget\&. Insensitive arrows change color, cannot be depressed, and perform no action\&. (This resource may be overridden by the constraint resource \fBXmNarrowSensitivity\fP for individual traversable text children of the SpinBox\&.) Possible default sensitivity values are as follows: .RS .IP "\fBXmARROWS_SENSITIVE\fP" 10 Both arrows are sensitive\&. .IP "\fBXmARROWS_DECREMENT_SENSITIVE\fP" 10 Only the decrement arrow (as determined by \fBXmNlayoutDirection\fP) is sensitive\&. The increment arrow is insensitive\&. .IP "\fBXmARROWS_INCREMENT_SENSITIVE\fP" 10 Only the increment arrow (as determined by \fBXmNlayoutDirection\fP) is sensitive\&. The decrement arrow is insensitive\&. .IP "\fBXmARROWS_INSENSITIVE\fP" 10 Both arrows are insensitive\&. .RE .IP "\fBXmNdetailShadowThickness\fP" 10 Specifies the thickness of the inside arrow shadows\&. The default thickness is 2 pixels\&. .IP "\fBXmNinitialDelay\fP" 10 Specifies how long, in milliseconds, the mouse button must be held down before automatic spinning begins\&. In other words, when the user selects the increment or decrement arrow and keeps it depressed, this delay occurs before the choices start spinning\&. If \fBXmNinitialDelay\fP is 0, then \fBXmNrepeatDelay\fP is used as the initial delay\&. .IP "\fBXmNmarginHeight\fP" 10 Specifies the amount of blank space between the top edge of the SpinBox widget and the first item in each column, and the bottom edge of the SpinBox widget and the last item in each column\&. .IP "\fBXmNmarginWidth\fP" 10 Specifies the amount of blank space between the left edge of the SpinBox widget and the first item in each row, and the right edge of the SpinBox widget and the last item in each row\&. .IP "\fBXmNmodifyVerifyCallback\fP" 10 This callback is called before the SpinBox position changes (see the Constraint resource \fBXmNposition\fP)\&. The application can use this callback to set the next position, change SpinBox resources, or cancel the impending action\&. For example, this callback can be used to stop the spinning just before wrapping at the upper and lower position boundaries\&. If the \fIdoit\fP member is set to False, nothing happens\&. Otherwise the position changes\&. Reasons sent by the callback are \fBXmCR_SPIN_NEXT\fP, \fBXmCR_SPIN_PRIOR\fP, \fBXmCR_SPIN_FIRST\fP, or \fBXmCR_SPIN_LAST\fP\&. .IP "\fBXmNrepeatDelay\fP" 10 When the user selects and keeps an arrow button depressed by pressing and holding \fB\fP, spinning begins\&. After the time specified in \fBXmNinitialDelay\fP elapses, the SpinBox position changes automatically until the arrow button is released\&. The \fBXmNrepeatDelay\fP resource specifies the delay in milliseconds between each automatic change\&. If \fBXmNrepeatDelay\fP is set to 0 (zero), automatic spinning is turned off and \fBXmNinitialDelay\fP is ignored\&. .IP "\fBXmNspacing\fP" 10 Specifies the horizontal and vertical spacing between items contained within the SpinBox widget\&. .IP "\fBXmNvalueChangedCallback\fP" 10 This is called \fIn\fP+1 times for \fIn\fP SpinBox position changes (see the Constraint resource \fBXmNposition\fP)\&. Reasons sent by the callback are \fBXmCR_OK\fP, \fBXmCR_SPIN_NEXT\fP, \fBXmCR_SPIN_PRIOR\fP, \fBXmCR_SPIN_FIRST\fP, or \fBXmCR_SPIN_LAST\fP\&. Other members are detailed in the callback structure description\&. .TS tab(); lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in). \fBXmSpinBox Constraint Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP XmNarrowSensitivityXmCArrowSensitivityunsigned charXmARROWS_DEFAULT_SENSITIVITYCSG XmNdecimalPointsXmCDecimalPointsshort0CSG XmNincrementValueXmCIncrementValueint1CSG XmNmaximumValueXmCMaximumValueint10CSG XmNminimumValueXmCMinimumValueint0CSG XmNnumValuesXmCNumValuesint0CSG XmNpositionXmCPositionint0CSG XmNpositionTypeXmCPositionTypecharXmPOSITION_VALUECG XmNspinBoxChildTypeXmSpinBoxChildTypeunsigned charXmSTRINGCG XmNvaluesXmCValuesXmStringTableNULLCSG .TE .IP "\fBXmNarrowSensitivity\fP" 10 Specifies the sensitivity of the arrows for a SpinBox child\&. By using this resource in the definition of a SpinBox child, the application programmer can override the default SpinBox sensitivity (set by \fBXmNdefaultArrowSensitivity\fP) for a particular child\&. This allows each traversable child to have a different arrow sensitivity\&. The arrow sensitivity values are as follows: .RS .IP "\fBXmARROWS_SENSITIVE\fP" 10 Both arrows are sensitive\&. .IP "\fBXmARROWS_DECREMENT_SENSITIVE\fP" 10 Only the decrement arrow (as determined by \fBXmNlayoutDirection\fP) is sensitive\&. .IP "\fBXmARROWS_INCREMENT_SENSITIVE\fP" 10 Only the increment arrow (as determined by \fBXmNlayoutDirection\fP) is sensitive\&. .IP "\fBXmARROWS_INSENSITIVE\fP" 10 Both arrows are insensitive\&. .IP "\fBXmARROWS_DEFAULT_SENSITIVITY\fP" 10 Use the sensitivity specified in the \fBXmNdefaultArrowSensitivity\fP resource\&. .RE .IP "\fBXmNdecimalPoints\fP" 10 Specifies the number of decimal places used when displaying the value of a SpinBox numeric type child\&. If the number of decimal places specified is greater than the number of digits in a displayed value, the value is padded with 0 (zeros)\&. For example, when \fBXmNinitialValue\fP is 1 and \fBXmNmaximumValue\fP is 1000 and \fBXmNdecimalPoints\fP is 3, the range of values displayed in the SpinBox is 0\&.001 to 1\&.000\&. This is used only when \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. .IP "\fBXmNincrementValue\fP" 10 Specifies the amount by which to increment or decrement a SpinBox numeric type child\&. This is used only when \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. .IP "\fBXmNmaximumValue\fP" 10 Specifies the highest possible value for a numeric SpinBox\&. This is used only when \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. .IP "\fBXmNminimumValue\fP" 10 Specifies the lowest possible value for a numeric SpinBox\&. This is used only when \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. .IP "\fBXmNnumValues\fP" 10 Specifies the number of strings in \fBXmNvalues\fP\&. The application must change this value when strings are added or removed from \fBXmNvalues\fP\&. This is used only when \fBXmNspinBoxChildType\fP is \fBXmSTRING\fP\&. .IP "\fBXmNposition\fP" 10 Specifies the position of the currently displayed item\&. The interpritation of \fBXmNposition\fP is dependent upon the value of the \fBXmNpositionType\fP resource\&. .IP "" 10 When \fBXmNpositionType\fP is \fBXmPOSITION_INDEX\fP the \fBXmNposition\fP value is interpreted as follows: For \fBXmSpinBox\fP children of type \fBXmNUMERIC\fP, the \fBXmNposition\fP resource is interpreted as an index into an array of items\&. The minimum allowable value for \fBXmNposition\fP is 0\&. The maximum allowable value for \fBXmNposition\fP is \fB(XmNmaximumValue-XmNminimumValue)/XmNincrementValue\fP\&. The value display by the \fBXmSpinBox\fP child is \fBXmNminimumValue+(XmNposition*XmNincrementValue)\fP\&. For \fBXmSpinBox\fP children of type \fBXmSTRING\fP, the \fBXmNposition\fP resource is interpreted as an index into an array of \fBXmNnumValues\fP items\&. The minimum allowable value for \fBXmNposition\fP is 0\&. The maximum allowable value for \fBXmNposition\fP is \fBXmNnumValues - 1\fP\&. The value displayed by the \fBXmSpinBox\fP is the \fBXmNposition\fP\&'th value in the \fBXmNvalues\fP array\&. .IP "" 10 When \fBXmNpositionType\fP is \fBXmPOSITION_VALUE\fP the \fBXmNposition\fP value is interpreted as follows: .IP "" 10 For \fBXmSpinBox\fP children of type \fBXmNUMERIC\fP, the \fBXmNposition\fP resource is interpreted as the actual value to be displayed\&. The minimum allowable value for \fBXmNposition\fP is \fBXmNminimumValue\fP\&. The maximum allowable value for \fBXmNposition\fP is \fBXmNmaximumValue\fP\&. The value displayed by the \fBXmSpinBox\fP child is \fBXmNposition\fP\&. For \fBXmSpinBox\fP children of type \fBXmSTRING\fP, the interpretation is the same for \fBXmPOSITION_VALUE\fP as for \fBXmPOSITION_INDEX\fP\&. .IP "" 10 Position values falling outside the specified range are invalid\&. When an application assigns a value to \fBXmNposition\fP which is less than the minimum, \fBXmNposition\fP is set to the minimum and an error message is displayed\&. When an application assigns a value to \fBXmNposition\fP which is greater than the maximum, \fBXmNposition\fP is set to the maximum and an error message is displayed\&. .IP "\fBXmNpositionType\fP" 10 Specifies how values the \fBXmNposition\fP resource are to be interpreted\&. Valid values include \fBXmPOSITION_INDEX\fP and \fBXmPOSITION_VALUE\fP\&. .IP "\fBXmNspinBoxChildType\fP" 10 Specifies the type of data displayed in the child: .RS .IP "\fBXmNUMERIC\fP" 10 The SpinBox choice range is defined by numeric minimum, maximum, and incremental values\&. .IP "\fBXmSTRING\fP" 10 The SpinBox choices are alphanumeric\&. .RE .IP "\fBXmNvalues\fP" 10 Specifies the array of \fBXmString\fRs to be displayed in a SpinBox string type child\&. The application must change \fBXmNnumValues\fP when strings are added to or removed from \fBXmNvalues\fP\&. This is used only when \fBXmNspinBoxChildType\fP is \fBXmSTRING\fP\&. .SS "Inherited Resources" .PP SpinBox inherits behavior and resources from the superclasses described in the following tables\&. For a complete description of each resource, refer to the reference page for that superclass\&. .TS tab(); lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in). \fBXmManager Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP XmNbottomShadowColorXmCBottomShadowColorPixeldynamicCSG XmNbottomShadowPixmapXmCBottomShadowPixmapPixmapXmUNSPECIFIED_PIXMAPCSG XmNforegroundXmCForegroundPixeldynamicCSG XmNhelpCallbackXmCCallbackXtCallbackListNULLC XmNhighlightColorXmCHighlightColorPixeldynamicCSG XmNhighlightPixmapXmCHighlightPixmapPixmapdynamicCSG XmNinitialFocusXmCInitialFocusWidgetdynamicCSG XmNlayoutDirectionXmCLayoutDirectionXmDirectiondynamicCG XmNnavigationTypeXmCNavigationTypeXmNavigationTypeXmTAB_GROUPCSG XmNpopupHandlerCallbackXmCCallbackXtCallbackListNULLC XmNshadowThicknessXmCShadowThicknessDimension0CSG XmNstringDirectionXmCStringDirectionXmStringDirectiondynamicCG XmNtopShadowColorXmCTopShadowColorPixeldynamicCSG XmNtopShadowPixmapXmCTopShadowPixmapPixmapdynamicCSG XmNtraversalOnXmCTraversalOnBooleanTrueCSG XmNunitTypeXmCUnitTypeunsigned chardynamicCSG XmNuserDataXmCUserDataXtPointerNULLCSG .TE .TS tab(); lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in). \fBComposite Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP XmNchildrenXmCReadOnlyWidgetListNULLG XmNinsertPositionXmCInsertPositionXtOrderProcNULLCSG XmNnumChildrenXmCReadOnlyCardinal0G .TE .TS tab(); lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in) lw(1.18in). \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" .PP A pointer to the following structure is passed to each callback: .PP .nf typedef struct { int \fIreason\fP; XEvent \fI* event\fP; Widget \fIwidget\fP; Boolean \fIdoit\fP; int \fIposition\fP; XmString \fIvalue\fP; Boolean \fIcrossed_boundary\fP; } XmSpinBoxCallbackStruct; .fi .IP "\fIreason\fP" 10 Indicates why the callback was invoked\&. Reasons may be the following: .RS .IP "\fBXmCR_OK\fP" 10 Spinning has stopped because the SpinBox arrow has been disarmed\&. \fBXmCR_OK\fP is either the last or only call\&. .IP "\fBXmCR_SPIN_NEXT\fP" 10 The increment arrow has been armed and position is increasing\&. Further callbacks will come\&. For a numeric type child, the values displayed are approaching the maximum\&. For a string SpinBox, the values displayed are approaching the last entry in the array of \fBXmString\fR s\&. .IP "\fBXmCR_SPIN_PRIOR\fP" 10 The decrement arrow has been armed and position is decreasing\&. Further callbacks will come\&. For a numeric type child, the values displayed are approaching the minimum\&. For a string type child, the values displayed are approaching the first entry in the array of \fBXmString\fRs\&. .IP "\fBXmCR_SPIN_FIRST\fP" 10 The begin data (\fB\fP) key sequence has been pressed\&. The SpinBox is at its first position, displaying the lowest value or the first entry in the array of \fBXmString\fRs\&. .IP "\fBXmCR_SPIN_LAST\fP" 10 The end data (\fB\fP) key sequence has been pressed\&. The SpinBox is at its last position, displaying the highest value or the last entry in the array of \fBXmString\fRs\&. .RE .IP "\fIevent\fP" 10 Points to the \fBXEvent\fP that triggered this callback\&. .IP "\fIwidget\fP" 10 Specifies the child widget affected by this callback\&. .IP "\fIdoit\fP" 10 When the callback is \fBXmNmodifyVerifyCallback\fP, \fIdoit\fP indicates whether or not an action will be performed before the SpinBox position changes\&. If the callback leaves \fIdoit\fP set to True (the default), the spinning action is performed\&. If the callback sets \fIdoit\fP to False, the spinning action is not performed\&. When the callback is \fBXmNvalueChangedCallback\fP, \fIdoit\fP is ignored\&. .IP "\fIposition\fP" 10 Specifies the next value of the SpinBox position (same as \fBXmNposition\fP)\&. This is an output field for the \fBXmNmodifyVerifyCallback\fP, which may change the next position as dictated by the needs of an application\&. .IP "\fIvalue\fP" 10 Specifies the new \fBXmString\fR value in the text child widget\&. The user program must copy this string if it is to be used outside the callback routine\&. .IP "\fIcrossed_boundary\fP" 10 Specifies whether or not the SpinBox has crossed the upper or lower boundary (the last or first compound string, or the maximum or minimum value)\&. The \fIcrossed_boundary\fP value is True if the SpinBox has just crossed a boundary, and False if it has not\&. .SS "Translations" .PP The \fBXmSpinBox\fP translations are as follows: .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\&. .IP "\fB\fP:" 10 SpinBArm() .IP "\fB\fP:" 10 SpinBDisarm() .IP "\fB:\fP\fB\fP\fB\fP :" 10 SpinBPrior() .IP "\fB:\fP\fB\fP\fB\fP :" 10 SpinBNext() .IP "\fB:\fP\fB\fP\fB\fP :" 10 SpinBLeft() .IP "\fB:\fP\fB\fP\fB\fP :" 10 SpinBRight() .IP "\fB:\fP\fB\fP\fB\fP :" 10 SpinBFirst() .IP "\fB:\fP\fB\fP\fB\fP :" 10 SpinBLast() .SS "Accelerators" .PP The \fBXmNaccelerators\fP resource of a SpinBox are added to each traversable text child\&. The default \fBXmNaccelerators\fP are defined in the following list\&. The bindings for \fB\fP\fB\fP and \fB\fP\fB\fP cannot be changed\&. .IP "\fB\fP \fB\fP:" 10 SpinBPrior() .IP "\fB\fP \fB\fP:" 10 SpinBNext() .IP "\fB\fP \fB\fP:" 10 SpinBDisarm() .IP "\fB\fP \fB\fP:" 10 SpinBDisarm() .IP "\fB\fP \fB\fP:" 10 SpinBLeft() .IP "\fB\fP \fB\fP:" 10 SpinBRight() .IP "\fB\fP \fB\fP:" 10 SpinBDisarm() .IP "\fB\fP \fB\fP:" 10 SpinBDisarm() .IP "\fB\fP \fB\fP:" 10 SpinBFirst() .IP "\fB\fP \fB\fP:" 10 SpinBLast() .SS "Action Routines" .PP The \fBXmSpinBox\fP action routines are as follows: .IP "SpinBArm():" 10 Visually arms the SpinBox by drawing the armed arrow so that it appears to be depressed\&. This action is initiated when the user presses \fB\fP while the pointer is within the boundaries of either the increment or decrement arrow\&. The arrow remains visually armed as long as \fB\fP remains depressed\&. .IP "" 10 If the time period specified by \fBXmNrepeatDelay\fP is not greater than zero milliseconds, nothing else happens while \fB\fP remains depressed\&. .IP "" 10 If the time period specified by \fBXmNrepeatDelay\fP is greater than zero milliseconds, and the arrow is disarmed before the time period specified by \fBXmNinitialDelay\fP has elapsed, nothing else happens in this action\&. .IP "" 10 If the time period specified by \fBXmNrepeatDelay\fP is greater than zero milliseconds, and the arrow is still armed after the time period specified by \fBXmNinitialDelay\fP has elapsed, the following occurs: .RS .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure, \fBXmSpinBoxCallbackStruct\fR, is set to \fBXmCR_SPIN_NEXT\fP if the increment arrow is armed, or to \fBXmCR_SPIN_PRIOR\fP if the decrement arrow is armed\&. .IP " \(bu" 6 The \fIposition\fP member is set to the next position\&. .IP " \(bu" 6 The \fIdoit\fP member is set to True\&. .IP " \(bu" 6 \fBXmNmodifyVerifyCallback\fP, if it exists, is invoked\&. The application may change the value of \fIposition\fP and \fIdoit\fP\&. If the application sets \fIdoit\fP to False, nothing else happens until the \fBXmNrepeatDelay\fP period has elapsed, or until \fB\fP is released\&. .RE .IP "" 10 If \fIdoit\fP remains set to True, the following occurs: .RS .IP " \(bu" 6 The value of \fBXmNposition\fP is changed to the value of \fIposition\fP in the SpinBox callback structure\&. .IP " \(bu" 6 The text corresponding to the new position is displayed in the traversable text child that currently has focus\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_SPIN_NEXT\fP if the increment arrow is armed, or \fBXmCR_SPIN_PRIOR\fP if the decrement arrow is armed\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) value of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP, if it exists, is called\&. SpinBox ignores any changes to \fIposition\fP or \fIdoit\fP members made by \fBXmNvalueChangedCallback\fP\&. .RE .IP "" 10 These events are repeated each time the \fBXmNrepeatDelay\fP period elapses and the arrow remains armed\&. .IP "SpinBDisarm():" 10 Visually disarms the SpinBox by drawing the previously armed arrow so that it no longer appears to be depressed\&. .IP "" 10 If the time period specified by \fBXmNrepeatDelay\fP is not greater than zero milliseconds, or the time period specified by \fBXmNinitialDelay\fP has not elapsed, the following then occurs: .RS .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure, \fBXmSpinBoxCallbackStruct\fR, is set to \fBXmCR_SPIN_NEXT\fP if the increment arrow is armed, or to \fBXmCR_SPIN_PRIOR\fP if the decrement arrow is armed\&. .IP " \(bu" 6 The \fIposition\fP member is set to the next position\&. .IP " \(bu" 6 The \fIdoit\fP member is set to True\&. .IP " \(bu" 6 The \fBXmNmodifyVerifyCallback\fP, if there is one, is invoked\&. The application may change the value of \fIposition\fP and \fIdoit\fP\&. If the application sets \fIdoit\fP to False, nothing else happens until the \fBXmNrepeatDelay\fP period has elapsed, or until \fB\fP is released\&. .RE .IP "" 10 If \fIdoit\fP remains set to True, the following occurs: .RS .IP " \(bu" 6 The value of \fBXmNposition\fP is changed to the value of \fIposition\fP in the SpinBox callback structure\&. .IP " \(bu" 6 The text corresponding to the new position is displayed in the traversable text child that currently has focus\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_SPIN_NEXT\fP if the increment arrow is armed, or \fBXmCR_SPIN_PRIOR\fP if the decrement arrow is armed\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) value of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP, if it exists, is called\&. SpinBox ignores any changes to \fIposition\fP or \fIdoit\fP members made by an \fBXmNvalueChangedCallback\fP\&. .RE .IP "" 10 If an \fBXmNvalueChangedCallback\fP procedure is issued after the button has been armed, regardless of the value of \fBXmNrepeatDelay\fP or whether the \fBXmNinitialDelay\fP has expired: .RS .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_OK\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current value of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP, if it exists, is called\&. .RE .IP "SpinBFirst():" 10 The following occurs: .RS .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure, \fBXmSpinBoxCallbackStruct\fR, is set to \fBXmCR_SPIN_FIRST\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the first (0) position\&. .IP " \(bu" 6 The \fIdoit\fP member is set to True\&. .IP " \(bu" 6 \fBXmNmodifyVerifyCallback\fP, if it exists, is invoked\&. The application may change the value of \fIposition\fP and \fIdoit\fP\&. If the application sets \fIdoit\fP to False, nothing else happens until the \fBXmNrepeatDelay\fP period has elapsed, or until \fB\fP is released\&. .RE .IP "" 10 If \fIdoit\fP remains set to True, the following occurs: .RS .IP " \(bu" 6 The value of \fBXmNposition\fP is changed to the value of \fIposition\fP in the SpinBox callback structure\&. .IP " \(bu" 6 The text corresponding to the new position is displayed in the traversable text child that currently has focus\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_SPIN_FIRST\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) value of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP, if it exists, is called\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_OK\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) \fBXmNposition\fP value\&. .IP " \(bu" 6 The \fBXmNvalueChangedCallback\fP is called again\&. SpinBox ignores any changes to \fIposition\fP or \fIdoit\fP members made by \fBXmNvalueChangedCallback\fP\&. .RE .IP "SpinBLast():" 10 The following occurs: .RS .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure, \fBXmSpinBoxCallbackStruct\fR, is set to \fBXmCR_SPIN_LAST\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the last position\&. .IP " \(bu" 6 The \fIdoit\fP member is set to True\&. .IP " \(bu" 6 \fBXmNmodifyVerifyCallback\fP, if it exists, is invoked\&. The application may change the value of \fIposition\fP and \fIdoit\fP\&. If the application sets \fIdoit\fP to False, nothing else happens until the \fBXmNrepeatDelay\fP period has elapsed, or until \fB\fP is released\&. .RE .IP "" 10 If \fIdoit\fP remains set to True, the following occurs: .RS .IP " \(bu" 6 The value of \fBXmNposition\fP is changed to the value of \fIposition\fP in the SpinBox callback structure\&. .IP " \(bu" 6 The text corresponding to the new position is displayed in the traversable text child that currently has focus\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_SPIN_LAST\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) value \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP, if it exists, is called\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_OK\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP is called again\&. SpinBox ignores any changes to the \fIposition\fP or \fIdoit\fP members made by \fBXmNvalueChangedCallback\fP\&. .RE .IP "SpinBLeft():" 10 If the VendorShell resource \fBXmNlayoutDirection\fP is left-to-right, the \fBSpinBPrior\fP action is invoked\&. Otherwise, the \fBSpinBNext\fP action is invoked\&. .IP "SpinBNext():" 10 Visually arms the SpinBox by drawing the increment arrow so that it appears to be depressed\&. The following occurs: .RS .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure, \fBXmSpinBoxCallbackStruct\fR, is set to \fBXmCR_SPIN_NEXT\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the next position\&. .IP " \(bu" 6 The \fIdoit\fP member is set to True\&. .IP " \(bu" 6 \fBXmNmodifyVerifyCallback\fP, if it exists, is invoked\&. The application may change the value of \fIposition\fP and \fIdoit\fP\&. If the application sets \fIdoit\fP to False, nothing else happens until the \fBXmNrepeatDelay\fP period has elapsed, or until \fB\fP is released\&. .RE .IP "" 10 If \fIdoit\fP remains set to True, the following occurs: .RS .IP " \(bu" 6 The value of \fBXmNposition\fP is changed to the value of \fIposition\fP in the SpinBox callback structure\&. .IP " \(bu" 6 The text corresponding to the new position is displayed in the traversable text child that currently has focus\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_SPIN_NEXT\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) value of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP, if it exists, is called\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_OK\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) \fBXmNposition\fP\&. .IP " \(bu" 6 The \fBXmNvalueChangedCallback\fP is called again\&. SpinBox ignores any changes to \fIposition\fP or \fIdoit\fP members made by \fBXmNvalueChangedCallback\fP\&. .RE .IP "SpinBPrior():" 10 Visually arms the SpinBox by drawing the decrement arrow so that it appears to be depressed\&. The following occurs: .RS .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure, \fBXmSpinBoxCallbackStruct\fR, is set to \fBXmCR_SPIN_PRIOR\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the next position\&. .IP " \(bu" 6 The \fIdoit\fP member is set to True\&. .IP " \(bu" 6 \fBXmNmodifyVerifyCallback\fP, if it exists, is invoked\&. The application may change the value of \fIposition\fP and \fIdoit\fP\&. If the application sets \fIdoit\fP to False, nothing else happens until the \fBXmNrepeatDelay\fP period has elapsed, or until \fB\fP is released\&. .RE .IP "" 10 If \fIdoit\fP remains set to True, the following occurs: .RS .IP " \(bu" 6 The value of \fBXmNposition\fP is changed to the value of \fIposition\fP in the SpinBox callback structure\&. .IP " \(bu" 6 The text corresponding to the new position is displayed in the traversable text child that currently has focus\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_SPIN_PRIOR\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) value of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP, if it exists, is called\&. .IP " \(bu" 6 The \fIreason\fP member of the SpinBox callback structure is set to \fBXmCR_OK\fP\&. .IP " \(bu" 6 The \fIposition\fP member is set to the current (new) value of \fBXmNposition\fP\&. .IP " \(bu" 6 \fBXmNvalueChangedCallback\fP is called again\&. SpinBox ignores any changes to \fIposition\fP or \fIdoit\fP members made by \fBXmNvalueChangedCallback\fP\&. .RE .IP "SpinBRight():" 10 If the VendorShell resource \fBXmNlayoutDirection\fP is left-to-right, the \fBSpinBNext\fP action is invoked\&. Otherwise, the \fBSpinBPrior\fP action is invoked\&. .SH "RELATED" .PP \fBComposite\fP(3), \fBConstraint\fP(3), \fBCore\fP(3), \fBXmCreateSpinBox\fP(3), \fBXmManager\fP(3), \fBXmString\fP(3), \fBXmVaCreateSpinBox\fP(3), and \fBXmVaCreateManagedSpinBox\fP(3)\&.