The subclasses of <collection-gadget> are as shown in Table 8.5. All of these subclasses support the items protocol, even though they are not displayed in bold.
<collection-gadget> |
| |
| <button-box> |
|
| <check-box> | |
<push-box> | ||
<radio-box> | ||
<list-box> |
| |
<menu-box> | ||
| <check-menu-box> | |
<push-menu-box> | ||
<radio-menu-box> | ||
<option-box> |
| |
<combo-box> | ||
<spin-box> | ||
<list-control> | ||
<tree-control> | ||
<table-control> | ||
Two subclasses themselves have a number of subclasses defined: those subclasses representing collections of buttons:
<button-box>These are used to create collections of buttons of the same type. You can create collections of any of the three basic types of button available: check buttons, radio buttons, or push buttons.
<menu-box> These are used to create collections of menu items of the same type. As with <button-box>, you can create collections of any of the three basic types of menu button available: check, radio, or push menu buttons.
In addition, the following types of list are provided:
<list-box>These are standard list boxes, allowing a list of items to be displayed in a pane, with a scroll bar allowing the complete list to be viewed if necessary. List boxes may be single, multiple, or no selection.
<option-box>A standard drop-down list box. This is similar to a list box, except that the entire list of options is only displayed on demand. In its closed state, only the current selection is visible.
<combo-box>A combo box combines an option box with a text field, providing a list box whose contents can be displayed on demand, or edited by typing into the box in its closed state. Any new values typed in by the user are automatically added to the list of options subsequently displayed.
<spin-box>A spin box is a text box that will only accept a limited number of input values, themselves making up a loop. A typical example might be the integers between 0 and 10. Spin boxes also incorporate small buttons (up-down controls) that allow the user to change the value by clicking the button in the appropriate direction.
Three controls are also available for displaying more general pieces of information:
<list-control>List controls provide an extended list box functionality that let you display a collection of items, each item consisting of an icon and a label. A number of different views are available, allowing you to view the items in different ways.
<tree-control>Tree controls are a special list control that displays a set of objects in an indented outline based on the logical hierarchical relationship between the objects.
<table-control>
Since all the subclasses of <collection-gadget> are themselves value gadgets, each one supports the value protocol, as described in Section 8.1 on page 503.