egui_cable icon indicating copy to clipboard operation
egui_cable copied to clipboard

Generic and extensible egui widgets to create analog synthesizer-like UI with data-oriented API

egui_cable

GitHub MIT/Apache 2.0 Crates.io docs.rs

A generic and extensible data-oriented widget for connecting ports by cables.

I create this for the visual programming editor of Hihaheho/Desk.

It's good for:

  • analog synthesizer-like UI
  • node-based UI
  • anything you can imagine

The code is good for studying how to write egui widgets.

Features

  • [x] connect ports by data
  • [x] dynamic connect and disconnect
  • [x] lock connection
  • [x] custom plug widget
  • [x] custom port widget
  • [x] custom cable widget
  • [x] multiple connections on a single port.
  • [x] on-connect event
  • [x] on-disconnect event
  • [x] on-hover event
  • [x] garbage collection
  • [ ] multi-touch support (help me)

Examples

Click the images to see the source code. See /examples for more examples.

Simple example

Connect example