Re: NSLayoutManager question
Re: NSLayoutManager question
- Subject: Re: NSLayoutManager question
- From: Greg Titus <email@hidden>
- Date: Tue, 4 Feb 2003 09:36:54 -0800
On Tuesday, February 4, 2003, at 07:26 AM, Koen van der Drift wrote:
At 4:11 PM -0600 2/3/03, Brian Webster wrote:
NSTextContainer would be better suited to doing this than
NSLayoutManager. If you write your own subclass of NSTextContainer,
you can use it to define what regions of a text view you want text to
flow into. So, your subclass would only allow ten characters at a
time to be laid out, putting a gap in between each line fragment.
Take a look at the "Text System Storage Layer" programming topic in
the Cocoa docs for more info on how to write an NSTextContainer
subclass.
I looked all over those docs I couldn't find any info on how to change
the size of the container, except for setContainerSize, but as far as
I can tell, that only sets the size of the bounding rectangle. How can
I make a textcontainer with gaps?
You would need to write your own subclass of NSTextContainer which
implemented
- isSimpleRectangularTextContainer
to return NO
and
-
lineFragmentRectForProposedRect:sweepDirection:movementDirection:remaini
ngRect:
to implement your gaps.
Hope this helps,
- Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.