• 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
Converting View Coordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting View Coordinates


  • Subject: Converting View Coordinates
  • From: Alex Keresztes <email@hidden>
  • Date: Wed, 16 Jan 2002 00:07:50 -0600

In my project I have my own custom view that overrides the

- (void)mouseDown: (NSEvent *)theEvent

so I can handle mouse clicks on that view.

I can get the screen coordinates on where the mouse was clicked by [theEvent locationInWindow]
which returns an NSPoint.

My question is if there is any way to convert the coordinates from the window coordinates to my
custom view's coordinates? I could potentially do this myself but I was wondering if anyone knew of
any such functions?

Any help is appreciated.

Thanks
Alex


  • Follow-Ups:
    • Re: Converting View Coordinates
      • From: Christopher B Hamlin <email@hidden>
    • Re: Converting View Coordinates
      • From: "John C. Randolph" <email@hidden>
  • Prev by Date: Re: Getting list of classes
  • Next by Date: Re: Converting View Coordinates
  • Previous by thread: Re: KEXT File System Plugins?
  • Next by thread: Re: Converting View Coordinates
  • Index(es):
    • Date
    • Thread