Dock builder
Panels arranged in regions around a centre.
A builder is RenderOnce. Construct and mount it in one expression.
use gpui_kit::layout::Dock;
Construct
new(ident: impl Into<Ident>) -> SelfOptions
Chain onto the value.
panel(region: DockRegion, panel: DockPanel) -> Self
panels(region: DockRegion, panels: impl IntoIterator<Item = DockPanel>) -> Self
active(region: DockRegion, panel: impl Into<SharedString>) -> Self
collapsed(region: DockRegion, collapsed: bool) -> Self
share(region: DockRegion, share: f32) -> Self
min_size(region: DockRegion, min: f32) -> Self
on_event(handler: impl Fn(DockEvent, &mut Window, &mut App) + 'static) -> SelfReports
The variants of the event it emits. It never applies the change itself.
- PanelSelected
- PanelMoved
- RegionCollapsed
- RegionResized
Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.