Custom Nodes — rataflow

rataflow

GitHubdocs.rscrates.io
examples/custom_nodes.rs ↗

Custom node rendering via the NodeContent trait.

Demonstrates four rendering approaches:

  • Node A: TextContent (built-in) with builder customization
  • Node B: Paragraph widget with status indicator
  • Node C: Canvas widget with Braille shapes
  • Node D: Raw buffer with colored diamond pattern

Also showcases:

  • Per-node HandleStyle customization (Unicode symbols)
  • Multiple target handles on a single node (C has both top and left)
  • Explicit handle routing with with_target_handle()
  • Drag node body to move it
  • Drag from source handle (right side) to create edges
  • Drag on empty space to pan the canvas