FROM : Daniel J Farrell
DATE : Wed Jun 28 21:52:00 2006
Hi folks,
Is there a NSView method that will tell me the current coordinates
(NSPoint) of the mouse pointer relative to the NSView (in this case
it is actually a CustomView) coordinate system.
I have found NSEvent('s) -mouseLocation but this gives at NSPoint
relatively to the screen and NSWindow('s) -
mouseLocationOutsideOfEventStream and this gives an NSPoint relative
to the Window. I guess it must be possible to transform from any or
all of the different coordinate systems but just wanted to see if
there is an easy Cocoa way to do find this information.
Regards,
Daniel
DATE : Wed Jun 28 21:52:00 2006
Hi folks,
Is there a NSView method that will tell me the current coordinates
(NSPoint) of the mouse pointer relative to the NSView (in this case
it is actually a CustomView) coordinate system.
I have found NSEvent('s) -mouseLocation but this gives at NSPoint
relatively to the screen and NSWindow('s) -
mouseLocationOutsideOfEventStream and this gives an NSPoint relative
to the Window. I guess it must be possible to transform from any or
all of the different coordinate systems but just wanted to see if
there is an easy Cocoa way to do find this information.
Regards,
Daniel
| Related mails | Author | Date |
|---|---|---|
| Daniel J Farrell | Jun 28, 21:52 | |
| Greg Titus | Jun 28, 21:55 | |
| Daniel J Farrell | Jun 28, 23:22 |






Cocoa mail archive

