formatting-table | (&optional stream &key x-spacing y-spacing multiple-columns multiple-columns-x-spacing equalize-column-widths (move-cursor t) record-type &allow-other-keys ) &body body | [Macro] |
Binds the local environment in such a way the output of body will be done in a tabular format. This must be used in conjunction with formatting-row or formatting-column, and formatting-cell. The table is placed so that its upper left corner is at the current text cursor position of stream. If the boolean move-cursor is true (the default), then the text cursor will be moved so that it immediately follows the last cell of the table. [annotate] The returned value is the output record corresponding to the table. [annotate] 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. [annotate] x-spacing specifies the number of units of spacing to be inserted between columns of the table; 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 table; the default is the default vertical spacing of the stream. Possible values for these two options option are: [annotate]
multiple-columns is either nil, t, or an integer. If it is t or an integer, the table rows will be broken up into a multiple columns. If it is t, CLIM will determine the optimal number of columns. If it is an integer, it will be interpreted as the desired number of columns. multiple-columns-x-spacing has the same format as x-spacing. It controls the spacing between the multiple columns. It defaults to the value of the x-spacing option. [annotate] 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 table). [annotate] record-type specifies the class of output record to create. The default is standard-table-output-record. This argument should only be supplied by a programmer if there is a new class of output record that supports the table formatting protocol. [annotate] [← F Changes from CLIM 1.0] [← 29.3.1 Layout Pane Options, :x-spacing] [← 29.3.1 Layout Pane Options, :width] [← 26 Dialog Facilities, accepting-values] [← 25 Menu Facilities, frame-manager-menu-choose] [← 20.3 Filled Output, filling-output] [← 20.2 Indented Output, indenting-output] [← 18.1 Graph Formatting Functions, format-graph-from-roots] [← 17.3.1 Table Formatting Protocol] [← 17.3 The Table and Item List Formatting Protocols] [← 17.2 Table Formatting Functions, formatting-item-list] [← 17.2 Table Formatting Functions, formatting-cell] [← 17.2 Table Formatting Functions, formatting-column] [← 17.2 Table Formatting Functions, formatting-row] [← 16.3.1 Standard Output Record Classes, standard-sequence-output-record] [← 4.1 Bounding Rectangles] [← 2.8 Sheet, Stream, or Medium Arguments to Macros] |
Binds the local environment in such a way the output of body will be grouped into a table row. All of the output performed by body becomes the contents of one row. This must be used inside of formatting-table, and in conjunction with formatting-cell. [annotate] 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. [annotate] Once a table has had a row added to it via formatting-row, no columns may be added to it. [annotate] record-type specifies the class of output record to create. The default is standard-row-output-record. This argument should only be supplied by a programmer if there is a new class of output record that supports the row formatting protocol. [annotate] |
Binds the local environment in such a way the output of body will be grouped into a table column. All of the output performed by body becomes the contents of one column. This must be used inside of formatting-table, and in conjunction with formatting-cell. [annotate] 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. [annotate] Once a table has had a column added to it via formatting-column, no rows may be added to it. [annotate] record-type specifies the class of output record to create. The default is standard-column-output-record. This argument should only be supplied by a programmer if there is a new class of output record that supports the column formatting protocol. [annotate] |
formatting-cell | (&optional stream &key (align-x ':left) (align-y ':baseline) min-width min-height record-type &allow-other-keys ) &body body | [Macro] |
Controls the output of a single cell inside a table row or column, or of a single item inside formatting-item-list. All of the output performed by body becomes the contents of the cell. [annotate] 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. [annotate] align-x specifies how the output in a cell will be aligned relative to other cells in the same table column. The default, :left, causes the cells to be flush-left in the column. The other possible values are :right (meaning flush-right in the column) and :center (meaning centered in the column). Each cell within a column may have a different alignment; thus it is possible, for example, to have centered legends over flush-right numeric data. [annotate] align-y specifies how the output in a cell will be aligned vertically. The default, :baseline, causes textual cells to be aligned along their baselines and graphical cells to be aligned at the bottom. The other possible values are :bottom (align at the bottom of the output), :top (align at the top of the output), and :center (center the output in the cell). [annotate] Note: How should multi-line text cells be aligned "along their baselines"? [edit]-- Alexey Dejneka 2002-11-21 04:32Z Note: Well, how should aligning by baseline be realizied at all? Currently
output records do not have the concept of having a baseline. [edit]-- Gilbert Baumann 2003-06-05 17:42Z Note: McCLIM has an [internal] function output-record-baseline which
returns the position of the baseline of an output record. [edit]-- Gilbert Baumann 2005-11-18 12:43Z min-width and min-height are used to specify minimum width or height of the cell. The default, nil, causes the cell to be only as wide or high as is necessary to contain the cell's contents. Otherwise, min-width and min-height are specified in the same way as the :x-spacing and :y-spacing arguments to formatting-table. [annotate] record-type specifies the class of output record to create. The default is standard-cell-output-record. This argument should only be supplied by a programmer if there is a new class of output record that supports the cell formatting protocol. [annotate] [← F Changes from CLIM 1.0] [← 29.3.1 Layout Pane Options, :align-x] [← 25 Menu Facilities, frame-manager-menu-choose] [← 17.2 Table Formatting Functions, format-items] [← 17.2 Table Formatting Functions, formatting-item-list] [← 17.2 Table Formatting Functions, formatting-column] [← 17.2 Table Formatting Functions, formatting-row] [← 17.2 Table Formatting Functions, formatting-table] |
formatting-item-list | (&optional stream &key x-spacing y-spacing n-columns n-rows stream-width stream-height max-width max-height initial-spacing (row-wise t) (move-cursor t) record-type &allow-other-keys ) &body body | [Macro] |
Binds the local environment in such a way that the output of body will be done in an item list (that is, menu) format. This must be used in conjunction with formatting-cell, which delimits each item. The item list is placed so that its upper left corner is at the current text cursor position of stream. If the boolean move-cursor is true (the default), then the text cursor will be moved so that it immediately follows the last cell of the item list. [annotate] "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. [annotate] If row-wise is true (the default) and the item list requires multiple columns, each successive element in the item list is layed out from left to right. If row-wise is false and the item list requires multiple columns, each successive element in the item list is layed out below its predecessor, like in a telephone book. [annotate] The returned value is the output record corresponding to the table. [annotate] 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. [annotate] 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 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). [annotate] Note: The signature of this macro and the initargs of item-list-output-record both have no
equalize-column-widths. --- it would be nonsense
anyway. [edit]-- Gilbert Baumann 2003-06-07 09:51Z 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. [annotate] 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. [annotate] Note: What happens if the max-width and max-height constraints cannot be met? [edit]-- Gilbert Baumann 2003-06-07 08:33Z 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. [annotate] 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. [annotate] |
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 (row-wise t) (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. [annotate] stream is an output recording stream to which output will be done. It defaults to *standard-output*. [annotate] printer must be a function that takes two arguments, an item and a stream, and outputs the item on the stream. printer has dynamic extent. The default for printer is prin1. [annotate] presentation-type is a presentation-type. When printer is not supplied, the items will be printed as if printer were [annotate] Note: This is the only function in this substrate that references presentations (that are defined later). [edit]-- DK 2022-07-16 17:22Z #'(lambda (item stream) (present item presentation-type :stream stream)) When printer is supplied, each item will be enclosed in a presentation whose type is presentation-type. [annotate] x-spacing, y-spacing, n-columns, n-rows, max-width, max-height, initial-spacing, row-wise, and move-cursor are as for formatting-item-list. [annotate] cell-align-x and cell-align-y are used to supply :align-x and :align-y to an implicitly used formatting-cell. [annotate] record-type is as for formatting-item-list. [annotate] |