Developer Documentation
PATH  Mac OS X Documentation > Application Kit Reference: Objective-C

Table of Contents

NSSimpleHorizontalTypesetter


Inherits from:
NSTypesetter : NSObject
Conforms to:
NSObject
(NSObject)
Declared in:
AppKit/NSTypesetter.h




Class Description


This class does simple left-to-right typesetting with some support for non-spacing marks.




Constants


These constants are provided as a convenience by NSSimpleHorizontalTypesetter


Constant Description
NSLayoutNotDone Description forthcoming.
NSLayoutDone Description forthcoming.
NSLayoutCantFit Description forthcoming.
NSLayoutOutOfGlyphs Description forthcoming.

These modes determine how to lay a glyph out in relation to a previous glyph.


Constant Description
NSGlyphLayoutAtAPoint Description forthcoming.
NSGlyphLayoutAgainstAPoint Description forthcoming.
NSGlyphLayoutWithPrevious Description forthcoming.

These specify layout direction.


Constant Description
NSLayoutLeftToRight Description forthcoming.
NSLayoutRightToLeft Description forthcoming.



Method Types


Getting a typesetter
+ sharedInstance
Getting global information about a typesetter
- baseOfTypesetterGlyphInfo
- capacityOfTypesetterGlyphInfo
- currentContainer
- currentLayoutManager
- currentParagraphStyle
- currentTextStorage
- firstIndexOfCurrentLineFragment
- sizeOfTypesetterGlyphInfo
Laying out glyphs
- breakLineAtIndex:
- fullJustifyLineAtGlyphIndex:
- glyphIndexToBreakLineByHypenatingWordAtIndex:
- glyphIndexToBreakLineByWrappingAtIndex:
- insertGlyph:atGlyphIndex:characterIndex:
- layoutControlGlyphForLineFragment:
- layoutGlyphsInHorizontalLineFragment:baseline:
- layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:
- layoutTab
- typesetterLaidOneGlyph:
- updateCurGlyphOffset
- willSetLineFragmentRect:forGlyphRange:usedRect:
Glyph caching
- clearAttributesCache
- clearGlyphCache
- fillAttributesCache
- growGlyphCaches:fillGlyphInfo:


Class Methods



sharedInstance

+ (id)sharedInstance

Description forthcoming.


Instance Methods



baseOfTypesetterGlyphInfo

- (NSTypesetterGlyphInfo *)baseOfTypesetterGlyphInfo

Description forthcoming.

breakLineAtIndex:

- (void)breakLineAtIndex:(unsigned)location

Description forthcoming.

capacityOfTypesetterGlyphInfo

- (unsigned)capacityOfTypesetterGlyphInfo

Description forthcoming.

clearAttributesCache

- (void)clearAttributesCache

Description forthcoming.

clearGlyphCache

- (void)clearGlyphCache

Description forthcoming.

currentContainer

- (NSTextContainer *)currentContainer

Description forthcoming.

currentLayoutManager

- (NSLayoutManager *)currentLayoutManager

Description forthcoming.

currentParagraphStyle

- (NSParagraphStyle *)currentParagraphStyle

Description forthcoming.

currentTextStorage

- (NSTextStorage *)currentTextStorage

Description forthcoming.

fillAttributesCache

- (void)fillAttributesCache

Description forthcoming.

firstIndexOfCurrentLineFragment

- (unsigned)firstGlyphIndexOfCurrentLineFragment

Description forthcoming.

fullJustifyLineAtGlyphIndex:

- (void)fullJustifyLineAtGlyphIndex:(unsigned)glyphIndexForLineBreak

Description forthcoming.

growGlyphCaches:fillGlyphInfo:

- (unsigned)growGlyphCaches:(unsigned)desiredCapacity fillGlyphInfo:(BOOL)fillGlyphInfo

Grows glyph-related caches to have at least the desiredCapacity. If fillGlyphInfo is YES, also fills with glyph information from the layout manager and updates firstInvalidGlyphIndex. Returns the number of glyphs received.

insertGlyph:atGlyphIndex:characterIndex:

- (void)insertGlyph:(NSGlyph)glyph atGlyphIndex:(unsigned)glyphIndex characterIndex:(unsigned)charIndex

Description forthcoming. Only used for inserting hyphenation glyphs; never call currentLayoutManager directly to insert glyphs; go through this method.

glyphIndexToBreakLineByHypenatingWordAtIndex:

- (unsigned)glyphIndexToBreakLineByHyphenatingWordAtIndex:(unsigned)charIndex

Description forthcoming.

glyphIndexToBreakLineByWrappingAtIndex:

- (unsigned)glyphIndexToBreakLineByWordWrappingAtIndex:(unsigned)charIndex

Description forthcoming.

layoutControlGlyphForLineFragment:

- (NSLayoutStatus)layoutControlGlyphForLineFragment:(NSRect)lineFrag

Description forthcoming.

layoutGlyphsInHorizontalLineFragment:baseline:

- (NSLayoutStatus)layoutGlyphsInHorizontalLineFragment:(NSRect *)lineFragmentRect baseline:(float *)baseline

Description forthcoming.

layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:

- (void)layoutGlyphsInLayoutManager:(NSLayoutManager *)layoutManager startingAtGlyphIndex:(unsigned)startGlyphIndex maxNumberOfLineFragments:(unsigned)maxNumLines nextGlyphIndex:(unsigned *)nextGlyph

Description forthcoming.

layoutTab

- (void)layoutTab

Description forthcoming.

sizeOfTypesetterGlyphInfo

- (unsigned)sizeOfTypesetterGlyphInfo

Description forthcoming.

typesetterLaidOneGlyph:

- (void)typesetterLaidOneGlyph:(NSTypesetterGlyphInfo *)gl

Description forthcoming. This method can optionally be implemented by a subclass. If implemented, this is called within layoutGlyphsInHorizontalLineFragment:baseline: after laying out each glyph, allowing a subclass to hook into the layout machinery directly.

updateCurGlyphOffset

- (void)updateCurGlyphOffset

Updates the location where the current glyph should be laid out. Often this isn't computed as it's not needed; however, this routine will bring it up-to-date if necessary.

willSetLineFragmentRect:forGlyphRange:usedRect:

- (void)willSetLineFragmentRect:(NSRect *)aRect forGlyphRange:(NSRange)aRange usedRect:(NSRect *)bRect

Description forthcoming. This method can optionally be implemented by a subclass. If implemented by subclasses, this is called within layoutGlyphsInHorizontalLineFragment:baseline: after laying out each line fragment, immediately before setLineFragmentRect:forGlyphRange:usedRect: in NSLayoutManager is called to record the used line fragment rectangles. This is intended for subclasses to be able to affect e.g., linespacing globally. bRect is expected to be smaller than or equal to aRect.


Table of Contents