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

NextPrevUpTopContentsIndex

calculate-layout

Generic Function
Summary

Provides a method for laying out the children of a new layout.

Package

capi

Signature

calculate-layout layout x y width height

Description

The generic function calculate-layout is called by the CAPI to layout the children of a layout. When defining a new class of layout using define-layout, a calculate-layout method must be provided that sets the x , y , width and height of each of the layout's children. This method must try to obey the constraints specified by its children (its minimum and maximum size) and should only break them when it becomes impossible to fit the constraints of all of the children.

To set the x , y , width and height of the layout, use the macro with-geometry which works in a similar way as with-slots.

See also

get-constraints
with-geometry
interpret-description
Laying Out CAPI Panes


CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex