The class
text-input-range
is a pane for entering a number in a given range. Typically there are up and down buttons at the side which can used to quickly adjust the value.
An integer specifying the lowest possible value in the range.
An integer specifying the highest possible value in the range.
A generalized boolean.
An integer specifying the current value in the pane.
A function called when the value is changed by the user.
The type of arguments passed to the callback.
text-input-range-start
text-input-range-end
text-input-range-wraps-p
text-input-range-value
text-input-range-callback
text-input-range-callback-type
The class
text-input-range
provides numeric input of integers in a given range (some systems refer to this a spinner or spin-box).
The range is controlled by the
:start
and
:end
initargs.
start
defaults to
0
and
end
defaults to
10
. The initial value is set with the argument
value
(which defaults to
0
).
wraps-p
controls what happens if the user presses the up or down button until the start or end is reached. If
wraps-p
is
nil
, then it stops at the limit. If
wraps-p
is true then it wraps around to the other end. The default value of
wraps-p
is
nil
.
callback
provides a function to be called whenever the value is changed by the user. The arguments to this function are specified by
callback-type
(see the callbacks class for details of possible values, noting that the "data" is the value and the "item" is the pane itself). The default
callback-type
is
(:item :data)
.