Re: Mouse Input...
Re: Mouse Input...
- Subject: Re: Mouse Input...
- From: "Brian O'Brien" <email@hidden>
- Date: Wed, 30 Mar 2005 13:26:37 -0700
My class is a subclass of NSImageView
At the moment I am able to receive left mouse drag...
However I get no right mouse or scroll wheel input....
I am unsure from the documentation if the wheel input comes with a down event...
I suspect that it is because I have not called
<x-tad-bigger>setAcceptsMouseMovedEvents</x-tad-bigger>
- (void)mouseDown:(NSEvent *)theEvent
{
}
- (void)mouseDragged:( NSEvent * )theEvent
{
float dx, dy;
switch ([theEvent type])
{
case NSLeftMouseDragged:
NSLog(@"Left Mouse!");
break;
case NSRightMouseDragged:
NSLog(@"Right Mouse!");
break;
case NSScrollWheel:
NSLog(@"Scroll Wheel");
break;
}
On Mar 30, 2005, at 12:57 PM, Shawn Erickson wrote:
On Mar 30, 2005, at 11:42 AM, Brian O'Brien wrote:
I have a few questions about mouse input:
1) How do you get the mouse wheel?
<http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/Concepts/MouseEvents.html>
Link to above also exists in the documentation for NSEvent.
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSEvent.html>
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden