Re: How do I soft-wrap text at a specific line length?
Re: How do I soft-wrap text at a specific line length?
- Subject: Re: How do I soft-wrap text at a specific line length?
- From: "Louis C. Sacha" <email@hidden>
- Date: Mon, 16 Feb 2004 12:38:08 -0800
Hello...
You might want to take a look at the documentation for NSTypesetter
and its sublcasses (specifically NSSimpleHorizontalTypesetter and
NSATSTypesetter -- NSATSTypesetter is 10.3 only, but has more
detailed info about subclassing that would probably help even if you
need to subclass NSSimpleHorizontalTypesetter instead to support
10.2). The typesetter is what controls line breaking.
Hope that helps,
Louis
Right, I've tried that, but I can't seem to figure out how many
characters are on the current line from my NSTextContainer
subclass's
lineFragmentRectForProposedRect:sweepDirection:movementDirection:
remainingRect: method, which is were I seem to need to be to change
the wrapping behavior. When I try to ask the layout manager from
that method, about what's presently contained within the current
line fragment, using methods like
glyphRangeForBoundingRect:inTextContainer:, the app crashes.
_______________________________________________
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.