All Manuals > Common Lisp Interface Manager 2.0 User's Guide > Chapter 10 Panes and Gadgets > 10.5 Gadgets > 10.5.3 Abstract Gadget Classes

NextPrevUpTopContentsIndex

10.5.3.2 The List-Pane and Option-Pane Gadgets

A list pane is a list of buttons. An option pane is a single button that, when pressed, pops up a menu of selections.

list-pane

Summary: The class that implements an abstract list pane. It is a subclass of value-gadget .

:mode

Summary: Either :one-of or :some-of . When it is :one-of , the list pane acts like a radio box; that is, only one item can be selected. When it is :some-of (the default), zero or more items can be selected at a time.

:items

:name-key

:value-key

:test

Summary: The :items initarg specifies a sequence of items to use as the items of the list pane. The name of the item is extracted by the function that is the value of the :name-key initarg, which defaults to princ-to-string . The value of the item is extracted by the function that is the value of the :value-key initarg, which defaults to identity . The :test initarg specifies a function of two argument that is used to compare items; it defaults to eql . For example:

(make-pane 'list-pane

:value '("Lisp" "C++")

:mode :some-of

:items '("Lisp" "Fortran" "C" "C++" "Cobol" "Ada")

:test 'string=)

gadget-value [Generic Function]

Arguments: (button list-pane )

Summary: Returns the single selected item when the mode is :one-of, or a sequence of selected items when the mode is :some-of .

generic-list-pane

Summary: The class that implements a portable list pane; a subclass of list-pane .

option-pane

Summary: The class that implements an abstract option pane. It is a subclass of value-gadget .

:items

:name-key

:value-key

:test

Summary: The :items initarg specifies a sequence of items to use as the items of the option pane. The name of the item is extracted by the function that is the value of the :name-key initarg, which defaults to princ-to-string . The value of the item is extracted by the function that is the value of the :value-key initarg, which defaults to identity . The :test initarg specifies a function of two argument that is used to compare items; it defaults to eql .

gadget-value [Generic Function]

Arguments: (button option-pane )

Summary: Returns the single selected item.

generic-option-pane

Summary: The class that implements a portable option pane; a subclass of option-pane .


Common Lisp Interface Manager 2.0 User's Guide - 20 Sep 2011

NextPrevUpTopContentsIndex