• 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 tracking in CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mouse tracking in CALayer


  • Subject: Mouse tracking in CALayer
  • From: "Tom Pusateri" <email@hidden>
  • Date: Fri, 4 Jan 2008 16:51:26 -0500

I have a single NSView in which I've created many CATextLayers to form
a menu that can slide over. I would like to expand a menu item if you
hover the mouse on the right edge of the CATextLayer. NSTrackingArea
seems to be a good fit except that it is view centric and not layer
centric. I thought about creating an NSTrackingArea for each layer
once the layers are positioned but after adding the constraints, I
don't know how to determine the layers position. There isn't a
delegate method or anyway to know when the layer position has been
calculated so I know where to create the NSTrackingArea. Of course,
then I have to deal with moving the tracking areas each time the layer
moves. Should I just used mouseMoved even though its less efficient?
Then how do I know which layer the mouse position is over?

Thanks,
Tom
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Mouse tracking in CALayer
      • From: David Duncan <email@hidden>
  • Prev by Date: Streaming a file as it gets written?
  • Next by Date: Streaming a file as it gets recorded?
  • Previous by thread: Streaming a file as it gets written?
  • Next by thread: Re: Mouse tracking in CALayer
  • Index(es):
    • Date
    • Thread