iced_nodegraph

A node graph editor widget for iced

crates.io 0.5.0

Core types

  • PinRef addresses a pin as (node_id, pin_id) over your Ids. It is the endpoint type in every connection callback.
  • PinEnd is the richer endpoint view (direction, occupancy, payload) handed to can_connect; PinInfo is the per-pin view handed to the style closures.
  • The camera is not a type you hold: push pan and zoom in through NodeGraph::camera and read the user's back out through on_camera, both as a plain (Point, f32). To frame content programmatically, give the graph an id and run the focus task, as with text_input::focus or scrollable::scroll_to.
  • Keymap holds the rebindable key and pointer bindings, with platform-appropriate defaults.
  • Particle is a marker gliding along an edge, for traffic or queued work: particle(born, speed) pushed through Edge::particles is drawn speed * age world units along the cable and vanishes at the input pin. The widget keeps the redraw loop running while one moves; the host owns each particle's lifetime by pushing it every frame.
  • GraphInfo carries per-frame diagnostics to on_info: element counts (total / in view / culled), CPU op timings, and the SDF pipeline's GPU work and memory counters. Delivered one frame behind, since it is measured during draw.