Protocol

NSLayoutManagerDelegate

A set of optional methods implemented by delegates of layout manager objects.

Declaration

@protocol NSLayoutManagerDelegate

Topics

Invalidating Glyphs and Layout

- layoutManagerDidInvalidateLayout:

Informs the delegate that the given layout manager has invalidated layout information (not glyph information).

- layoutManager:shouldGenerateGlyphs:properties:characterIndexes:font:forGlyphRange:

Enables customization of the initial glyph generation process.

- layoutManager:shouldUseAction:forControlCharacterAtIndex:

Returns the control character action for the control character at the given character index.

NSControlCharacterAction

Actions caused by control characters.

Responding to Text Container Layout

- layoutManager:didCompleteLayoutForTextContainer:atEnd:

Informs the delegate that the layout manager finished laying out text in the specified text container.

- layoutManager:textContainer:didChangeGeometryFromSize:

Informs the delegate that the layout manager will invalidate layout due to a change in the geometry of the specified text container.

Handling Line Fragments

- layoutManager:shouldBreakLineByHyphenatingBeforeCharacterAtIndex:

Asks the delegate to determine whether to break the line at the specified character.

- layoutManager:shouldBreakLineByWordBeforeCharacterAtIndex:

Asks the delegate to determine whether to break the line at the specified word.

- layoutManager:lineSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:

Returns the amount of space to add to the end of a line.

- layoutManager:paragraphSpacingAfterGlyphAtIndex:withProposedLineFragmentRect:

Returns the amount of space to add at the end of a paragraph.

- layoutManager:paragraphSpacingBeforeGlyphAtIndex:withProposedLineFragmentRect:

Returns the amount of space to add at the beginning of a paragraph.

- layoutManager:boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:

Returns the bounding rectangle for the specified control glyph with the specified parameters.

- layoutManager:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:inTextContainer:forGlyphRange:

Customizes the line fragment geometry before committing it to the layout cache.

Managing Temporary Attribute Support

- layoutManager:shouldUseTemporaryAttributes:forDrawingToScreen:atCharacterIndex:effectiveRange:

Asks the delegate whether to use temporary attributes when drawing the text.

Relationships

Inherits From

See Also

Layout

NSLayoutManager

An object that coordinates the layout and display of text characters.

NSTextLayoutOrientationProvider

A set of methods that define the orientation of text for an object.