Re: Single Click not Called on NSTextAttachment

2013-08-08 Thread Keary Suska
On Aug 8, 2013, at 8:37 AM, Gordon Apple wrote: > I¹ve added resize capability for image attachments in my subclass of > NSTextView. Currently, this gets triggered by a double-click on the > attachment. I would prefer to do this with a single-click so I can reserve > double-click for launching a

Single Click not Called on NSTextAttachment

2013-08-08 Thread Gordon Apple
I¹ve added resize capability for image attachments in my subclass of NSTextView. Currently, this gets triggered by a double-click on the attachment. I would prefer to do this with a single-click so I can reserve double-click for launching an editor for some types of attachments. (I suppose I cou

Re: NSTextAttachment

2012-07-16 Thread Alexander Reichstadt
: if ([attachment isKindOfClass:[NSTextAttachment class]] && ![[attachment attachmentCell] isKindOfClass:[TATextAttachmentCell class]]) { This is happening in - (void)textStorageWillProcessEditing:(NSNotification *)note What I don't understand i

Re: NSTextAttachment

2012-07-16 Thread Jens Alfke
STextAttachmentCell for things that are not files. Note the comment in NSTextAttachment.h that says "An NSTextAttachment *usually* has a fileWrapper" (emphasis mine). It doesn't *have* to have one. Unfortunately it's been enough years that I don't remember the de

NSTextAttachment

2012-07-16 Thread Alexander Reichstadt
Is there any way to have an NSTextView to hold text and custom data-widgets that are unrelated to filewrappers? I don't want NSTextAttachmentCell I think, because without a file it doesn't work, without tricking around it does not go in and out of the pasteboard, and NSTokenAttachment is some pr

Custom NSTextAttachment

2012-07-13 Thread Alexander Reichstadt
Hi, trying to build a custom subclass of NSTextAttachment I thought it would be fully supported in an NSTextView. In a test project at app launch I insert an attachment: [_textView setString:@"This is a test string\rThis is a test string\rThis is a test string\rThis is a test string\

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
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 (Cocoa-dev@lists.apple.com) Please do not post

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

Re: Layout NSTextAttachment

2009-07-06 Thread Kyle Sluder
On Mon, Jul 6, 2009 at 8:05 AM, Dado Colussi wrote: > My question is: what is the right way to draw an attachment, and to let text > flow around it? The right way would be to not use an attachment. Subclass NSTextView and write a custom layout manager. --Kyle Sluder _

Re: Layout NSTextAttachment

2009-07-06 Thread Martin Wierschin
I want to layout an NSTextAttachment (an image) to the right margin inside a text paragraph such that text would flow around the image. I have managed to coordinate the text container to correctly adjust the proposed rows, and to make my layout manager to draw the attached image to the

Layout NSTextAttachment

2009-07-06 Thread Dado Colussi
I want to layout an NSTextAttachment (an image) to the right margin inside a text paragraph such that text would flow around the image. I have managed to coordinate the text container to correctly adjust the proposed rows, and to make my layout manager to draw the attached image to the correct

Re: How to detect NSTextAttachment deletion

2008-07-14 Thread Todd Ransom
can happen if the user simply hits the delete key or replaces the image with some string. How can i detect if an NSTextAttachment or it's NSTextAttachmentCell is about to be removed from the textView? Any help would be appreciated. thanks___ Coc

Re: How to detect NSTextAttachment deletion

2008-07-14 Thread Aki Inoue
user simply hits the delete key or replaces the image with some string. How can i detect if an NSTextAttachment or it's NSTextAttachmentCell is about to be removed from the textView? Any help would be appreciated. thanks___ Cocoa-dev mailing

How to detect NSTextAttachment deletion

2008-07-14 Thread chaitanya pandit
if the user simply hits the delete key or replaces the image with some string. How can i detect if an NSTextAttachment or it's NSTextAttachmentCell is about to be removed from the textView? Any help would be appreciated. thanks ___ Cocoa-dev ma

Re: PDF file in NSTextAttachment

2008-04-01 Thread Martin Wierschin
I create a file wrapper from a pdf image on disk and insert it into my textstorage, with no problem, which draws fine on screen but then when I want to print the document it draws the image at low resolution. This is a bug that was introduced in Leopard that affects PDF and EPS images. I

Re: PDF file in NSTextAttachment

2008-04-01 Thread Douglas Davidson
On Apr 1, 2008, at 11:33 AM, [EMAIL PROTECTED] wrote: I am trying to add a pdf image to an NSTextAttachment. I create a file wrapper from a pdf image on disk and insert it into my textstorage, with no problem, which draws fine on screen but then when I want to print the document it draws

PDF file in NSTextAttachment

2008-04-01 Thread fred . redcliffe
Dear all I am trying to add a pdf image to an NSTextAttachment. I create a file wrapper from a pdf image on disk and insert it into my textstorage, with no problem, which draws fine on screen but then when I want to print the document it draws the image at low resolution. Also when the

Re: NSTextField and NSTextAttachment

2008-02-27 Thread Ben Lachman
: i've created a NSTextView and placed one or more NSTextAttachment within it that wrap controls and i'm able to get the behavior of clicking the control etc as i want. however when i place the same NSTextAttachment in a NSTextField via: [textField setAttributedStr

NSTextField and NSTextAttachment

2008-02-26 Thread Sean Willson
i've created a NSTextView and placed one or more NSTextAttachment within it that wrap controls and i'm able to get the behavior of clicking the control etc as i want. however when i place the same NSTextAttachment in a NSTextField via: [textField setAttributedS