Expand description
Small layout helpers on top of ratatui_core::layout: centring, padding, fixed rows/columns,
and an Overlay queue for things drawn after everything else (dropdowns, tooltips).
Structs§
- Overlay
- Deferred drawing queue: widgets push closures that must paint over everything else (dropdown lists, tooltips, menus). Drain it at the end of the frame.
Functions§
- center
- A
w×hrectangle centred inarea(clamped to fit). - center_
h - Horizontal centring only, full height.
- cols
- columns
- Equal columns with
gapbetween them. - direction_
split - flow
- A flow layout: places fixed-size boxes left→right, wrapping to the next line.
- grid
- Grid of
cols×rowscells with gaps. - pad
- Shrink by
xcells left/right andycells top/bottom. - pad_
trbl - Shrink with individual sides (top, right, bottom, left), CSS order.
- popup_
below - Anchor a
w×hpopup next toanchor, preferring below, flipping above when it would overflowbounds, and sliding horizontally to stay inside. - rows
- Split into rows of the given heights; the last
Constraint::Filltakes the rest. - stack
- Fixed-height rows with
gapbetween them; the last one takes the remainder.