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

grid-layout-get-sizes Function

Summary

Returns the current sizes (widths or heights) of the panes in a grid-layout.

Package

capi

Signature

grid-layout-get-sizes layout &key vertical keep-nils => sizes-list

Arguments
layout
vertical
A boolean.
keep-nils
A boolean.
Values
sizes-list
A list of numbers or nils.
Description

The function grid-layout-get-sizes returns the sizes (widths or heights) of panes in layout in one of the dimensions.

vertical specifies which dimension to use. If layout is an instance of column-layout, vertical default to t, otherwise it defaults to nil.

If keep-nils is non-nil (the default) and layout has ratios for the dimension grid-layout-get-sizes uses, then an element of sizes-list is nil for a pane where the corresponding element in the ratios is nil.

Notes

The main usage of grid-layout-get-sizes is intended to be remembering the sizes in order to set them back later, using one of (setf layout-ratios), set-layout-ratios-keeping-fixed, set-layout-description-and-ratios, (setf layout-x-ratios) or (setf layout-x-ratios).

keep-nils defaults to t because, when setting the ratios, keeping the nils in the ratios is the most useful behavior in most of cases.

Examples
(example-edit-file "capi/layouts/set-layout-ratios-keeping-fixed")
See also

grid-layout
set-layout-ratios-keeping-fixed
set-layout-description-and-ratios


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