'\" t .\" SSpinBox.sgm /main/10 1996/09/25 16:01:39 cdedoc $ .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed -e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "XmSimpleSpinBox" 3 .SH "NAME" \fBXmSimpleSpinBox\fP \(em a simple SpinBox widget class .SH "SYNOPSIS" .PP .nf #include .fi .SH "DESCRIPTION" .PP The XmSimpleSpinBox widget is a user interface control to increment and decrement an arbitrary TextField\&. For example, it can be used to cycle through the months of the year or days of the month\&. .PP Widget subclassing is not supported for the XmSimpleSpinBox widget class\&. .SS "Classes" .PP The XmSimpleSpinBox widget inherits behavior and resources from the \fBCore\fP, \fBComposite\fP and \fBXmManager\fP classes\&. .PP The class pointer is \fBXmSimpleSpinBoxWidgetClass\fP\&. .PP The class name is \fBXmSimpleSpinBoxWidget\fR\&. .SS "New Resources" .PP The following table defines a set of widget resources used by the application to specify data\&. The application 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, the application must 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, the application must remove the \fBXm\fP prefix and use the remaining letters (in either lower case or upper case, but including any underscores between words)\&. The codes in the access column indicate if the given resource can be set at creation time (C), set by using \fBXtSetValues\fP (S), retrieved by using \fBXtGetValues\fP (G), or is not applicable (N/A)\&. .TS tab(); lw(1.760313i) lw(1.455192i) lw(0.672831i) lw(0.837127i) lw(0.774538i). \fBXmSimpleSpinBox Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP \fBXmNarrowLayout\fP\fBXmCArrowLayout\fP\fBunsigned char\fRXmARROWS_ENDCSG \fBXmNarrowSensitivity\fP\fBXmCArrowSensitivity\fP\fBunsigned char\fRXmARROWS-_SENSITIVECSG \fBXmNcolumns\fP\fBXmCColumn\fP\fBshort\fR20CSG \fBXmNdecimalPoints\fP\fBXmCDecimalPoints\fP\fBshort\fR0CSG \fBXmNeditable\fP\fBXmCEditable\fP\fBBoolean\fPTrueCSG \fBXmNincrementValue\fP\fBXmCIncrementValue\fP\fBint\fR1CSG \fBXmNinitialDelay\fP\fBXmCInitialDelay\fP\fBunsigned int\fR250CSG \fBXmNmaximumValue\fP\fBXmCMaximumValue\fP\fBint\fR10CSG \fBXmNminimumValue\fP\fBXmCMinimumValue\fP\fBint\fR0CSG \fBXmNmodifyVerifyCallback\fP\fBXmCCallback\fP\fBXtCallbackList\fRNULLC \fBXmNnumValues\fP\fBXmCNumValues\fP\fBint\fR0CSG \fBXmNposition\fP\fBXmCPosition\fP\fBint\fR0CSG \fBXmNrepeatDelay\fP\fBXmCRepeatDelay\fP\fBunsigned int\fR200CSG \fBXmNspinBoxChildType\fP\fBXmCSpinBoxChildType\fP\fBunsigned char\fRXmSTRINGCG \fBXmNtextField\fP\fBXmCTextField\fP\fBWidget\fRdynamicG \fBXmNvalueChangedCallback\fP\fBXmCCallback\fP\fBXtCallbackList\fRNULLC \fBXmNvalues\fP\fBXmCValues\fP\fBXmStringTable\fRNULLCSG .TE .IP "\fBXmNarrowLayout\fP" 10 Specifies the style and position of the SpinBox arrows\&. The following values are supported: .RS .IP "XmARROWS_FLAT_BEGINNING" 10 The arrows are placed side by side to the right of the TextField\&. .IP "XmARROWS_FLAT_END" 10 The arrows are placed side by side to the left of the TextField\&. .IP "XmARROWS_SPLIT" 10 The down arrow is on the left and the up arrow is on the right of the TextField\&. .IP "XmARROWS_BEGINNING" 10 The arrows are stacked and placed on the left of the TextField\&. .IP "XmARROWS_END" 10 The arrows are stacked and placed on the right of the TextField\&. .RE .IP "\fBXmNarrowSensitivity\fP" 10 Specifies the sensitivity of the arrows in the XmSimpleSpinBox\&. The following values are supported: .RS .IP "XmARROWS_SENSITIVE" 10 Both arrows are active to user selection\&. .IP "XmARROWS_DECREMENT_SENSITIVE" 10 The down arrow is active and the up arrow is inactive to user selection\&. .IP "XmARROWS_INCREMENT_SENSITIVE" 10 The up arrow is active and the down arrow is inactive to user selection\&. .IP "XmARROWS_INSENSITIVE" 10 Both arrows are inactive to user selection\&. .RE .IP "\fBXmNcolumns\fP" 10 Specifies the number of columns of the text field\&. .IP "\fBXmNdecimalPoints\fP" 10 Specifies the position of the radix character within the numeric value when \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. This resource is used to allow for floating point values in the XmSimpleSpinBox widget\&. .IP "\fBXmNeditable\fP" 10 Specifies whether the text field can take input\&. .IP "" 10 When \fBXmNeditable\fP is used on a widget it sets the dropsite to \fBXmDROP_SITE_ACTIVE\fP\&. .IP "\fBXmNincrementValue\fP" 10 Specifies the amount to increment or decrement the \fBXmNposition\fP when the \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. When the Up action is activated, the \fBXmNincrementValue\fP is added to the \fBXmNposition\fP value; when the Down action is activated, the \fBXmNincrementValue\fP is subtracted from the \fBXmNposition\fP value\&. When \fBXmNspinBoxChildType\fP is \fBXmSTRING\fP, this resource is ignored\&. .IP "\fBXmNinitialDelay\fP" 10 Specifies the amount of time in milliseconds before the Arrow buttons will begin to spin continuously\&. .IP "\fBXmNnumValues\fP" 10 Specifies the number of items in the \fBXmNvalues\fP list when the \fBXmNspinBoxChildType\fP resource is \fBXmSTRING\fP\&. The value of this resource must be a positive integer\&. The \fBXmNnumValues\fP is maintained by the XmSimpleSpinBox widget when items are added or deleted from the \fBXmNvalues\fP list\&. When \fBXmNspinBoxChildType\fP is not \fBXmSTRING\fP, this resource is ignored\&. .IP "\fBXmNvalues\fP" 10 Supplies the list of strings to cycle through when the \fBXmNspinButtonChildType\fP resource is \fBXmSTRING\fP\&. When \fBXmNspinBoxChildType\fP is not \fBXmSTRING\fP, this resource is ignored\&. .IP "\fBXmNmaximumValue\fP" 10 Specifies the upper bound on the XmSimpleSpinBox\&'s range when \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. .IP "\fBXmNminimumValue\fP" 10 Specifies the lower bound on the XmSimpleSpinBox\&'s range when \fBXmNspinBoxChildType\fP is \fBXmNUMERIC\fP\&. .IP "\fBXmNmodifyVerifyCallback\fP" 10 Specifies the callback to be invoked just before the XmSimpleSpinBox position changes\&. The application can use this callback to implement new application-related logic (including setting new position spinning to, or canceling 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 application sets the \fIdoit\fP member of the \fBXmSimpleSpinBoxCallbackStruct\fR to False, nothing happens\&. Otherwise, the position changes\&. Reasons sent by the callback are \fBXmCR_SPIN_NEXT\fP, or \fBXmCR_SPIN_PRIOR\fP\&. .IP "\fBXmNposition\fP" 10 The \fBXmNposition\fP resource has a different value based on the \fBXmNspinBoxChildType\fP resource\&. When \fBXmNspinBoxChildType\fP is \fBXmSTRING\fP, the \fBXmNposition\fP is the index into the \fBXmNvalues\fP list for the current item\&. When the \fBXmNspinBoxChildType\fP resource is \fBXmNUMERIC\fP, the \fBXmNposition\fP is the integer value of the XmSimpleSpinBox that falls within the range of \fBXmNmaximumValue\fP and \fBXmNminimumValue\fP\&. .IP "\fBXmNrepeatDelay\fP" 10 Specifies the number of milliseconds between repeated calls to the \fBXmNvalueChangedCallback\fP while the user is spinning the XmSimpleSpinBox\&. .IP "\fBXmNspinBoxChildType\fP" 10 Specifies the style of the XmSimpleSpinBox\&. The following values are supported: .RS .IP "XmSTRING" 10 The child is a string value that is specified through the \fBXmNvalues\fP resource and incremented and decremented by changing the \fBXmNposition\fP resource\&. .IP "XmNUMERIC" 10 The child is a numeric value that is specified through the \fBXmNposition\fP resource and incremented according to the \fBXmNincrementValue\fP resource\&. .RE .IP "\fBXmtextField\fP" 10 Specifies the textfield widget\&. .IP "\fBXmNvalueChangedCallback\fP" 10 Specifies the callback to be invoked whenever the value of the \fBXmNposition\fP resource is changed through the use of the spinner arrows\&. The \fBXmNvalueChangedCallback\fP passes the \fBXmSimpleSpinBoxCallbackStruct\fR \fIcall_data\fP structure\&. .SS "Inherited Resources" .PP The XmSimpleSpinBox widget inherits behavior and resources from the following named superclasses\&. For a complete description of each resource, see the man page for that superclass\&. .TS tab(); lw(1.573795i) lw(1.565512i) lw(0.894578i) lw(0.712349i) lw(0.753765i). \fBXmManager Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP \fBXmNbottomShadowColor\fP\fBXmCBottomShadowColor\fP\fBPixel\fRdynamicCSG \fBXmNbottomShadowPixmap\fP\fBXmCBottomShadowPixmap\fP\fBPixmap\fR\fBXmUNSPECIFIED_PIXMAP\fPCSG \fBXmNforeground\fP\fBXmCForeground\fP\fBPixel\fRdynamicCSG \fBXmNhelpCallback\fP\fBXmCCallback\fP\fBXtCallbackList\fRNULLC \fBXmNhighlightColor\fP\fBXmCHighlightColor\fP\fBPixel\fRdynamicCSG \fBXmNhighlightPixmap\fP\fBXmCHighlightPixmap\fP\fBPixmap\fRdynamicCSG \fBXmNinitialFocus\fP\fBXmCInitialFocus\fP\fBWidget\fRNULLCSG \fBXmNnavigationType\fP\fBXmCNavigationType\fP\fBXmNavigationType\fRdynamicCSG \fBXmNshadowThickness\fP\fBXmCShadowThickness\fP\fBDimension\fRdynamicCSG \fBXmNstringDirection\fP\fBXmCStringDirection\fP\fBXmStringDirection\fRdynamicCG \fBXmNtopShadowColor\fP\fBXmCTopShadowColor\fP\fBPixel\fRdynamicCSG \fBXmNtopShadowPixmap\fP\fBXmCTopShadowPixmap\fP\fBPixmap\fRdynamicCSG \fBXmNtraversalOn\fP\fBXmCTraversalOn\fP\fBBoolean\fRdynamicCSG \fBXmNunitType\fP\fBXmCUnitType\fP\fBunsigned char\fRdynamicCSG \fBXmNuserData\fP\fBXmCUserData\fP\fBXtPointer\fRNULLCSG .TE .TS tab(); lw(1.563813i) lw(1.581583i) lw(0.701939i) lw(0.879645i) lw(0.773021i). \fBComposite Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP \fBXmNchildren\fP\fBXmCReadOnly\fP\fBWidgetList\fRNULLG \fBXmNinsertPosition\fP\fBXmCInsertPosition\fP\fBXtOrderProc\fRdefault procedureCSG \fBXmNnumChildren\fP\fBXmCReadOnly\fP\fBCardinal\fR0G .TE .TS tab(); lw(1.595729i) lw(1.571429i) lw(0.761414i) lw(0.704713i) lw(0.866716i). \fBCore Resource Set\fP \fBName\fP\fBClass\fP\fBType\fP\fBDefault\fP\fBAccess\fP \fBXmNaccelerators\fP\fBXmCAccelerators\fP\fBXtAccelerators\fRdynamicCSG \fBXmNancestorSensitive\fP\fBXmCSensitive\fP\fBBoolean\fRdynamicG \fBXmNbackground\fP\fBXmCBackground\fP\fBPixel\fRdynamicCSG \fBXmNbackgroundPixmap\fP\fBXmCPixmap\fP\fBPixmap\fR\fBXmUNSPECIFIED_PIXMAP\fPCSG \fBXmNborderColor\fP\fBXmCBorderColor\fP\fBPixel\fRXtDefaultForegroundCSG \fBXmNborderPixmap\fP\fBXmCPixmap\fP\fBPixmap\fR\fBXmUNSPECIFIED_PIXMAP\fPCSG \fBXmNborderWidth\fP\fBXmCBorderWidth\fP\fBDimension\fR0CSG \fBXmNcolormap\fP\fBXmCColormap\fP\fBColormap\fRdynamicCG \fBXmNdepth\fP\fBXmCDepth\fP\fBint\fRdynamicCG \fBXmNdestroyCallback\fP\fBXmCCallback\fP\fBXtCallbackList\fRNULLC \fBXmNheight\fP\fBXmCHeight\fP\fBDimension\fRdynamicCSG \fBXmNinitialResourcesPersistent\fP\fBXmCInitialResourcesPersistent\fP\fBBoolean\fRTrueC \fBXmNmappedWhenManaged\fP\fBXmCMappedWhenManaged\fP\fBBoolean\fRTrueCSG \fBXmNscreen\fP\fBXmCScreen\fP\fBScreen *\fRdynamicCG \fBXmNsensitive\fP\fBXmCSensitive\fP\fBBoolean\fRTrueCSG \fBXmNtranslations\fP\fBXmCTranslations\fP\fBXtTranslations\fRdynamicCSG \fBXmNwidth\fP\fBXmCWidth\fP\fBDimension\fRdynamicCSG \fBXmNx\fP\fBXmCPosition\fP\fBPosition\fR0CSG \fBXmNy\fP\fBXmCPosition\fP\fBPosition\fR0CSG .TE .SS "Callback Information" .PP A pointer to the following structure is passed to each XmSimpleSpinBox callback: .PP .nf \f(CWtypedef struct { int \fIreason\fP; XEvent *\fIevent\fP; Widget \fIwidget\fP; Boolean \fIdoit\fP; int \fIposition\fP; XmString \fIvalue\fP; Boolean \fIcrossed_boundary\fP; } XmSimpleSpinBoxCallbackStruct;\fR .fi .PP .PP The \fIreason\fP argument indicates why the callback was invoked\&. There are three possible reasons for this callback to be issued\&. The reason is \fBXmCR_OK\fP when this is the first call to the callback at the beginning of a spin or if it is a single activation of the spin arrows\&. If the XmSimpleSpinBox is in the process of being continuously spun, then the reason will be \fBXmCR_SPIN_NEXT\fP or \fBXmCR_SPIN_PRIOR\fP, depending on the arrow that is spinning\&. .PP The \fIevent\fP argument points to the \fBXEvent\fR that triggered the callback\&. It can be \fBNULL\fP when the XmSimpleSpinBox is continuously spinning\&. .PP The \fIwidget\fP argument is the widget identifier for the simple spin box widget that has been affected by this callback\&. .PP The \fIdoit\fP argument is set only when the \fIcall_data\fP comes from the \fBXmNmodifyVerifyCallback\fP\&. It indicates that the action that caused the callback to be called should be performed\&. The action is not performed if \fIdoit\fP is set to False\&. .PP The \fIposition\fP argument is the new value of the \fBXmNposition\fP resource as a result of the spin\&. .PP The \fIvalue\fP argument is the new \fBXmString\fR value displayed in the Text widget as a result of the spin\&. The application must copy this string if it is used beyond the scope of the \fIcall_data\fP structure\&. .PP The \fIcrossed_boundary\fP argument is True when the spinbox cycles\&. This is the case when a \fBXmNspinBoxChildType\fP of \fBXmSTRING\fP wraps from the first item to the last or the last item to the first\&. In the case of the \fBXmNspinBoxChildType\fP of \fBXmNUMERIC\fP, the boundary is crossed when the XmSimpleSpinBox cycles from the maximum value to the minimum or vice versa\&. .SH "ERRORS/WARNINGS" .PP The toolkit will display a warning if the application tries to set the value of the \fBXmNtextField\fP resource, which is read-only (marked G in the resource table)\&. .SH "SEE ALSO" .PP \fBXmSpinBox\fP(3), \fBXmCreateSimpleSpinBox\fP(3), \fBXmCreateSpinBox\fP(3), \fBXmSimpleSpinBoxAddItem\fP(3), \fBXmSimpleSpinBoxDeletePos\fP(3), \fBXmSimpleSpinBoxSetItem\fP(3), \fBComposite\fP(3), \fBCore\fP(3), \fBXmManager\fP(3), \fBXmText\fP(3), \fBXmTextField\fP(3), \fBXtGetValues\fP(3), \fBXtSetValues\fP(3), \fBXmVaCreateSimpleSpinBox\fP(3), and \fBXmVaCreateManagedSimpleSpinBox\fP(3)\&.