Expand description
Screen layout — split a region into ratioed rows and columns.
Port of rich/layout.py. A Layout is a tree: a leaf holds a
renderable, a branch splits its region among its visible children
either into rows (side by side, Splitter::Row) or columns (stacked,
Splitter::Column). Region sizes come from ratio_resolve, and each
leaf is rendered to an exact (width, height) block, then tiled. A leaf
with no renderable shows upstream’s placeholder panel; the last render’s
regions are kept in Layout::map.
Structs§
- Layout
- A node in a layout tree. Mirrors
rich.layout.Layout. - Layout
Render - One leaf of a render. Mirrors upstream’s
LayoutRender, keyed by the layout’snameand itspath(child indexes from the root, counting hidden children) since the port has no object identity to key by.
Enums§
- Splitter
- How a layout divides its region among its children. Mirrors upstream’s
RowSplitter/ColumnSplitter.