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>) -> SelfOptions
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) -> SelfReports
The variants of the event it emits. It never applies the change itself.
- ViewportChanged
- NodeMoved
- ConnectionRequested
Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.