gpui-kit GitHub

Components

SplitTree builder

Draws a [`SplitLayout`] and reports what the typist asked to change.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::layout::SplitTree;

Construct

new(ident: impl Into<Ident>) -> Self

Options

Chain onto the value.

layout(layout: SplitLayout) -> Self
pane(id: impl Into<SharedString>, content: impl IntoElement) -> Self
on_change(handler: impl Fn(SplitChange, &mut Window, &mut App) + 'static) -> Self

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/tree.rs