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.
- connect ports by data
- dynamic connect and disconnect
- lock connection
- custom plug widget
- custom port widget
- custom cable widget
- multiple connections on a single port.
- on-connect event
- on-disconnect event
- on-hover event
- garbage collection
- multi-touch support (help me)
Click the images to see the source code. See /examples for more examples.