A Container component presents information about application-defined objects on a 2-dimensional background for selection and/or manipulation. Each object is represented by an icon, which can display a text label and either a large or small pixmap. Container can present objects in one of three views: Large-Icon, Small-Icon, or Any-Icon.
The Large-Icon view forces each object in the Container to display its label and large pixmap. The Small-Icon view forces each object in the Container to display its label and small pixmap. The Any-Icon view allows each object to use its own defaults for specifying what to display. The icons are displayed on a 2-dimensional background (see Figures 3-24 and 3-25). The location of each icon is determined by the application, but the user can change the icon location within the Container by dragging the icon and dropping it onto a new location within the Container.
Figure 27. Container in the Large-Icon View.
Figure 28. Container in the Small-Icon View.
A Container also provides an Outline Layout option that allows an application to show parent-child relationships between icons. A PushButton component is displayed next to each icon that has children. The user can press and release the PushButton to display or hide the children of a particular icon. The user cannot change the locations of icons when the Outline Layout option is displayed.
Detail layout is the same as Outline Layout with the addition that the objects' information is presented as a list of items, where each item has several columns. All columns except the first contain textual information about the object; the first column usually contains an icon in either the Small-Icon or Large-Icon view. The items are displayed from top to bottom and the user cannot change their locations (see Figure 3-27).
Figure 29. Container with Outline Layout.
A Container has the capability to allow the user to select single items, multiple items, or noncontiguous ranges of items. An application that uses the Container component determines which types of selections are appropriate for the application.
To select a single item from a Container:
A single-selection style Container may also support Browse-style selection. To use Browse-style selection:
To select a contiguous group of items from a Container that is in the Detail view (see Figure 3-26) or is using the Outline Layout option:
You can also select a group of items by selecting a single item, moving the pointer to the last item in the group, and pressing Shift as you click Button 1. All items between the first and last items are selected.
To add a noncontiguous item or group of items to existing selected items in a Container that is using the Outline or Detail Layout option:
To select an item or a group of items from a Container that is using the Spatial Layout option: (see Figure 3-25):
To add a noncontiguous item or group of items to existing selected items in a Container that is using the Spatial Layout option:
To select an item or a group of items from a Container that is using the Spatial or Outline Layout:
To add a noncontiguous item or group of items to existing selected items in a Container that is using the Spatial or Outline Layout:
The Container component also supports keyboard selection. If a Container has the input focus, you can use the keyboard to navigate through the items and make selections. Container components use a location cursor to indicate which item has the input focus. The location cursor is shown by a box around a Container item. Use the up and down arrow keys to move the location cursor through the items. Depending on the type of Container you are using, the selection may move with the location cursor. If the selection does not move with the location cursor, you can select an item by pressing Return or Space.
The Container component allows you to make all of the different types of selections from the keyboard. For more information on keyboard-based selection, see the Motif Style Guide.
In a Container that allows you to select multiple items, you can select all of the items by pressing Ctrl-/. You can deselect all of the items in the Container by pressing Ctrl-\.
You can cancel a drag-based selection operation in progress by pressing Cancel or Esc at any time during the operation.