The type of layout for the buttons.
Initialization arguments for the layout.
The selection callbacks for each button.
The class of the buttons.
A list specifying mnemonics for the buttons.
button-panel inherits most of its behavior from choice, which is an abstract class providing support for handling items and selections. By default, a button panel has single selection interaction style (meaning that only one of the buttons can be selected at any one time), but this can be changed by specifying an
The subclasses push-button-panel, radio-button-panel
The layout of the buttons is controlled by a layout of class
(which defaults to row-layout) but this can be changed to be any other CAPI layout. When the layout is created, the list of initargs
is passed to
Each button uses the callbacks specified for the button panel itself, unless the argument callbacks is specified. callbacks should be a list (one element per button). Each element of callbacks , if non-nil, will be used as the selection callback of the corresponding button.
button-class , if supplied, determines the class used for each of the buttons. This should be the class appropriate for the interaction , or a subclass of it. The default behavior is to create buttons of the class appropriate for the interaction .
, if supplied, should be a list of the same length as
. The values are passed to the corresponding item, and interpreted as described for button. The
values map to
arguments, and so on.
button-panel and its subclasses, the
supplied to the
:items initarg and
(setf collection-items) function can contain button objects. In this case, the button is used directly in the button panel rather than a button being created by the CAPI.
specifies which button is the default (selected by pressing
Return). It should be equal to a member of
when compared by
. If the items are non-immediate objects such as strings or button objects, you must ensure either that the same (
eq) object is passed in
, or that a suitable
mnemonics is a list of the same length as items . Each element is a character, integer or symbol specifying the mnemonic for the corresponding button in the same way as described for menu.
mnemonic-items is an alternate way to specify the mnemonics in a button panel. It is a list of the same length as items . Each element is a string which is interpreted for the corresponding button as its mnemonic-text initarg.
mnemonic-title and mnemonic-escape are interpreted as for menu. mnemonic-escape specifies the escape character for mnemonics both in the buttons and in the pane's title.
Button panels now default to having a maximum size constrained to their minimum size as this is useful when attempting to layout button panels into arbitrary spaces without them changing size. To get the old behavior, specify
:visible-max-width nil in the
CAPI User Guide and Reference Manual (Macintosh version) - 25 Feb 2015