Important: The information in this document is obsolete and should not be used for new development.
A method identified as deprecated has been superseded and may become unsupported in the future.
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
+ (id)sharedInstance
Returns a shared instance of an NSSimpleHorizontalTypesetter
.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (NSTypesetterGlyphInfo *)baseOfTypesetterGlyphInfo
Returns the array of glyph info for the current line fragment. Because the size of the NSTypesetterGlyphInfo data structure could change in the future, you must not access the array elements directly. Instead, use NSGlyphInfoAtIndex
to obtain a pointer to the glyph information at a specific index.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)breakLineAtIndex:(unsigned)location
Called from layoutGlyphsInHorizontalLineFragment:baseline:
, this method breaks the current line fragment at the specified location by setting the current glyph to the first glyph that should appear on the next line.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (unsigned)capacityOfTypesetterGlyphInfo
Returns the number of elements that the glyph information cache can hold.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)clearAttributesCache
Empties the attributes cache.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)clearGlyphCache
Empties the glyph cache.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (NSTextContainer *)currentContainer
Returns the container of the text currently being typeset.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (NSLayoutManager *)currentLayoutManager
Returns the layout manager of the text currently being typeset.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (NSParagraphStyle *)currentParagraphStyle
Returns the paragraph style of the text currently being typeset.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (NSTextStorage *)currentTextStorage
Returns the text storage of the text currently being typeset.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)fillAttributesCache
Loads the attributes caches with attributes (such as font name) for the current text attributes.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (unsigned)firstGlyphIndexOfCurrentLineFragment
Returns the first glyph index of the current line fragment.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)fullJustifyLineAtGlyphIndex:(unsigned)glyphIndexForLineBreak
Given the glyph index glyphIndexForLineBreak at which the line is broken, fully justifies the line. Called by glyphIndexToBreakLineByWordWrappingAtIndex:
when the current text alignment is NSJustifiedTextAlignment
.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (unsigned)glyphIndexToBreakLineByHyphenatingWordAtIndex:(unsigned)charIndex
Returns the glyph index at which the line should be broken when a word is hyphenated at charIndex. Called by glyphIndexToBreakLineByWordWrappingAtIndex:
.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (unsigned)glyphIndexToBreakLineByWordWrappingAtIndex:(unsigned)charIndex
Returns the glyph index at which the line should be broken at charIndex. Called from breakLineAtIndex:
when the line break style of the current paragraph style is set to NSLineBreakByWordWrapping
.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (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.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)insertGlyph:(NSGlyph)glyph atGlyphIndex:(unsigned)glyphIndex characterIndex:(unsigned)charIndex
Allows the typesetter to insert a new glyphs into the stream. Inserts glyph into the glyph cache at glyphIndex and maps it to the character at charIndex. The standard typesetter only uses this method for inserting hyphenation glyphs. Because this method keeps the glyph caches in sync, subclasses should always use this method to insert glyphs instead of calling currentLayoutManager
directly.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (NSLayoutStatus)layoutControlGlyphForLineFragment:(NSRect)lineFrag
Performs line layout for control characters in lineFrag, which include text attachments, tabs, and returns. Called from layoutGlyphsInHorizontalLineFragment:baseline:
.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (NSLayoutStatus)layoutGlyphsInHorizontalLineFragment:(NSRect *)lineFragmentRect baseline:(float *)baseline
Lays out a single line horizontally. Called from layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:
to perform the core line layout. lineFragmentRect is a rectangle specifying the location and maximum possible size of the line fragment. baseline specifies the baseline of the text; if it contains the value NSBaselineNotSet
, this method will determine the baseline itself. baseline may not be NULL
. Returns a layout status value indicating the current state of the layout. See “Constants” for the possible return values.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)layoutGlyphsInLayoutManager:(NSLayoutManager *)layoutManager startingAtGlyphIndex:(unsigned)startGlyphIndex maxNumberOfLineFragments:(unsigned)maxNumLines nextGlyphIndex:(unsigned *)nextGlyph
Lays out glyphs in layoutManager starting at startGlyphIndex. maxNumLines are generated as long as the NSGlyphStorage doesn’t run out of glyphs. nextGlyph will be set to the index of the next glyph that needs to be laid out. Calls layoutGlyphsInHorizontalLineFragment:baseline:
once for each line to perform the actual line layout.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)layoutTab
Called within layoutControlGlyphForLineFragment:
to lay out a tab character. This method sets the extent of the current glyph to the left side of the tab stop and sets the current glyph offset to the position of the tab stop represented by this character.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (unsigned)sizeOfTypesetterGlyphInfo
Returns the size of the NSTypesetterGlyphInfo data structure.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)typesetterLaidOneGlyph:(NSTypesetterGlyphInfo *)glyph
Subclasses of NSSimpleHorizontalTypesetter can optionally implement this method. layoutGlyphsInHorizontalLineFragment:baseline:
calls this method (if it exists) after laying out a glyph, allowing a subclass to hook into the layout machinery directly.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)updateCurGlyphOffset
Updates the location where the current glyph should be laid out. Note that this value is computed only when it’s needed; this routine will compute it if necessary.
NSSimpleHorizontalTypesetter.h
This method has been deprecated. (Deprecated in Mac OS X v10.4.)
- (void)willSetLineFragmentRect:(NSRect *)aRect forGlyphRange:(NSRange)aRange usedRect:(NSRect *)bRect
Subclasses of NSSimpleHorizontalTypesetter can optionally implement this method. layoutGlyphsInHorizontalLineFragment:baseline:
calls this method (if it exists) after laying out each line fragment, immediately before layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:
calls NSLayoutManager’s setLineFragmentRect:forGlyphRange:usedRect:
method to record the line fragment rectangles. Subclasses can override this method to globally modify attributes such as line spacing within aRange of glyphs. bRect is expected to be smaller than or equal to aRect.
NSSimpleHorizontalTypesetter.h
© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-05-23)