4.2 List panels
In a multiple-selection list, deselection is done by clicking on the selected item again with either of the selection or extension gestures.
In an extended-selection list, deselection is done by performing the extension gesture upon the selected item. (If this was done using the selection gesture, the list would behave as a single-selection list and all other selections would be lost.)
Just like a selection, a deselection -- or retraction -- can have a callback associated with it.
For a multiple-selection list pane, there may be the following callbacks:
:selection-callback
-- called when a selection is made:retract-callback
-- called when a selection is retractedset-title
changes the title of the interface to the value of the argument passed to it. By using this as the callback to thecheck-button-panel
, the title of the interface is set to the current selection. The functionretract-callback
returns a message dialog with the name of the button retracted.(defun set-title (data interface) (setf (interface-title interface) (format nil "~S" data)))(make-instance 'check-button-panel :items '(one two three four five) :print-function 'string-capitalize :selection-callback 'set-title :retract-callback 'test-callback)
(contain *)
Figure 4.5 An example of a callback to a check-button panel
For an extended-selection list pane, there may be the following callbacks:
:selection-callback
-- called when a selection is made:retract-callback
-- called when a selection is retracted:extend-callback
-- called when a selection is extendedGenerated with Harlequin WebMaker