Returns the current sizes (widths or heights) of the panes in a grid-layout.
capi
grid-layout-get-sizes layout &key vertical keep-nils => sizes-list
layout⇩ |
A grid-layout. |
vertical⇩ |
A boolean. |
keep-nils⇩ |
A boolean. |
sizes-list⇩ |
A list of numbers or nils. |
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
.
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.
(example-edit-file "capi/layouts/set-layout-ratios-keeping-fixed")
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