• 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
Mouse click inside NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mouse click inside NSView


  • Subject: Mouse click inside NSView
  • From: Aaron Boothello <email@hidden>
  • Date: Wed, 10 Dec 2003 02:55:31 +0800

I have a window. on the righthalf is an NSTabView. within the tabView there is a 'CustomView' (that im drawing OpenGL content into).
When i click in the customView, i use NSRect, [NSEvent locationInWindow], and NSPoint to figure outthe coordinates of the mouse click.

The [NSEvent locationInWindow], gives me the coordinate of the click within the entire window. the NSRect gives me the values(origin) of the TabView. i need to either:
1. get the location In NSTabView
or
2. get the NSRect values of the window itself.

cause i need to get the same reference point in order to calculate the location in the custom view ive clicked on.

Any help would be great.
Cheers,
Aaron.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Mouse click inside NSView
      • From: "Erik M. Buck" <email@hidden>
    • Re: Mouse click inside NSView
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: RE: Using sheets with DO Threads (was Working with sheets...)
  • Next by Date: Re: CGShading line, triangle?
  • Previous by thread: RE: Using sheets with DO Threads (was Working with sheets...)
  • Next by thread: Re: Mouse click inside NSView
  • Index(es):
    • Date
    • Thread