| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
An image-list object contains an ordered set of pixmaps, for use by
certain kinds of widgets. Currently only the list-view
widget uses image-lists,
where the large-image-list, small-image-list, and state-image-list may each
be an image-list object. (Alternately, these list-view properties may
be simple lists of the names of cached pixmaps, in which case the
list-view internally creates and manages its image-list objects, and
so an application typically does not need to deal with image-lists
directly itself.)
An image list can be created as simply as this:
(make-instance 'image-list :name :main-image-list :pixmaps (list butterfly-pixmap worm-pixmap))
where each item in the pixmaps list is an existing pixmap object, as created (for example) by load-pixmap. If the desired pixmaps have been cached by calling cache-pixmap on them, then the pixmaps can alternately be specified by their names, as in:
(make-instance 'image-list :name :main-image-list :pixmap-names (list :butterfly :worm))
If the name initarg is not passed, a unique
default name such as :image-list-3
will be used.
Once an image-list has been created, it may be specified as the
large-image-list,
small-image-list,
or state-image-list property of a
list-view
control.
All of the pixmaps in a single image-list must have the same width, height, and bits-per-pixel. It also must be the case that either all of the pixmaps have a mask or none of the pixmaps have a mask.
See also the description of the pixmap
class and the essay on
pixmaps, cg-pixmaps.htm.
A diagram of window and widget classes is shown in Widget and window classes in cgide.htm.
Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |