SegmentedControl builder
A strip where exactly one segment holds.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::controls::SegmentedControl;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
label(label: impl Into<SharedString>) -> Self
segments(segments: impl IntoIterator<Item = Segment>) -> Self
selected(id: impl Into<SharedString>) -> Self
on_select(handler: impl Fn(SharedString, &mut Window, &mut App) + 'static) -> SelfRendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.