O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSSimpleHorizontalTypesetter — Mac OS X 10.0

Synopsis

This concrete subclass of NSTypesetter supports left-to-right line layout. This class handles such things as hyphenation, word wrapping, and line-breaking. For more information about Cocoa’s text layout engine, see Chapter 5.

image with no caption

@interface NSSimpleHorizontalTypesetter : NSTypesetter
                                  // Class Methods
   + (id)sharedInstance;
                                  // Instance Methods
   - (void)willSetLineFragmentRect:(NSRect *)aRect 
                                 forGlyphRange:(NSRange)aRange 
                                 usedRect:(NSRect *)bRect;
   - (NSTypesetterGlyphInfo *)baseOfTypesetterGlyphInfo;
   - (void)breakLineAtIndex:(unsigned)location;
   - (unsigned)capacityOfTypesetterGlyphInfo;
   - (void)clearAttributesCache;
   - (void)clearGlyphCache;
   - (NSTextContainer *)currentContainer;
   - (NSLayoutManager *)currentLayoutManager;
   - (NSParagraphStyle *)currentParagraphStyle;
   - (NSTextStorage *)currentTextStorage;
   - (void)fillAttributesCache;
   - (unsigned)firstGlyphIndexOfCurrentLineFragment;
   - (void)fullJustifyLineAtGlyphIndex:(unsigned)glyphIndexForLineBreak;
   - (unsigned)glyphIndexToBreakLineByHyphenatingWordAtIndex:(unsigned)charIndex;
   - (unsigned)glyphIndexToBreakLineByWordWrappingAtIndex:(unsigned)charIndex;
   - (unsigned)growGlyphCaches:(unsigned)desiredCapacity 
                                 fillGlyphInfo:(BOOL)fillGlyphInfo;
   - (void)insertGlyph:(NSGlyph)glyph 
                                 atGlyphIndex:(unsigned)glyphIndex 
                                 characterIndex:(unsigned)charIndex ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required