• 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: NSTextAttachment, MouseOver, GlyphPosition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextAttachment, MouseOver, GlyphPosition


  • Subject: Re: NSTextAttachment, MouseOver, GlyphPosition
  • From: Peter Krajčík <email@hidden>
  • Date: Sat, 19 Feb 2011 22:08:15 +0100

Hi,

one of the ways could be to use own NSLayoutManager and use it to draw NSAttributed string
in my subclass of NSTextAttachmentCell and its draw method.
NSLayoutManager has boundingRectForGlyphRange:inTextContainer: method from which I could obtain bounds of glyph representing
NSTextAttachment at position I am interested in.
I can use this method to get rectangles of all attachments in my updateTrackingAreas method.

Does anybody see this as the right way ?

Peter

_______________________________________________

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

  • Prev by Date: Re: NSComboxBox alternative
  • Next by Date: -[NSSet containsObject:] returns NO when it should return YES
  • Previous by thread: Re: NSTextAttachment, MouseOver, GlyphPosition
  • Next by thread: inter-process locks
  • Index(es):
    • Date
    • Thread