A boolean. The default value is
A plist of keywords and image-list objects.
Flag to specify whether items have images. Defaults to
Defaults to 16.
Defaults to 16.
list-panel gains much of its behavior from choice, which is an abstract class that handles items and their selection. By default, a list panel has both horizontal and vertical scrollbars.
list-panel does not support the
:no-selection interaction style. For a non-interactive list use a display-pane.
To scroll a
list-panel, call scroll with
mnemonic-title is interpreted as for menu.
color-function allows you to control the text colors on Microsoft Windows, Cocoa and GTK+. If color-function is non-nil, then it is a function used to compute the text color of each item, with signature
is true, the list panel is drawn with alternating background on Cocoa. On GTK+ it provides a hint, which the theme can override. Experience suggests that theme may draw with alternating background even when
is false, but when it is true they tend to draw it always. The default value of
is a keyword representing the state of the item. It can be one of
:disabled. The value
should be a value suitable for the function convert-color. The pane uses the converted color as the foreground color for the item
is called while
is being drawn, so it should not do heavyweight computations.
is non-nil, the system automatically adds a filtering-layout above the list. The items in the
list-panel are filtered by the value in the filtering-layout. Filtering displays only those items whose print representation matches the filter. (The print representation is the result of print-collection-item, and is what the user sees.) Only the items that match, or those that do not match if
is set, are displayed in the
list-panel with a filter,
collection-items returns only the filtered items, and the selection (that is, the result of
choice-selection and the argument to
(setf choice-selection) index into the filtered items.
To get and set the unfiltered items, use the accessor list-panel-unfiltered-items. To access the filter-state, use list-panel-filter-state. To access both the unfiltered items and the filter simultaneously, which is especially useful when setting both of them at the same time, use list-panel-items-and-filter.
filter-automatic-p controls whether the filter automatically does the filtering whenever the text in the filter changes, and filter-callback defines the callback of the filtering-layout.
t, whenever a change occurs in the filter the list is refreshed against the new value in the filter. The
(if non-nil) is called with two arguments, the filtering-layout and the
list-panel itself, when the user "confirms" (that is, she presses
Return or clicks the
is false and
:default, then the filtering-layout is given a callback that does the filtering when the user "confirms". If
is false and
is non-nil, then no filtering is done explicitly, and it is the responsibility of the callback to do any filtering that is required.
t) are passed down to the filtering layout through the corresponding filtering-layout initargs:
See filtering-layout for a description of these initargs.
If filter-short-menu-text is true, the filter menu has a short title. For example if the filter is set for case-sensitive plain inclusive matching the short label is PMC . If filter-short-menu-text were false then this label would be Filter:C .
list-panel, because it is implemented by wrapping some layouts around the
is an index in the
collection-items to move to. Apart from an integer inside the items range of the
list-panel, this can be
nil, which means do nothing, or
:no-change, which selects the current item.
last-match is a string that should be recorded as the "last match" (if it is not a string, the "last match" is reset). This is prepended to the character in the next call, if the character is typed before the "last match" is reset.
is the time to wait before resetting the "last match", in seconds. Once this time passes, the last match is reset to
nil, the default value (which defaults to 1) is used. This default value can be changed by set-list-panel-keyboard-search-reset-time.
You can simplify the implementation of keyboard-search-callback by using list-panel-search-with-function.
As a special case, passing
:keyboard-search-callback t tells CAPI to use its own internal search mechanism in preference to the native one. That can be useful on GTK+, where the default is to use the native search mechanism (for GTK+ versions after 2.4).
keyboard-search-callback is intended for searching, but it is not limited to doing a search, and in fact can be used for implementing other functionality. However, since the system waits for the result, if the callback does something heavy or interacts with the user, it should schedule it in some way and return, for example:
This specifies the filename of a file suitable for loading with load-image. Currently this must be a bitmap file.
The symbol must have been previously registered by means of a call to register-image-translation. It can also one of the following symbols, which map to standard images:
On Microsoft Windows, the following symbols are also recognized. They map to view images:
An image object, as returned by load-image.
This allowing a single bitmap to be created which contains several button images side by side. See make-image-locator for more information. On Microsoft Windows, it also allows access to bitmaps stored as resources in a DLL.
This is a zero-based index into the list panel's image lists. This is generally only useful if the image list is created explicitly. See image-list for more details.
is called on an item to determine the state image: an additional optional image used to indicate the state of an item. It can return one of the above, or
nil to indicate that there is no state image.
If image-lists is specified, it should be a plist containing the following keywords as keys. The corresponding values should be image-list objects.
image-list object that contains the item images. The
should return a numeric index into this
image-list object that contains the state images. The
should return a numeric index into this
Corresponds to the behavior in LispWorks 4.4 and earlier. The data is not passed.
If the clicked item is not already selected, make it be the entire selection while the menu is displayed. If the clicked item is already selected, do not change the selection. If the menu is cancelled, the original selection is restored. If the user chooses an item from the menu, the selection is not restored.
If the clicked item is not already selected, make it be the entire selection while the menu is displayed. If the clicked item is already selected, do not change the selection. If the user chooses an item from the menu and the item's callback does not set the selection then the original selection is restored after the callback. If the callback sets the selection, then this selection remains. The original selection is restored if the user cancels the menu.
Make the clicked item be the entire selection while the menu is displayed. If the menu is cancelled, the original selection is restored. If the user chooses an item from the menu, the selection is not restored.
Make the clicked item be the entire selection while the menu is displayed. If the user chooses an item from the menu and the item's callback does not set the selection then the original selection is restored after the callback. If the callback sets the selection, then this selection remains. The original selection is restored if the user cancels the menu.
If the clicked item is not already selected, make it be the entire selection while the menu is displayed. If the clicked item is already selected, do not change the selection. The original selection is never restored, regardless of whether the user chooses an item from the menu or cancels the menu.
There are further examples in Self-contained examples.
Matching resources for GTK+
Choices - panes with items
Programming with CAPI Windows
Prompting for an item in a list
Working with images
Drag and Drop
CAPI User Guide and Reference Manual (Macintosh version) - 25 Feb 2015