Raxol.UI.Layout.Containers (Raxol v0.4.0)
View SourceHandles layout calculations for container elements like rows and columns.
This module is responsible for:
- Row layout calculations
- Column layout calculations
- Flexbox-like distribution of space
- Gap and alignment handling
Summary
Functions
Measures the space needed by a column element.
Measures the space needed by a row element.
Processes a column element, calculating layout for it and its children.
Processes a row element, calculating layout for it and its children.
Functions
Measures the space needed by a column element.
Parameters
column
- The column element to measureavailable_space
- The available space for the column
Returns
The dimensions of the column: %{width: w, height: h}
Measures the space needed by a row element.
Parameters
row
- The row element to measureavailable_space
- The available space for the row
Returns
The dimensions of the row: %{width: w, height: h}
Processes a column element, calculating layout for it and its children.
Parameters
column
- The column element to processspace
- The available space for the columnacc
- The accumulator for rendered elements
Returns
A list of positioned elements with absolute coordinates.
Processes a row element, calculating layout for it and its children.
Parameters
row
- The row element to processspace
- The available space for the rowacc
- The accumulator for rendered elements
Returns
A list of positioned elements with absolute coordinates.