Skip to main content

Module body

Module body 

Source
Expand description

Per-row container widget — Role::Row, lays its cells horizontally using a shared column-width handle owned by the parent table.

The body widget itself is the TableView root; this file just holds the small BodyRow container that one level above the leaf cell delegates so the AccessKit tree exposes the canonical Table > Row > Cell hierarchy.

§Pane bands and horizontal scroll

When no column is pinned (PaneBoundaries::leading_count == 0 and middle_end == cells.len() — the overwhelmingly common case), BodyRow keeps its original flat shape: cells are direct children, positioned by a single cumulative walk offset by -scroll_x. Content scrolled out of view is caught by the existing ancestor clips (BodyPane / TableView both clips_children()), exactly as static column overflow always has been — no new node, no behavior change for the default case.

When pinning IS active, a scrolled-out-of-place Middle-pane cell could otherwise paint over a co-resident Leading/Trailing-pane cell within the same row bounds (the outer ancestor clip only bounds the row’s own outer edges, not the seam between panes). build() then groups the cells into up to three RowBand children — Leading / Middle / Trailing — and only the Middle band clips (RowBand::clips_children); Leading/Trailing never need it since their own width IS the sum of their own columns. This is the same “wrap in a clips_children container” idiom ScrollArea / BodyPane / TableView already use, applied per-pane instead of per-widget.