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

set-layout-description-and-ratios Function

Summary

Sets the description and the ratios of a layout in one CAPI atomic operation.

Package

capi

Signature

set-layout-description-and-ratios column-or-row-layout description ratios &key keep-fixed

Arguments
column-or-row-layout
An instance of either column-layout or row-layout.
description
A layout description.
ratios
A list.
keep-fixed
A boolean.
Description

The function set-layout-description-and-ratios sets the description and ratios of column-or-row-layout. Its effect is similar to using (setf layout-description) followed by (setf layout-ratios) or set-layout-ratios-keeping-fixed, but it does it in a single CAPI atomic operation (see with-atomic-redisplay).

description has the same semantics as the :description initarg when making the layout or (setf layout-description), that is it is interpreted by interpret-description to produce the list of panes for the layout.

ratios has the same semantics as the :ratios initarg when making the layout or (setf layout-ratios).

The function set-layout-ratios-keeping-fixed performs the equivalent operation of (setf layout-ratios) on column-or-row-layout with ratios, but afterwards it checks if the previous ratios had any :fixed item, and if so it replaces the corresponding item in the new ratios with :fixed.

If keep-fixed is nil (the default), the previous ratios of column-or-row-layout are ignored completely. If keep-fixed is non-nil, then after setting the ratios it checks if the previous ratios had any :fixed item, and if so it replaces the corresponding item in the new ratios with :fixed. like set-layout-ratios-keeping-fixed does. In this case description, must be compatible with the previous ratios, so that the value returned by interpret-description (when called with description) is a list with length the same or bigger than the length of the previous ratios.

See also

layout
column-layout
row-layout
set-layout-ratios-keeping-fixed
grid-layout-get-sizes


CAPI User Guide and Reference Manual (Windows version) - 18 Feb 2025 15:35:34