Expand description
Screen layout — split a region into ratioed rows and columns.
Port of rich/layout.py (core). A Layout is a tree: a leaf holds a
renderable, a branch splits its region among children either into columns
(stacked vertically via Layout::split_column) or rows (side by side via
Layout::split_row). Region sizes come from ratio_resolve, and each
leaf is rendered to an exact (width, height) block, then tiled.
Scope: sizing (size/ratio/minimum_size), row/column splits, and leaf
rendering are ported. The interactive placeholder shown for an empty leaf
(upstream’s fancy _Placeholder) is rendered as blank space (see
docs/DIVERGENCES.md).
Structs§
- Layout
- A node in a layout tree. Mirrors
rich.layout.Layout.