• 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 14:07:14 -0700


On Mar 30, 2005, at 1:26 PM, Brian O'Brien wrote:

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;
}



<x-tad-bigger>- (void)rightMouseDown:(</x-tad-bigger><x-tad-bigger>NSEvent</x-tad-bigger><x-tad-bigger> *)</x-tad-bigger>theEvent

Generates a compiler error...
error: parse error before `NSEvent'

My conclusion is that NSImageView doesn't handle right mouse buttons or scroll wheels...
but I could be wrong...


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
 _______________________________________________
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: Daniel DeCovnick <email@hidden>
References: 
 >Mouse Input... (From: "Brian O'Brien" <email@hidden>)
 >Re: Mouse Input... (From: Shawn Erickson <email@hidden>)
 >Re: Mouse Input... (From: "Brian O'Brien" <email@hidden>)

  • Prev by Date: Re: Spell checker bug?
  • Next by Date: Re: adding NSView from other application
  • Previous by thread: Re: Mouse Input...
  • Next by thread: Re: Mouse Input...
  • Index(es):
    • Date
    • Thread