[ Previous | Next | Contents | Glossary | Home | Search ]
Motif and CDE 2.1 Style Guide Reference


Selection (CDE)

Reference

Description

Selection is the way the user interacts with elements or objects in CDE.

Guidelines

Required
There are five selection models: single selection, browse selection, multiple selection, range selection, and discontiguous selection. Each collection should have one or more appropriate selection models. The model limits the kinds of choices the user can make in the collection. Some collections enforce a selection model, while others allow the user or application to change it.

Required
In a collection that uses single selection, when the user clicks the SELECT button on a deselected element, move the location cursor to that element, select it, and deselect any other selection in the collection. Single selection is the simplest selection model for selecting a single element.

Required
In a collection that uses browse selection, when the user releases the SELECT button on a selectable element, select that element, and deselect any other selection in the collection. As the pointer is dragged through selectable elements, select each element under the pointer and deselect the previously selected element. The selection should remain on the element where the SELECT button is released, and the location cursor should move there.

Browse selection selects a single element. It also allows the user to browse through the collection by dragging the pointer.

Required
If your application contains collections that follow the multiple selection model, make the ADJUST button behave like the SELECT button when the TRANSFER button is configured to behave as the ADJUST button.

Required
Allow the user to change an environment setting indicating that MB2 should be used for the adjust function instead. The ADJUST button can be used to toggle the selection state of elements under the multiple selection model.

Required
In a collection that uses multiple selection, clicking the SELECT button or the ADJUST button on an unselected element adds that element to the current selection. Clicking the SELECT button or the ADJUST button on a selected element removes that element from the current selection. Clicking the SELECT button or the ADJUST button moves the location cursor to that element.

Required
In a collection that uses range selection, pressing the SELECT button on an unselected element sets an anchor on the element, or at the position where the SELECT button was pressed, and deselects all elements in the collection. If the SELECT button is released before the drag threshold has been exceeded, then the element under the pointer should be selected. If mouse motion exceeds the drag threshold, then a new selection should begin. The anchor and the current position of the pointer determines the current range. As the pointer is dragged through the collection, highlight the current range. When the SELECT button is released, the anchor should not move and all the elements within the current range should be selected.

Required
In a collection that uses range selection, pressing the SELECT button on a currently selected element should not cause all other elements in the selection set to be deselected. If the SELECT button is released before the drag threshold is exceeded, then, at that point, all other elements should be deselected and the element under the pointer should remain selected. If mouse motion exceeds the drag threshold, then no element should be deselected and a drag operation should begin.

Required
In a text-like collection that uses range selection, make the anchor point the text pointer position when the SELECT button is pressed. The current range should consist of all elements between the anchor point and the current text pointer position.

Required
In text-like collections, order elements linearly, and always consider a text pointer to be between elements at a point near the actual pointer position.

Required
In a graphics-like or list-like collection that uses a marquee to indicate the range of a range selection, the current range should consist of those elements that fall completely within the marquee. If there is an anchor element, always make the marquee large enough to enclose it completely. Otherwise, use an anchor point to be the point at which the SELECT button was pressed; the anchor point determines one corner of the marquee. If the collection is not arranged as a list or matrix, extend the marquee to the pointer position. If the collection is arranged as a list or matrix, extend the marquee either to completely enclose the element under the pointer or to the pointer position. Clicking the SELECT button on a selectable element makes it an anchor element, selects it, and deselects all other elements.

Required
If your application contains collections that follow the range selection model, make the ADJUST button behave like Shift SELECT when the TRANSFER button is configured to behave as the ADJUST button.

Required
Allow the user to change an environment setting that indicates MB2 should be used for the ADJUST button function. The ADJUST button can then be used to extend the selection set in the same manner as Shift SELECT.

Required
In a collection that uses range selection, when the user presses Shift SELECT or the ADJUST button, the anchor should remain unchanged and an extended range for the selection is determined, based on one of the extension models.

Optional
Support the following mouse-based range selection models:

Reselect
The extended range is determined by the anchor and the current pointer position in exactly the same manner as when the selection was initially made.

Enlarge Only
The selection can only be enlarged. The extended range is determined by the anchor and the current pointer position, but then is enlarged to include the current selection.

Balance Beam
A balance point is defined at the midpoint of the current selection. When the user presses Shift SELECT or ADJUST on the opposite side of the balance point from the anchor, this model works exactly like the reselect model. When the user presses Shift SELECT, ADJUST, or starts a navigation action modified by Shift on the same side of the balance point as the anchor, this model moves the anchor to the opposite end of the selection and then works exactly like the reselect model.

When the user releases the SELECT button or ADJUST button, the anchor does not move, all the elements within the extended range are selected, and all the elements outside of it are deselected.

Required
In a collection that uses discontiguous selection, make the behavior of the SELECT button exactly the same as in the range selection model. After the user sets the anchor with the SELECT button, Shift SELECT should work exactly as in the range selection model.

Required
In a collection that uses discontiguous selection, when the current selection is not empty and the user clicks Ctrl SELECT, move the anchor and location cursor to that point. If the current selection is not empty and the user clicks Ctrl SELECT on an element, toggle the selection state of that element and make it the anchor element.

Required
In a collection that uses discontiguous selection, pressing Ctrl SELECT and moving the pointer toggles the selection state of a range of elements. The range itself is determined exactly as for the pointer motion. Releasing Ctrl SELECT toggles the selection state of the elements in the range according to one of two models:

Anchor toggle
Toggling is based on an anchor element. If the range is anchored by a point and is not empty, the anchor element is set to the element within the range that is nearest to the anchor point. Toggling sets the selection state of all elements in the range to the inverse of the initial state of the anchor element.

Full toggle
The selection state of each element in the extended range is toggled.

Required
In a collection that uses discontiguous selection, after Ctrl SELECT toggles a selection, pressing Shift SELECT or Ctrl Shift SELECT extends the range of toggled elements. The extended range is determined in exactly the same way as when Shift SELECT is used to extend a range selection. When the user releases Ctrl Shift SELECT, the selection state of elements added to the range is determined by the toggle model in use (either anchor toggle or full toggle). If elements are removed from the range, they either revert to their state prior to the last use of Ctrl SELECT or change to the state opposite that of the elements remaining within the extended range.

Required
In a collection that uses discontiguous selection, allow the ADJUST button to be used to extend the range of a discontiguous selection. The extended range is determined in exactly the same way as when the ADJUST button is used to extend a range selection.

Required
Allow the user to change an environment setting that indicates MB2 should be used for the ADJUST button function. The ADJUST button can then be used to extend the selection set in the same manner as Shift SELECT.

Required
The selection models should support keyboard selection modes according to the following rules:

  1. Single selection supports only add mode.

  2. Browse selection supports only normal mode.

  3. Multiple selection supports only add mode.

  4. Range selection supports normal mode. If it also supports add mode, normal mode is the default.

  5. Discontiguous selection supports both normal mode and add mode. Normal mode is the default.

  6. Required
    Selection must be available from the keyboard. In normal mode, which is used for making simple contiguous selections from the keyboard, the location cursor is never disjoint from the current selection. In add mode, which is used for making more complex and possibly disjoint selections, the location cursor can move independently of the current selection.

    Required
    If a collection supports both normal mode and add mode, pressing Shift F8 switches from one mode to the other. Mouse-based selection should not change when the keyboard selection mode changes. In editable components, add mode is a temporary mode that is exited when the user performs an operation on the selection or deselects the selection.

    Required
    In a collection that uses single selection, pressing the navigation keys moves the location cursor independently from the selected element. Pressing Select or Spacebar on an unselected element, selects the element with the location cursor and deselects any other selection in the collection.

    Single selection supports only add mode. Pressing Select or Spacebar is similar to clicking the SELECT button.

    Required
    In a collection that uses browse selection, pressing the navigation keys moves the location cursor and selects the cursored element, deselecting any other element. If the application has deselected all elements or if the cursor is left disjoint from the selection, pressing the Select key or the Spacebar selects the cursored element and deselects any other element.

    Browse selection supports only normal mode. A navigation operation is similar to dragging the SELECT button.

    Required
    In a collection that uses multiple selection, pressing the navigation keys moves the location cursor independently from the current selection. Pressing Select or Spacebar on an unselected element adds the element to the current selection. Pressing Select or Spacebar on a selected element removes the element from the current selection.

    Multiple selection supports only add mode. Pressing Select or Spacebar is similar to clicking the SELECT button.

    Required
    In a collection that uses range selection and that is in normal mode, pressing the navigation keys moves the location cursor and deselects the current selection. If the cursor is on an element, select it and move the anchor with the location cursor.

    Required
    Text-like collections can use a different model in which the navigation keys leave the anchor at its current location, except that if the current selection is not empty it is deselected and the anchor is moved to the location of the cursor prior to navigation. Range selection supports normal mode; if the collection also supports add mode, make normal mode the default.

    Required
    In a collection that uses range selection, whether in normal mode or add mode, pressing Select or Spacebar (except in a text component) moves the anchor to the cursor, deselects the current selection, and, if the cursor is on an element, selects the element. Unless the anchor is on a deselected item, pressing Shift Select or Shift Spacebar (except in text) extends the selection from the anchor to the cursor, based on the extension model that Shift SELECT uses (Reselect, Enlarge Only, or Balance Beam).

    Required
    In a range selection, pressing Select or Spacebar is similar to clicking the SELECT button, and pressing Shift Select or Shift Spacebar extends the range as with Shift SELECT.

    Required
    In a collection that uses range selection and that is in normal mode, pressing Shift in conjunction with the navigation keys extends the selection, based on the extension model that Shift SELECT uses. If the current selection is empty, first move the anchor to the cursor. Then move the cursor according to the navigation keys and extend the selection based on the extension model that Shift SELECT uses.

    Required
    In a range selection, make shifted navigation extend the selection in a manner similar to dragging the pointer while holding Shift SELECT.

    Required
    In a collection that uses range selection and that is in add mode, pressing the navigation keys moves the location cursor but leaves the anchor unchanged.

    Make shifted navigation move the location cursor according to the navigation keys and extend the selection, based on the extension model that Shift SELECT uses.

    Required
    Make shifted navigation in add mode similar to shifted navigation in normal mode, except that when the selection is empty the anchor should not move to the cursor prior to navigation.

    Required
    In a collection that uses discontiguous selection and is in normal mode, all keyboard operations should have the same effect as in the range selection model. Do not permit multiple discontiguous selections in normal mode.

    Required
    In a collection that uses discontiguous selection and is in add mode, pressing Select or Spacebar moves the anchor to the location cursor and initiates toggling. If the cursor is on an element, toggle the selection state of that element, but keep the selection state of all other elements unchanged. Pressing Shift Select or Shift Spacebar and shifted navigation operations extend the selection between the anchor and the location cursor, based on the toggle mechanism that Ctrl SELECT uses (anchor toggle or full toggle). In add mode, permit the use of the keyboard to make multiple discontiguous selections.

    Required
    The Cancel key cancels or undoes any incomplete motion operation used for selection. Once the user presses Cancel to cancel a motion operation, ignore subsequent key and button releases until after all buttons and keys are released. Pressing Cancel while extending a selection or toggling leaves the selection state of all elements as they were prior to the button press.

    Required
    If the user drags the pointer out of a scrollable collection during a motion-based selection operation, use autoscrolling to scroll the collection in the direction of the pointer. If the user presses Cancel with the SELECT button pressed, cancel the selection operation.

    Required
    In a collection that uses multiple, range, or discontiguous selection, pressing Ctrl / selects all the elements in the collection, places the anchor at the beginning of the collection, and leaves the location cursor at its previous position.

    Required
    In a collection that is in add mode, pressing Ctrl \ deselects all the elements in the collection. In a collection that is in normal mode, pressing Ctrl \ deselects all the elements in the collection, except the element with the location cursor if the location cursor is being displayed. In either mode, pressing Ctrl \ leaves the location cursor at its current position and moves the anchor to the location cursor.

    Required
    If your application supports mnemonics associated with selectable elements, typing a mnemonic while the collection has keyboard focus should be equivalent to moving the location cursor to the element and pressing Select or Spacebar.

    Required
    When the keyboard focus policy is explicit, the destination component should be the editable component that last had keyboard focus. When the keyboard focus policy is implicit, the destination component should be the editable component that last received mouse button or keyboard input.

    The destination component is used to identify the component on which certain operations, primarily data transfer operations, act. There can be only one destination component at a time.

    Required
    If the keyboard focus is in a component (or a pop-up menu of a component) that supports selections, operations that act on a selection should act on the selection in that component.

    A selection operation should act on the component that has focus, if that component supports selections.

    Required
    If the keyboard focus is in a component (or a pop-up menu of a component) that supports some operation that does not act on a selection, invoking the operation should act on that component.

    An operation that does not act on a selection should act on the component that has focus, if that component supports the operation.

    Required
    Inserting or pasting elements into a selection, except for a primary transfer operation at the bounds of the primary selection, should first delete the selection if pending delete is enabled. (Pending delete controls the conditions under which the selection is deleted. It is enabled by default.)

    Required
    In normal mode, inserting or pasting elements disjoint from the selection should also deselect the selection, except for primary transfer operations whose source and destination are in the same collection. In add mode, the selection should not be deselected.

    In add mode, a transfer operation that is disjoint from the selection should not affect the selection.

    Required
    In editable list-like and graphics-like collections, pressing Delete deletes the selected elements.

    Required
    In editable text-like collections, pressing Delete or Backspace behaves as follows:

    1. If the selection is not empty and the control is in normal mode, the selection is deleted.

    2. If the selection is not empty, the control is in add mode, and the cursor is not disjoint from the selection, the selection is deleted.

    3. If the selection is not empty and the control is in add mode, but the cursor is disjoint from the selection, pressing Delete deletes one character forward and pressing Backspace deletes one character backward.

    4. If the selection is empty, pressing Delete deletes one character forward and pressing Backspace deletes one character backward.

    5. Required
      If the move, copy, or link operation the user requests is not available, the transfer operation should fail.

      Three transfer operations are generally available: copy, move, and link. The user requests one of these operations by pressing the buttons or keys appropriate for the type of transfer. In general, for mouse-based operations, pressing Ctrl forces a copy, Shift forces a move, and Ctrl Shift forces a link. However, any requested transfer operation must fail if that operation is not available.

      Required
      If a collection does not have a fixed insertion point or keeps elements ordered in a specific way, determine the insertion position for transferred data as follows:

      1. For the TRANSFER button-based (or the SELECT button) primary and drag transfer operations, except as noted for text collections, the insertion position is the position at which the user releases the TRANSFER button (or the SELECT button).

      2. In a text-like collection, when the user drops selected text, the insertion position is the position at which the user releases the TRANSFER button (or the SELECT button). When the user drops an icon, the insertion position is the text cursor and the data is pasted before it.

      3. In a list-like collection, the insertion position for other transfer operations is the element with the location cursor and the data is pasted before it.

      4. The insertion position is the position in the destination where transferred data is placed. Some mouse-based transfer operations place data at the pointer position, if possible. Other operations, including keyboard-based transfer, generally place the data at the location cursor.

      5. Required
        Support the use of MB1 to perform drag-and-drop operations.

        Required
        Pressing MB1 (the SELECT button) performs drag-and-drop operations. A drag can be initiated with either MB1 or MB2. This usage is compatible with other graphical user interface (GUI) environments.

        Required
        When MB2 of a 3-button mouse is configured to operate as the ADJUST button, do not perform any TRANSFER button operations when the user clicks MB2.

        Required
        Allow the user to change an environment setting that indicates that MB2 should be used for the ADJUST button function instead of the TRANSFER button. Clicking the ADJUST button should not result in the transfer of any data.

        Required
        Pressing the SELECT button should always initiate a drag if the drag is started on a selected item. The drag starts once the drag threshold has been reached. This is true for text regions, scrolling lists, and other similar elements.

        Required
        Make keyboard-based clipboard selection actions available in every editable collection in your application. Clipboard selection actions must be available from the keyboard.

        Required
        Pressing Cut (or Shift Delete) or selecting the Cut entry on the Edit menu cuts the selected elements from an editable component to the clipboard.

        Required
        Pressing Copy (or Ctrl Insert) or selecting the Copy entry on the Edit menu copies the selected elements to the clipboard.

        Required
        Pressing Paste (or Shift Insert) or selecting the Paste entry on the Edit menu pastes the contents of the clipboard into an editable component.

        Required
        If Paste or Paste Link is invoked using a component's pop-up menu, paste the data at the insertion position of the component. However, if the pop-up menu is popped up over a selection, first delete the selection, even if pending delete is disabled, and replace the selection with the pasted data if possible.

        Popping up a pop-up menu over a selection indicates that a Paste or Paste Link operation should replace the selection.

        Required
        If Paste or Paste Link is invoked from the Edit menu or by a keyboard operation, and the insertion position in the target component is not disjoint from a selection, the pasted data should replace the selection contents if pending delete is enabled.

        Pending delete determines whether the selection is deleted when the insertion position is not disjoint from the selection and Paste or Paste Link is invoked from the Edit menu or by a keyboard operation.

        Required
        In an editable collection, clicking the TRANSFER button, Ctrl TRANSFER, Alt Copy, or Ctrl Alt Insert copies the primary selection to the insertion position. (Note that the insertion position is usually different for mouse and keyboard operations.)

        Required
        In an editable collection, clicking Ctrl Shift TRANSFER places a link to the primary selection at the insertion position.

        Required
        A primary move should move the primary selection as well as the elements selected; that is, the element moved to the destination becomes selected as the primary selection. Primary copy and primary link should not select transferred data at the destination. This is the expected treatment of the selection in a move, copy, and link operation.

        Required
        All text components should support quick transfer.

        Quick transfer is used to make a temporary selection and then immediately move, copy, or link that selection to the insertion position of the destination component. In text, quick transfer provides a convenient way to move, copy, or link text without disturbing the primary selection.

        Required
        If a component supports quick transfer, pressing Alt TRANSFER (or Ctrl Alt TRANSFER) and moving the pointer temporarily selects elements in the specified range and, on release, copies them to the insertion position of the destination component.

        Required
        If a component supports quick transfer, pressing Alt Shift TRANSFER and moving the pointer temporarily selects elements in the specified range and, on release, moves them to the insertion position of the destination component.

        Required
        If a component supports quick transfer, pressing Ctrl Alt Shift TRANSFER and moving the pointer temporarily selects elements in the specified range and, on release, places a link to them at the insertion position of the destination component.

        Required
        Quick transfer should not disturb the primary selection or affect the clipboard, except when the destination of the transfer is within or on the boundaries of the primary selection and pending delete is enabled. In this case, quick transfer should delete the contents of the primary selection, leaving an empty primary selection, before pasting the transferred elements.

        Quick transfer is a secondary selection mechanism so it cannot disrupt the primary selection. When the destination of the transfer is in the primary selection, quick transfer replaces the primary selection with the secondary selection.

        Required
        With quick transfer, determine the range of the temporary selection from when the user presses the SELECT button, moves the pointer, and releases the SELECT button.

        Required
        If the user drags the pointer out of a scrollable collection while making the temporary selection, use autoscrolling to scroll the collection in the direction of the pointer. If the user releases the TRANSFER button with the pointer outside of the collection, or if the user presses the Cancel key with the TRANSFER button pressed, remove the highlighting and do not perform a transfer.

        Required
        In a collection that supports selection, releasing Shift TRANSFER or Shift SELECT forces a drag move operation. If a move is not possible, the operation should fail.

        Required
        In a collection that supports selection, releasing Ctrl TRANSFER or Shift SELECT forces a drag copy operation. If a copy is not possible, the operation should fail.

        Required
        In a collection that supports selection, releasing Ctrl Shift TRANSFER or Shift SELECT forces a drag link operation. If a link is not possible, the operation should fail.

        Required
        When a drag move operation moves a selection within the same component, move the selection along with the elements selected. In other words, when selected elements are moved with a drag operation, they should stay selected after the move.

        Required
        In text-like collections, when the user initiates a drag within a selected region, drag the entire text selection. Drag-and-drop actions need to operate on the entire selection.

        Required
        In list-like and graphics-like collections, when the user initiates a drag with either the SELECT button or the TRANSFER button on a selected element, drag the entire selection. Drag-and-drop actions need to operate on the entire selection.

        Required
        In list-like and graphics-like collections, when the user initiates a drag with the TRANSFER button or the SELECT button on an unselected element, drag just that element and leave the selection unaffected.

        Unselected elements can be dragged without affecting the selection.

        Required
        When the user initiates a drag in an unselected region and the pointer is over two possible draggable elements, use the draggable element highest in the stacking order.

        Required
        At the start of a drag operation, replace the pointer with a drag icon.

        Required
        All drag icons should include a source indicator.

        Required
        Pressing the Cancel key ends a drag-and-drop operation by canceling the drag in progress.

        Required
        Releasing the TRANSFER button ends a drag-and-drop operation.

        Required
        When the TRANSFER button (or the SELECT button) is released, the drop operation should ordinarily occur at the location of the hot spot of the drag icon pointer and in the highest drop zone in the stacking order. However, if a drop occurs within a selection and pending delete is enabled, the transferred data should replace the contents of the entire selection.

        Required
        After a successful transfer, place the data in the drop zone and remove any transfer icon that your application used.

        You can use a transfer icon to represent the type of data being transferred during a drop operation. A successful drop operation transfers data.

        Required
        After a failed transfer, keep the data at the drag source. Do not place it in the drop zone. Remove any transfer icon that your application used.

        A failed drop operation does not transfer data.

        Recommended
        In a collection that supports selection, if pressing the TRANSFER button (or SELECT button) and moving the pointer results in the start of a drag operation, present feedback to the user that indicates that a copy, move, or link operation is in progress. Whether the operation is a copy, move, or link depends on the type of object created at the drop zone and whether the source object is removed.

        Although, typically, an unmodified drag results in a move operation, depending on the location of the source object and the target drop zone, the drag may in fact result in a copy or link operation. For example, dragging an icon that represents an attachment to a mail message typically results in a copy of the attachment being created as opposed to the original being removed from the mail message. Any feedback presented should incorporate use of a drag icon that portrays the source object being manipulated.

        Recommended
        In a collection that supports selection, if pressing Ctrl TRANSFER (or Ctrl SELECT) and moving the pointer results in the start of a drag operation, present feedback to the user that indicates that a copy operation is in progress.

        The feedback presented should incorporate use of a drag icon that portrays the source object being copied.

        Recommended
        In a collection that supports selection, if pressing Ctrl Shift TRANSFER (or Ctrl Shift SELECT) and moving the pointer results in the start of a drag operation, present feedback to the user that indicates that a link operation is in progress.

        The feedback presented should incorporate use of a drag icon that portrays the source object being linked.

        Recommended
        In a collection that supports copy, move, or link operations that can be performed by dragging, the feedback presented to the user during the drag operation should indicate whether a single object or multiple objects are being manipulated.

        Feedback provided during the drag operation should ensure that the user feels confident that the desired set of objects is being dragged. The drag icon used for multiobject drag operations should integrate the feedback used to indicate whether the operation is a move, copy, or link.

        Optional
        If your application allows the user to paste data into its data pane, allow the user to drag and drop files from the File Manager into the data pane.

        The user should be able to drag and drop files into application data panes. The result should be the inclusion of some element of the file, or the display of an error message that indicates that the file selected cannot be incorporated into the application's data. Drag transfers that are accepted can result in a number of different responses from your application. For example:

        1. The icon image for the file might be inserted at the drop point.

        2. The application might perform some activity using the data contained within the file as its input.

        3. The data contained within the file might be inserted at the drop point.

        4. The name of the file might be inserted at the drop point.

        5. Essential Related Topics

          For more information, see the Selection, Selection Models, Selection Modes, and Selection Policies reference pages.

          Supplemental Related Topics

          For more information, see the Adjustment Techniques and Selection Techniques reference pages.


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