• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I soft-wrap text at a specific line length?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >How do I soft-wrap text at a specific line length? (From: Chris Kenny <email@hidden>)
 >Re: How do I soft-wrap text at a specific line length? (From: Allan Odgaard <email@hidden>)
 >Re: How do I soft-wrap text at a specific line length? (From: Chris Kenny <email@hidden>)

  • Prev by Date: Re: Slow Cocoa
  • Next by Date: Re: Cant't use UTF-8 source files. False string interpretation.
  • Previous by thread: Re: How do I soft-wrap text at a specific line length?
  • Next by thread: Re: How do I soft-wrap text at a specific line length?
  • Index(es):
    • Date
    • Thread