#visual-programming #data-oriented #widgets #cable #ui #editor #egui

egui_cable

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

9 releases (5 breaking)

0.5.0 Feb 21, 2023
0.4.0 Jan 30, 2023
0.3.1 Feb 19, 2023
0.3.0 Jun 16, 2022
0.0.0 May 24, 2022

#2 in #cable

30 downloads per month

MIT/Apache

43KB
1K SLoC

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

  • 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)

Examples

Click the images to see the source code.

Simple example

Connect example

Dependencies

~4–9MB
~84K SLoC