The base class for the majority of DUIM gadgets is the <gadget> class, which is itself a subclass of <object>. All other DUIM gadgets are subclasses of <gadget>, with the exception of <list-item>, <tree-node>, and <table-item>.
The immediate subclasses of <gadget> are shown in Table 8.1. Only <value-gadget> and <page> have any subclasses defined. See Section 8.4.2 on page 509 and Section 8.4.2 on page 509 for details of these subclasses.
The <gadget> class provides a number of subclasses that allow particular parts of a user interface to be created:
<menu>Use this class to add a menu to the menu bar of any application frame. Menus themselves contain commands created using the menu-specific button and collection gadgets described in Section 8.4.4 and Section 8.4.5.
<tool-bar>This class is used to add a tool bar to an application frame. A tool bar is a row of buttons that duplicates the functionality of the most commonly used menu commands, thereby providing the user with quick access to the most useful operations in the application.
<scroller>This is a generic scrolling gadget that can be used in a number of situations.
<viewport>A viewport can be used to create a generic pane for displaying specialized contents that you may have defined. Use this class when there is no other class provided for displaying the objects in question.
<splitter>This class can be used to split the current view in half. This allows the user, for example, to create a second view of the same document.
The <gadget> class provides a number of subclasses that allow general spatial and grouping capability, in addition to the layout functionality described in Chapter 7, "DUIM-Layouts Library". These are as follows:
<label>This class is used to assign label to many other types of gadget. Many gadgets can be assigned one or more labels, usually by means of a label: init-keyword. This class is used to assign any label.
<separator>This allows a line to be drawn between any two gadgets or groups of gadgets, so as to provide a visible barrier between them.
<spacing>This allows you to specify how much space should be placed between any two gadgets or groups of gadgets.
<border>This allows a visible border to be placed around any number of gadgets.
<group-box>This allows you to group together any number of related gadgets in a frame. Grouped elements are usually displayed with a border and label identifying the grouping.
<object> | |||
<gadget> | |||
<action-gadget> | |||
<value-gadget> | See Section 8.4.2 | ||
<label> |
| ||
<menu> | |||
<tool-bar> | |||
<scroller> | |||
<separator> | |||
<viewport> | |||
<spacing> | |||
<border> | |||
<group-box> | |||
<splitter> | |||
<page> | See Section 8.4.3 | ||
<list-item> |
| ||
<tree-node> | |||
<table-item> | |||