SacredGeometry
SacredGeometry

Reputation: 911

Custom NSView Event Handelling

I am trying to set up an interface like the one used in Xcodes interface builder.

What i would like to know is what i would need to do to translate mouse events i.e click drag & relay mouse position to the views position.

or double click events inside views trigger methods etc

Thank you in advance.

edit: for clarity

interface builder http://img200.imageshack.us/img200/5269/screenshot20110824at204.jpg

Upvotes: 0

Views: 220

Answers (1)

Chuck
Chuck

Reputation: 237110

If you have a point in window coordinates, you can do [view convertPoint:location fromView:nil]. NSView has similar methods for rects and sizes.

Upvotes: 1

Related Questions