Re: NSTextAttachment, MouseOver, GlyphPosition
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