Next Previous Up Top Contents Index

8.11 DUIM-Gadgets Module

gadget-value-range

Generic function

Summary

Returns the range of values for the specified gadget.

Signature

gadget-value-range gadget => range

Arguments

gadget
An instance of type <value-range-gadget>.

Values

range
An instance of type <range>.

Library

duim-gadgets

Module

duim-gadgets

Description

Returns the range of values for gadget. The value range is the elements represented by the range specified for gadget.

Note: The value range is not simply the difference between the maximum and minimum values in the range. Consider the following range:

range (from: 10, to: 0, by: -2)

In this case, the value range is the elements 10, 8, 6, 4, 2, 0.

The units in which the range is specified are also used for gadget-slug-size.

Example

You can create a slider with a given range as follows:

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

You can return the range of this gadget by executing the following:

gadget-value-range(*slider*);

which in this case returns {range -20 through 20, by 5}.

See also

gadget-slug-size, page 582

gadget-value, page 585

gadget-value-range-setter, page 592


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index