1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329
|
'\" 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" "library call"
.SH "NAME"
\fBXmSimpleSpinBox\fP \(em a simple SpinBox widget class
.SH "SYNOPSIS"
.PP
.nf
#include <Xm/SSpinB\&.h>
.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)\&.
|