NextPrevUpTopContentsIndex

layout

Class
Summary

A layout is a simple 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
switchable-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 layout's 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:

a pane

a slot name, where the name refers to a slot in the layout's interface containing a pane

a string, where the string gets converted to a title-pane

For grid-layout and its subclasses, elements of description can also be nil . See grid-layout for the interpretation of this value.

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.

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

simple-layout

A layout for one child.

row-layout

Lays its children out in a row.

column-layout

Lays its children out in a column.

grid-layout

Lays its children out in an n by m grid.

pinboard-layout

Places its children where the user specifies.

switchable-layout

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 eq or capi-object-name .

Note: for a pinboard-layout, the list of children in the layout-description is ordered bottom-first.That is,

(setf (capi:layout-description pinboard-layout)
      (cons object
            (capi:layout-description pinboard-layout)))

is equivalent to

(capi:manipulate-pinboard pinboard-layout object
                          :add-bottom)
See also

define-layout
manipulate-pinboard


LispWorks CAPI Reference Manual - 11 Apr 2005

NextPrevUpTopContentsIndex