Say region and placement, not extent

The split box was named `region` and `placement` on 2026-09-17; `frame`
came back as a length and survived, `extent` did not. It stayed as the
name for both halves, distinguished only by prose: `draw_at` bound the
caller's `part` to a parameter called `extent`, and `ActiveData` held two
`UiRegion`s that `draw_at` wrote `part: extent` from.

The box a parent asks a widget in is now the region, and where its
drawing ends up is its placement. `Painter`'s four holds accumulators
become the one `LayoutHolds` they were assembled into, which also drops
the name mapping between them.

The cold dump of 400 depth-5 trees is byte-identical across the change.
This commit is contained in:
iris-ai committed 2026-09-19 14:49:56 -04:00
1 parent 84dad211f5
commit 5642f2010a
13 files changed
+212 -227

No files matched your search

+6 -6
View File
@@ -27,14 +27,14 @@ pub enum Part {
}
impl Part {
/// Where it lands in the coordinates `extent` is in.
pub(crate) fn of(self, extent: UiSpan, align: AxisAlign) -> UiSpan {
/// Where it lands in the coordinates `own` is in.
pub(crate) fn of(self, own: UiSpan, align: AxisAlign) -> UiSpan {
match self {
Self::All => extent,
Self::From(span) => UiSpan::new(extent.start + span.start, extent.start + span.end),
Self::Of(span) => span.within(&extent),
Self::All => own,
Self::From(span) => UiSpan::new(own.start + span.start, own.start + span.end),
Self::Of(span) => span.within(&own),
Self::Sized(len) => {
let start = extent.start + (extent.len() - len).scale(align.rel());
let start = own.start + (own.len() - len).scale(align.rel());
UiSpan::new(start, start + len)
}
}