NextPrevUpTopContentsIndex

text-input-range

Class
Summary

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.

Package

capi

Superclasses

titled-object
simple-pane

Initargs

:start

An integer specifying the lowest possible value in the range.

:end

An integer specifying the highest possible value in the range.

:wraps-p

A generalized boolean.

:value

An integer specifying the current value in the pane.

:callback

A function called when the value is changed by the user.

:callback-type

The type of arguments passed to the callback.

Accessors

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

Description

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) .

Examples
(capi:contain
 (make-instance 'capi:text-input-range
           :start 0 
           :end 100 
           :value 42))
See also

text-input-pane
text-input-choice
option-pane


LispWorks CAPI Reference Manual - 17 Mar 2008

NextPrevUpTopContentsIndex