All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

layout Class

Summary

A pane that positions one or more child panes within itself according to a layout policy.

Package

capi

Superclasses

titled-object
simple-pane

Subclasses

simple-layout
grid-layout
pinboard-layout

Initargs
:default
A flag to mark the default layout for an interface.
:description
The list of the layout's children.
:initial-focus
A child of the layout, or its name, specifying where the input focus should be, or nil.
Accessors

layout-description

Description

The class layout is a pane that positions one or more child panes within itself according to a layout policy.

description is an abstract description of the children of the layout, and each layout defines its format. Generally, description is a list, each element of which is one of:

Note that pinboard-objects can be used only when the hierarchy contains pinboard-layout.

Some subclasses of layout have different syntax for description, for example grid-layout (and its subclasses row-layout and column-layout) allows arrays too, and it also accepts nil in the description list.

Setting the layout description causes the layout to translate it, and then to layout the new children, adjusting the size of its parent if necessary. The actual translation is done by interpret-description.

A number of default layouts are provided which provide the majority of layout functionality that is needed. They are as follows:

A layout for one child.
Lays its children out in a row.
Lays its children out in a column.
Lays its children out in an n by m grid.

Places its children where the user specifies.

Keeps only one of its children visible.

initial-focus specifies which child of the layout has the input focus when the layout is first displayed. Panes are compared by cl:eq or capi-object-name. See pane-initial-focus for more information about the initial focus pane..

Notes

In most cases, a layout does not have its own native GUI object. You can force it to have its own native GUI object by supplying the initargs :background :background. You need to do that if you want to make a layout without a background initially, and change it later using (setf simple-pane-background).

See also

define-layout
interpret-description
6 Laying Out CAPI Panes


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27