Hi,

I have subclassed NSTextAttachment/NSAttachemntCell pair and I need to 
implement mouseOver.
NSTextAttachment are inserted programatically to NSTextField's 
NSAttributedString object, displayed correctly
and I can manipulate them.
I have found not very elegant way how to create and track NSTrackingArea for 
each NSTextAttachment character in
NSTextField, but I am not happy with the way how I am getting NSRect 
representing NSTextAttachment.

What is a proper way to get cellFrame for NSTextAttachmentCell (or to be more 
general, position of glyph in NSAttributedString) that is inserted to 
NSAttributedString or drawn by NSTextFieldCell?

I think could use NSLayoutManager that could return a glyph position I could 
use as origin to calculate cellFrame, but
I have no idea how to get NSLayoutManager from NSTextField | NStextFieldCell | 
NSAttributted object.

Thank you.

Peter

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to