GPUI Box GitHub

Components

NodeGraph builder

A run drawn as connected steps.

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

use gpui_kit::canvas::NodeGraph;

Construct

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

Options

Chain onto the value.

node(node: GraphNode, x: f32, y: f32) -> Self
placed(placed: Placed) -> Self
edge(edge: GraphEdge) -> Self
edges(edges: impl IntoIterator<Item = GraphEdge>) -> Self
state(state: GraphState) -> Self
empty(empty: EmptyState) -> Self
grid(grid: bool) -> Self
offset(x: f32, y: f32) -> Self
viewport(viewport: GraphViewport) -> Self
zoom(zoom: f32) -> Self
zoom_range(min: f32, max: f32) -> Self
on_event(handler: impl Fn(&NodeGraphEvent, &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/canvas/graph.rs