layoutManager(_:boundingBoxForControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)
Returns the bounding rectangle for the specified control glyph with the specified parameters.
Declaration
optional func layoutManager(_ layoutManager: NSLayoutManager, boundingBoxForControlGlyphAt glyphIndex: Int, for textContainer: NSTextContainer, proposedLineFragment proposedRect: CGRect, glyphPosition: CGPoint, characterIndex charIndex: Int) -> CGRectParameters
- layoutManager:
The layout manager doing the layout.
- glyphIndex:
The index of the control glyph in question.
- textContainer:
The text container to use to calculate the position.
- proposedRect:
The proposed line fragment rectangle.
- glyphPosition:
The position of the glyph in
textContainer. - charIndex:
The character index in
textContainer.
Return Value
The bounding rectangle for the specified control glyph with the specified parameters.
Discussion
Sent for resolving the glyph metrics for NSControlCharacterWhitespaceAction control character.
See Also
Handling line fragments
layoutManager(_:shouldBreakLineByHyphenatingBeforeCharacterAt:)layoutManager(_:shouldBreakLineByWordBeforeCharacterAt:)layoutManager(_:lineSpacingAfterGlyphAt:withProposedLineFragmentRect:)layoutManager(_:paragraphSpacingAfterGlyphAt:withProposedLineFragmentRect:)layoutManager(_:paragraphSpacingBeforeGlyphAt:withProposedLineFragmentRect:)layoutManager(_:shouldSetLineFragmentRect:lineFragmentUsedRect:baselineOffset:in:forGlyphRange:)