1 CAPI Reference Entries
choiceis an abstract class that collects together a group of items, and provides functionality for displaying and selecting them.
t, retains any selection when the items change.
choiceinherits most of its behavior from
collection, and then provides the selection facilities itself. The classes
graph-paneinherit from it, and so it plays a key role in CAPI applications.
choicecan have one of four different interactions, and these control how it behaves when an item is selected by the user.
The choice can have only one selected item.
The choice can have multiple selected items.
An alternative to
no-selectionmode, the choice cannot have a selection, and so behaves just as a collection would.
single-selectionmode, the choice can only have one item selected at a time. When a new selection is made, the old selection is cleared and the
multiple-selectionmode, the choice can have any number of items selected, and selecting an item toggles its selection status. The
selection-callbackis called when an item becomes selected, and the
retract-callbackis called when an item is deselected.
extended-selectionmode, the choice can have any number of items selected as with
multiple-selectionmode, but the usual selection gesture removes the old selection. However, there is a window system specific means of extending the selection. When an item is selected the
selectioncallback is called, when the selection is extended the
extend-callbackis called, and when an item is deselected the
choice-selected-itemstreat the selection in terms of the items themselves as opposed to their indices.
(setf collection-items)the selection is lost.
t, then the selection is preserved over the change.
(setq choice (make-instance 'capi:choice :items '("One" "Two" "Three") :selection 0))
(capi:display-message "Selection: ~S" (capi:choice-selection choice))
(setf (capi:choice-selection choice) 1)
Generated with Harlequin WebMaker