创建Quartz Composer Style界面 [英] Creating a Quartz Composer Style interface

查看:77
本文介绍了创建Quartz Composer Style界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的Cocoa / Objective C(++)应用程序添加一个Quartz Composer补丁编辑器样式的界面元素。对于不熟悉QC的人,补丁编辑器是补丁图的视觉表示:有效地显示每个节点及其属性,并提供鼠标驱动的选择/点击/拖动界面。它看起来像...

I'm wanting to add a Quartz Composer "patch editor" style interface element to my Cocoa/Objective C(++) application. For those unfamiliar with QC, the patch editor is a visual representation of the patch graph: effectively showing each node and it's properties, and providing a mouse driven select/click/drag interface. It looks like...

我将使用它来渲染特定类型的多根树,其中每个节点都有一些相关联的文本和一个弧连接到它的孩子。

I'll be using it to render a specific type of multi-rooted tree, where each node has some associated text and an arc joining it to its children. Users will be clicking on the tree nodes to select them, as well as dragging them around.

现在,我在滚动视图中使用自定义NSView Quartz在每个渲染绘制每个节点,弧线等,并手动处理鼠标和键盘输入(包括命中测试,移动等)。这似乎残酷的轮盘改造,并没有与核心动画的所有良好的互动。我希望有人有一些一般的替代建议。

At the moment, I'm using a custom NSView inside a scroll view that Quartz draws each node, the arcs etc at each render, and processes mouse and keyboard input by hand (including hit testing, movement and so forth). This seems brutally wheel reinventive, and doesn't interact all that well with Core Animation. I'm hoping someone has some general alternative advice. I'm pondering along the lines of...


  • 我忽略了现有的控制/第三方库

  • 使树中的每个节点成为NSView,并使用正常的视图结构处理输入,同时绘制图形。但是,节点间弧线渲染似乎并不自然地融入到设计中

  • 使用单个NSView的东西,但是使每个树节点和弧都是单独的图层

  • 其他

  • An existing control/3rd party library I've overlooked
  • Make each node in the tree an NSView, and use the normal view structure to handle the input, whilst drawing the graphics in the same way. But then, the inter-node arc rendering doesn't seem to fit naturally into the design
  • Something using a single NSView still, but making each tree node and arc an individual layer
  • Something else

非常感谢,

adamw

推荐答案

您可能想给EFLaceView一个外观: FlowChartView on CocoaDev

You might want to give EFLaceView a look: FlowChartView on CocoaDev

编辑:上面的下载链接已经死了。有一个版本的 github上的EFLaceView

download link on page above is dead. There is a version of EFLaceView on github.

这篇关于创建Quartz Composer Style界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆