• 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 & Cursor Position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView & Cursor Position


  • Subject: Re: NSView & Cursor Position
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 14 May 2002 10:20:38 -0700

On Mon, 13 May 2002 23:01:46 -0400, Adrian <email@hidden> said:

>How would I go about getting the cursor position while it is over an
>NSView, relative to its coordinate system at any given time?

One way would be to call mouseLocationOutsideOfEventStream and convert
coordinate systems as necessary.

For example, assuming it is the NSView doing the asking:

[self convertPoint:
[[self window] mouseLocationOutsideOfEventStream] fromView: nil]

m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes gar anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.

  • Prev by Date: Re: Preference menu key equivalent standard?
  • Next by Date: Re: Application Dock Menu little issue II (attack of the Dock)
  • Previous by thread: NSView & Cursor Position
  • Next by thread: When will drag'n'drop to the Finder work? (promiseHFS)
  • Index(es):
    • Date
    • Thread