pub fn pane(id: impl Into<ElementId>, axes: Axes) -> Stateful<Div>Expand description
A scroll container, with the axis as an argument rather than a modifier you can forget.
ⓘ
scroll::pane("log", Axes::Vertical)
.size_full()
.track_scroll(&self.scroll)
.child(content)Returns an element for the caller to fill, the way crate::stack::row
does — it takes no children and lays nothing out, so the pane stays the
app’s and only its scroll behaviour is decided here. The id is gpui’s
requirement, not ours: a scroll container has state to track.
A horizontal pane also contains a sideways gesture (contain_sideways).
Axes::Both inherits gpui’s dominant-axis lock — a diagonal gesture moves
one axis, not two. gpui exposes no builder for allow_concurrent_scroll.