Next Previous Up Top Contents Index

8.11 DUIM-Gadgets Module

<slider>

Open abstract instantiable class

Summary

The class of slider gadgets.

Superclasses

<value-range-gadget>

Init-keywords

min-label:
An instance of type type-union(<string>, <image>).

max-label:
An instance of type type-union(<string>, <image>).

borders:
An instance of type one-of(#f, #"none", #"flat", #"sunken", #"raised", #"ridge", #"groove", #"input", #"output"). Default value: #f.

tick-marks:
An instance of type false-or(<integer>). Default value: #f

orientation:
An instance of type one-of(#"horizontal", #"vertical"). Default value: #"horizontal".

value-changing-callback:

An instance of type <function>.

Library

duim-gadgets

Module

duim-gadgets

Description

The class of slider gadgets. This is a gadget used for setting or adjusting the value on a continuous range of values, such as a volume or brightness control.

Figure 8.34 A slider

You can specify a number of attributes for the labels in a slider. The min-label: and max-label: init-keywords let you specify a label to be displayed at the minimum and maximum points of the slider bar, respectively. In addition, the range-label-text-style: init-keyword lets you specify a text style for these labels.

The borders: init-keyword lets you specify a border around the slider. If specified, a border of the appropriate type is drawn around the gadget.

The tick-marks: init-keyword specifies the number of tick-marks that are shown on the slider. Displaying tick marks gives the user a better notion of the position of the slug at any time.

The orientation: init-keyword specifies whether the slider is horizontal or vertical.

The value-changing-callback: init-keyword is the callback that is invoked when the slider slug is dragged.

Internally, this class maps into the Windows trackbar control.

When designing a user interface, you will find that spin boxes are a suitable alternative to spin boxes in many situations.

Operations

None.

Example

contain(make(<slider>, 
             value-range: 
                range(from: -20, to: 20, by: 5)));

See also

<scroll-bar>, page 637

<spin-box>, page 648


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index