Creating a quartz composer style interface

I want to add a Quartz Composer patch editor style interface element to my Cocoa / Objective C (++) application. For those who are not familiar with QC, the patch editor is a visual representation of the patch graph: it effectively displays each node and its properties, and also provides a mouse-controlled click / click / drag interface. It looks like ... An example of a quartz composer http://files.me.com/archgrove/ya1xhh

I will use it to render a specific type of multi-rooted tree, where each node has some associated text and an arc connecting it to its children. Users will click on the nodes of the tree to select them, as well as drag them around.

I am currently using a custom NSView inside the scroll bar, which Quartz draws each node, arcs, etc. in each render, and handles mouse and keyboard input manually (including testing for shock, movement, etc.). This is like wheel abuse, and doesn’t interact well with Core Animation. I hope someone has a common alternative advice. I meditate on the lines ...

  • Existing management / third-party library that I missed
  • Make each node in the NSView tree and use the standard view structure to handle input while drawing graphics. But then, the inter node arc visualization does not seem to fit naturally into the design
  • Something using one NSView, though, but creating each node tree and creating a separate layer
  • Something else

Thanks,

adamw

+2
source share
1 answer

You might want to give the EFLaceView a view: FlowChartView on CocoaDev

Edit: The download link on the page above is dead. There is a version of EFLaceView on github .

+3
source

Source: https://habr.com/ru/post/1313215/


All Articles