[Contents]
[Index]
[Next]
[Previous]
Primary Selection
Description
Each collection maintains its own selection. A selection need not
contain any elements, in which case it is said to be an empty
selection. At any time, there is one selection called the primary
selection, which is the last selection explicitly started by the user.
Clicking BSelect
or
BSelect
only moves the primary selection to a collection when it results in
making a selection that is not empty. When
BSelect
is clicked, an implementation can move the primary selection to the
component even if the resulting selection is empty. Dragging BSelect,
BSelect,
or
BSelect
must move the primary selection to the component if a button release
during the pointer motion could have potentially selected any element.
A selection is said to be persistent if it is highlighted even when
it is not the primary selection.
- Persistent
- There are two variants of persistent selections: persistent
always, in which the current selection is always highlighted, and
persistent on focus, in which the current selection is only
highlighted when it is the primary selection or when the collection
has the keyboard focus. In either case, stronger highlighting should
be used when the current selection is also the primary selection. When
focus is in the collection,
can be used to promote the current
selection to the primary selection.
- Nonpersistent
- The collection only highlights a primary selection. When the
primary selection is lost to another collection, the current selection
is set to empty. When focus is in the collection, and it does not have
the primary selection,
can be used to restore the previous
selection and make it the primary selection.
Collections that are never editable (such as noneditable Lists)
should always use persistent selections. Collections that are editable
can either use persistent or nonpersistent selections.
Primary transfer can be invoked by clicking BTransfer
or through standard keyboard bindings. There are three primary
transfer operations:
- Primary Copy
- In an editable collection, BTransfer
Click,
BTransfer
Click,
[Copy], and
must copy the primary selection to the
insertion position, as defined in Transfer Models. (Note that the
insertion position is usually different for mouse and keyboard
operations.)
- Primary Move
- In an editable collection,
BTransfer
Click,
[Cut], and
must move the primary selection to the
insertion position, as defined in Transfer Models. (Note that the
insertion position is usually different for mouse and keyboard
operations.)
- Primary Link
- In an editable collection,
BTransfer
Click
must place a link to the primary selection at the insertion position,
as defined in Transfer Models.
Related Information
See Selection Actions and Transfer Models for more information
about the primary selection.