Re: NSTextAttachment, MouseOver, GlyphPosition

2011-02-21 Thread Ross Carter
On Feb 19, 2011, at 12:49 PM, Peter Krajčík wrote: > 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? If you have subclassed NSTextAttachmentCel

Re: NSTextAttachment, MouseOver, GlyphPosition

2011-02-19 Thread Peter Krajčík
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 NSTextAttachmen

NSTextAttachment, MouseOver, GlyphPosition

2011-02-19 Thread Peter Krajčík
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 NSTra