I am working on project that needs an interface for modular components that involves connecting nodes and edges. I have looked at the plugin host demo, but needed some more features.
Searching through this forum, there seem to be an interest in such component, so, I am sharing the one I created.
The code of the component and a demo application is available on Github:
Here is a screenshot of the demo application:
- Each node can be scaled individually, zoom-in
cmd + '+', zoom-out
cmd + '-', or zoom to original scale
cmd + '0'
- Multi-select using keyboard or mouse is supported
- Special type of node that can host any component
- Backed by a simple graph that supports communication between nodes
- Sample application to preview the component and how to use it
- Very simple theming for changing the overall components look and feel
Comments and feedback are most welcome.
This is almost creepy - I’ve been working on this exact same thing the last week or so. Your solution is more complete than mine, so I’ll look into seeing if I can contribute anything to yours and likely migrate everything over to your system - pending one issue…
You seem to have licensed the code as GPL, so unfortunately that reduces its usefulness for a large number of JUCE devs (such as myself) pursuing commercial applications. Any chance of changing the license to a permissive one, such as MIT or BSD?
I just want to comply with Juce license, if MIT or BSD doesn’t violate the original Juce license then I am OK. Does it?
Using an MIT or BSD license for your work shouldn’t cause any issues.
OK. I changed the license to MIT
I have also written a system like this. However, I’ve never figured out how to serialize it, because XML type structure is not well suited to graphs. Do you have a way to encode the data model for this component in a ValueTree?
How about storing all nodes in a list and all connections in another?