• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mouse Input...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Mouse Input...
      • From: "Brian O'Brien" <email@hidden>
    • Re: Mouse Input...
      • From: Shawn Erickson <email@hidden>
References: 
 >Mouse Input... (From: "Brian O'Brien" <email@hidden>)
 >Re: Mouse Input... (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Check for Mac OS Version
  • Next by Date: Re: Mouse Input...
  • Previous by thread: Re: Mouse Input...
  • Next by thread: Re: Mouse Input...
  • Index(es):
    • Date
    • Thread