Page 162 Table of Contents Index Page 164
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 17. TABLE FORMATTING

"Item list output" is more strictly defined as: each row of the item list consists of a single cell.
Rows are placed with the first row on top, and each succeeding row has its top aligned with
the bottom of the previous row (plus the specified y-spacing). Multiple rows and columns are
constructed after laying the item list out in a single column. Item list output takes place in a
normalized +y-downward coordinate system.

The returned value is the output record corresponding to the table.

stream is an output recording stream to which output will be done. The stream argument is
not evaluated, and must be a symbol that is bound to a stream. If stream is t (the default),
*standard-output* is used. body may have zero or more declarations as its first forms.

x-spacing specifies the number of units of spacing to be inserted between columns of the item
list; the default is the width of a #\Space character in the current text style. y-spacing specifies
the number of units of spacing to be inserted between rows in the item list; the default is default
vertical spacing of the stream. The format of these arguments is as for formatting-table.

When the boolean equalize-column-widths is true, CLIM will make all of the columns have the
same width (the width of the widest cell in any column in the entire item list).

n-columns and n-rows specify the number of columns or rows in the item list. The default for
both is nil, which causes CLIM to pick an aesthetically pleasing layout, possibly constrained
by the other options. If both n-columns and n-rows are supplied and the item list contains more
elements than will fit according to the specification, CLIM will format the item list as if n-rows
were supplied as nil.

max-width and max-height constrain the layout of the item list. CLIM will not make the item
list any wider than max-width, unless it is overridden by n-rows. It will not make the item list
any taller than max-height, unless it is overridden by n-columns.

formatting-item-list normally spaces items across the entire width of the stream. When
initial-spacing is true, it inserts some whitespace (about half as much space as is between each
item) before the first item on each line. When it is false (the default), the initial whitespace is
not inserted.

record-type specifies the class of output record to create. The default is standard-item-list-
output-record
. This argument should only be supplied by a programmer if there is a new class
of output record that supports the item list formatting protocol.

=> format-items items &key stream printer presentation-type x-spacing y-spacing n-columns n-
rows max-width max-height cell-align-x cell-align-y initial-spacing (move-cursor
t) record-type
[Function]
This is a function interface to the item list formatter. The elements of the sequence items are
formatted as separate cells within the item list.

stream is an output recording stream to which output will be done. It defaults to *standard-
output*
.

printer must be a function that takes two arguments, an item and a stream, and outputs the


Page 162 Table of Contents Index Page 164
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E