NSLayoutManager and widows and orphans
NSLayoutManager and widows and orphans
- Subject: NSLayoutManager and widows and orphans
- From: Keith Blount <email@hidden>
- Date: Mon, 19 Mar 2007 09:55:11 -0700 (PDT)
Hello,
A search in the archives has revealed that this question has gone unanswered before, but it cant hurt to ask anyway:
My program has a text printing view that is very much like TextEdit's MultiplePageView (in fact, it is based on that code, although my version is a little simpler because it is only used for printing and not for viewing text). A couple of users have requested that printing in my application deal with widows and orphans. Does anybody have any idea how you might enhance TextEdit's MultiplePageView to handle widows and orphans? Presumably this would be handled in NSLayoutManager delegate methods, although - despite the fact that I am fairly familiar with the Cocoa text system and have subclassed it a lot for my app - I am not quite sure where to start.
I imagine I would need to use:
- (void)layoutManager:(NSLayoutManager *)lm didCompleteLayoutForTextContainer:(NSTextContainer *)textContainer atEnd:(BOOL)layoutFinishedFlag
and analyse the text at the end of the given textContainer. But how, and then what?
If anyone has got any ideas, suggestions, or pointers to examples out there that already do this, I would be very grateful.
Thanks in advance and all the best,
Keith
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden