[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 User's Guide



Using Containers

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.




View figure.

Figure 28. Container in the Small-Icon View.




View figure.

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.




View figure.

Selection

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.

Single Selection

To select a single item from a Container:

  1. Move the pointer to the item that you want to select.

  2. Click Button 1.

  3. Browse Selection

    A single-selection style Container may also support Browse-style selection. To use Browse-style selection:

    1. Press and hold Button 1 over an item.

    2. Drag the pointer through the Container.

    3. Release Button 1 on the item that you want to select.

    4. Group Selection: Detail or Outline Layout Only

      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:

      1. Move the pointer to the first item in the group.

      2. Press and hold Button 1 and drag the pointer to the last item in the group.

      3. Release Button 1.

        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:

        1. Select the first group of items with either of the previous methods.

        2. Move the pointer to the first item in the next group.

        3. Press and hold down Ctrl as you press Button 1.

        4. Drag the pointer to the last item in the group.

        5. Release Button 1.

        6. Group Selection: Spatial Layouts Only

          To select an item or a group of items from a Container that is using the Spatial Layout option: (see Figure 3-25):

          1. Move the pointer to the first item.

          2. Press Button 1 and drag the pointer over each item to select.

          3. Release Button 1.

            To add a noncontiguous item or group of items to existing selected items in a Container that is using the Spatial Layout option:

            1. Select the first group of items with any of the previous methods.

            2. Move the pointer to the first item in the next group.

            3. Press and hold down Ctrl as you press Button 1 and drag the pointer over each item to select.

            4. Release Button 1.

            5. Group Selection: Spatial or Outline Layout

              To select an item or a group of items from a Container that is using the Spatial or Outline Layout:

              1. Move the pointer to a blank space in the Container.

              2. Press Button 1 and drag the pointer to create a box around all the items to be selected.

              3. Release Button 1.

                To add a noncontiguous item or group of items to existing selected items in a Container that is using the Spatial or Outline Layout:

                1. Select the first group of items with any of the previous methods.

                2. Move the pointer to a blank space in the Container.

                3. Press and hold down Ctrl as you press Button 1 and drag the pointer to create a box around all the items to be selected in the additional group.

                4. Release Button 1.

                5. Keyboard Selection

                  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.


                  [ Previous | Next | Contents | Glossary | Home | Search ]