On Dec 23, 2009, at 15:03, PCWiz wrote:

> 1. Does NSTrackingArea support mouseDown events? If so, how would I find if 
> the click is within the bounds of a tracking rect in my mouseDown handler?

No. At the time you receive the mouseDown it's assumed you already know which 
tracking area(s) you're in, since you'll have already received NSMouseEntered 
events for any tracking areas the mouse has entered.

It seems feasible to find the tracking area by hit testing all of them 
serially, if you don't have the tracking status available and if there aren't a 
lot of tracking areas. However, that more or less wastes the tracking 
functionality, so it wouldn't be the preferred approach.

> 2. For mouseEntered and mouseExited handlers, how would I find which tracking 
> rect the event occurred in (if there are multiple tracking rects)?

Use NSEvent's "trackingArea" property.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to