gpui-kit GitHub

Components

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>) -> Self

Options

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) -> Self

Reports

The variants of the event it emits. It never applies the change itself.

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/layout/dock.rs