Next Previous Up Top Contents Index

8 DUIM-Gadgets Library

8.1 Overview

The elements that comprise a Graphical User Interface (GUI) are arranged in a hierarchical ordering of object classes. At the top level of the DUIM hierarchy there are three main classes, <sheet>, <gadget>, and <frame>, all of which are subclasses of <object>.

The DUIM-Gadgets library contains classes that define a wide variety of gadgets for use in your GUI applications, such as push buttons, radio buttons, and check boxes. The library also provides the necessary functions, generic functions, and macros for creating and manipulating these classes. The library contains a single module, duim-gadgets, from which all the interfaces described in this chapter are exposed. Section 8.11 on page 526 contains complete reference entries for each exposed interface.

Gadgets are the basic behavioral GUI element (above the level of events).

Some of the more important types of gadget are as follows:

Buttons

A wide variety of buttons are provided by DUIM. These include not only standard buttons such as push buttons and radio buttons, but items that can be placed within menus.

Action gadgets

An action gadget is any gadget that can be used to perform an action, such as a button, or menu command.

Value gadgets

A value gadget is any gadget that can have a value associated with it. In principle, this is true of the majority of gadgets, but the value of a gadget is more important for certain types of gadget (for instance, lists or radio boxes) than for others (for instance, push buttons).

Value range gadgets

Value range gadgets are those value gadgets for which the possible value sits within a defined range. This includes gadgets such as scroll bars and sliders.
Collection gadgets

Collection gadgets are those gadgets that can contain a number of "child" gadgets, the specification of which can be described in terms of a Dylan collection, and includes gadgets such as list controls and groups of buttons. Usually, the behavior of each of the "child" gadgets is interdependent in some way; for example, only one button in a group of radio buttons may be selected at any time. With collection gadgets, you can specify the "child" gadgets very simply, without having to worry about defining each "child" explicitly.

Each of these types of gadget is described in more detail in subsequent sections, and full reference entries for every interface exposed in the DUIM-Gadgets library are available in Section 8.11 on page 526. For a more general introduction to the gadgets provided in DUIM, see the tour in the Building Applications Using DUIM book. See the same book for a more practical example of implementing an application using the DUIM library.


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index