You will find a similar "connected lines to inputs and outputs" interface in 
Quartz Composer.  I don't think Apple has provided source code for either 
approach, but it is not that hard.  

One of my company's products contained a similar interface in NeXTstep 
(proto-Cocoa) in ~1996.  We collaborated with some contract engineers who 
adapted a famous circuit board layout algorithm to our purposes so that 
connection lines would automatically reroute to preserve 90 deg. angles and 
minimize crossing lines as the "boxes" containing inputs and outputs are 
dragged around.  Apple still hasn't caught up to our implementation ;)

You can start from Apple's Sketch sample application source code for 
inspiration creating the graphics that can be dragged.  

Our application used NSCell subclasses to represent the inputs and outputs and 
host connection lines.  

For another example, there is a simple drawing application from "Cocoa Design 
Patterns" available freely in CocoaDesignPatternsSampleCode.zip at 
http://www.cocoadesignpatterns.com/sample-code/ See Ch29.  It would be fun and 
interesting to add connection lines between the boxes in the Ch29 example.

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to