• 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: NSView under mouse ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView under mouse ?


  • Subject: Re: NSView under mouse ?
  • From: Fritz Anderson <email@hidden>
  • Date: Fri, 22 Aug 2003 21:18:13 -0500

On Friday, 22 August 2003, at 8:56 AM, Bob Miller wrote:

Can anyone tell me if there is an easy way to determine the NSView 'under' the current mouse screen location ? Is there an API call available for this ? Thanks in advance for any help

Well, you could iterate through your windows, get the top-level content view (-[NSWindow contentView]) of each, and pass the location to -[NSView hitTest:] in each case. Having done this, and responded accordingly, you will have reinvented the mouseEntered: and mouseExited: events, and will want to consider whether Cocoa hasn't already done it better.

-- F
_______________________________________________
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.

References: 
 >NSView under mouse ? (From: Bob Miller <email@hidden>)

  • Prev by Date: NSForm behavior
  • Next by Date: Re: I've subclassed NSOutlineView
  • Previous by thread: NSView under mouse ?
  • Next by thread: Getting the contents of a custom view
  • Index(es):
    • Date
    • Thread