
1 CAPI Reference Entries
grid-layout is a layout which positions its children on a two dimensional grid.
x-y-adjustable-layout
row-layout
column-layout
orientation
rows
columns
x-ratios
y-ratios
x-gap
y-gap
x-uniform-size-p Ift, make each of the columns the same size.
y-uniform-size-p Ift, make each of the rows the same size.
layout-x-ratios
layout-y-ratios
layout-x-gap
layout-y-gap
min-width of any column is the maximum of themin-widths of the children in the column. The size of the layout is controlled by the constraints on the rows and columns.
:row). In the latter case, one of:columns or:rows can be given to specify the dimensions (the default is two columns).
x-ratios andy-ratios slots control the sizes of the elements in a grid layout in the following manner:
x-ratios (ory-ratios) control the size of each child relative to the others. If an element inx-ratios (ory-ratios) isnil the child is fixed at its minimum size. Otherwise the size is calculated as follows
(round (* total ratio) ratio-sum)
nil elements ofx-ratios (ory-ratios) and ratio is the element of ratios corresponding to the child. If this ideal ratio size does not fit the maximum or minimum constraints on the child size, and the constraint means that changing the ratio size would not assist the sum of the child sizes fitting the total space available, then the child is fixed at its constrained size, the child is removed from the ratio calculation, and the calculation is performed again. Ifx-ratios (ory-ratios) has fewer elements than the number of children, 1 is used for each of the missing ratios. Leavingx-ratios (ory-ratios)nil causes all of the children to be the same size.
x-adjust andy-adjust like every otherx-y-adjustable-layout, except that if there is one value then it is used for all of the panes, whereas if it is a list then each value in the list refers to one row or column. If the list does not contain a value for every row or column then the last value is taken to refer to all of the remaining panes.
(capi:contain (make-instance
'capi:grid-layout
:description '("1" "2" "3"
"4" "5" "6"
"7" "8" "9")
:columns 3))
(capi:contain (make-instance
'capi:grid-layout
:description (list "List:"
(make-instance
'capi:list-panel
:items '(1 2 3))
"Buttons:"
(make-instance
'capi:button-panel
:items '(1 2 3)))))
(capi:contain (make-instance
'capi:grid-layout
:description (list "List:"
(make-instance
'capi:list-panel
:items '(1 2 3))
"Buttons:"
(make-instance
'capi:button-panel
:items '(1 2 3)))
:x-adjust '(:right :left)
:y-adjust '(:center :bottom)))
(capi:contain (make-instance
'capi:grid-layout
:description (list "List:"
(make-instance
'capi:list-panel
:items '(1 2 3))
"Buttons:"
(make-instance
'capi:button-panel
:items '(1 2 3)))
:orientation :column))
capi/layouts/form-using-grid.lisp
layout

Generated with Harlequin WebMaker