Re: Custom Objects in an NSTextView
Re: Custom Objects in an NSTextView
- Subject: Re: Custom Objects in an NSTextView
- From: Aki Inoue <email@hidden>
- Date: Wed, 4 Jan 2006 11:08:27 -0800
I've always wondered though how it would be possible to use an
NSTextAttachmentCell to define a non-rectangular area. As far as I
can tell, only NSTextContainer allows this.
Hmm, I think Manfred was asking for inline objects embedded in text,
it's different from layout objects surrounded by text.
As for using a custom NSTextContainer to handle more than one
custom layout object, that would also be difficult, no? The text
container would need to grab the attributed string, look for custom
attachments, determine their position in the text view taking into
account the view's size, and then handle the containsPoint: method.
Usually this kind of layout objects are defined by a protocol above
attributed text. You have to create your own data model describing
how layout objects are placed in the page and interact each other.
The model in turn can use the Text System object such as
NSTextContainer to achieve the desired rendering.
Hmm, good to know that the layout manager can coordinate multiple
containers and view. The TextSizing example in the Developer folder
demonstrates this, right?
Yes.
Aki
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden