Re: NSLayoutManager subclassing
Re: NSLayoutManager subclassing
- Subject: Re: NSLayoutManager subclassing
- From: "Martin" <email@hidden>
- Date: Thu, 19 Jan 2006 17:22:45 -0800
>> You'll have to make your enclosing view listen for frame changes
>> in the NSTextView (so it can grow or shrink to fit the text view)
>
> Interesting thought. I'd need to subclass NSTypesetter and flip
> the text too, I think.
You won't need to do this. The idea is that the NSTextView works completely as normal. You just position the top of the NSTextView so the bottom of the view always meets the end of the page.
Here is a diagram of what happens. Your custom view takes the space occpied by the "C" marks, and the NSTextView by the "T" marks:
[top]
C
C
C
C T This is the first line of text
[bottom]
If the user enters more text you simply move the top of the NSTextView up a bit:
[top]
C
C
C T This is the first line of text.
C T Here is another line!
[bottom]
~Martin
_______________________________________________
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