gpui-kit GitHub

Components

Toolbar builder

A bar of grouped actions.

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

use gpui_kit::layout::Toolbar;

Construct

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

Options

Chain onto the value.

label(label: impl Into<SharedString>) -> Self
group(id: impl Into<SharedString>, items: impl IntoIterator<Item = ToolbarItem>) -> Self
spacer() -> Self
overflow_after(count: usize) -> Self
overflow_menu(menu: Entity<Menu>) -> Self

Queries

Only answer; they change nothing.

item_count() -> usize

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