(no subject)
(no subject)
- Subject: (no subject)
- From: Dave <email@hidden>
- Date: Thu, 14 Aug 2003 22:08:14 -0400
Hi, how can I track the mouse movement when either the right or middle
mouse button is pressed?
I'd like to have something like the mouseDragged: method but for all
buttons. Even better would be if it is possible to use something like
the mouseEntered: and mouseExited: events when a mouse button is
pressed.
/Bishop
--
"Good people do not need laws to tell them to act responsibly, while
bad people will always find a way around the law." - Plato
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
Hello,
To track the mouse position you can use NSEvent's mouseLocation
method...
[NSEvent mouseLocation];
NSEvent's mouseLocation method returns the mouse location, where the
lower left corner is (0, 0). Maybe you want this... If you need the
(0,0) point to be in the upper left corner, you can use the code below,
which will return a new NSPoint with the new starting point.
NSMakePoint([NSEvent mouseLocation].x,
CGDisplayPixelsHigh(CGMainDisplayID()) - [NSEvent mouseLocation].y);
Is this what you needed or am I completely wrong?
Dave
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.