All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

double-list-panel Class

Summary

A choice which displays its selected items and its unselected items in disjoint lists displayed in two sub-panels, and facilitates easy movement of items between these lists.

Package

capi

Superclasses

choice
interface

Initargs
:selected-items-title
:unselected-items-title
selected-items-title and unselected-items-title are passed as the :title initarg to the list panels.
:selected-items-filter
:unselected-items-filter
selected-items-filter and unselected-items-filter are passed as the :filter initarg to the list panels.
:list-visible-min-width
:list-visible-min-height
list-visible-min-width and list-visible-min-height are passed as the :visible-min-width and :visible-min-height initargs to both list panels.
:image-function
:image-state-function
:image-width
:image-height
:state-image-width
:state-image-height
image-function, image-state-function, image-width, image-height, state-image-width and state-image-height are passed to both of the sub-panels to specify images.
Description

The class double-list-panel is a choice which displays its items in two list-panels. One list contains the selected items and the other contains the unselected items. There is a pair of arrow buttons which move highlighted items between the lists.

selected-items-title and unselected-items-title are passed as the :title initarg to the corresponding sub-panels (see list-panel). selected-items-title defaults to "Selected items:" and unselected-items-title defaults to "Unselected items:".

selected-items-filter and unselected-items-filter are passed as the :filter initarg to the corresponding sub-panels (see list-panel). selected-items-filter and unselected-items-filter both default to nil.

list-visible-min-width and list-visible-min-height are passed as the :visible-min-width and :visible-min-height initargs to both sub-panels (see list-panel). list-visible-min-width and list-visible-min-width both default to nil.

image-function, image-state-function, image-width, image-height, state-image-width and state-image-height are passed to both of the sub-panels to specify images (see list-panel).

The default interaction of double-list-panel is :extended-selection.

The selection-callback, extend-callback or retract-callback is called as appropriate when items are moved between the lists. There is no action-callback for double-list-panel.

The user selects and de-selects items in the double-list-panel by moving them between the two lists. There are three ways to move the items:

Notes
  1. double-list-panel is not a subclass of list-panel.
  2. double-list-panel does not have image lists. To use sub-images from an image-set, use image-locators.
Examples
(capi:display
 (make-instance 
  'capi:double-list-panel
  :items '("John" "Geoff" "chicken" "blue" "water")
  :selection-callback
  #'(lambda (item choice)
      (capi:display-message "selecting ~a" item))
  :extend-callback
  #'(lambda(item choice)
      (capi:display-message "extending ~a" item))
  :retract-callback
  #'(lambda(item choice)
      (capi:display-message "deselecting ~a" item))))
See also

list-panel
5.3 List panels


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27