LayoutManager
class LayoutManager: NSLayoutManager, NSLayoutManagerDelegate
The layout manager for the editor
-
The current font
Declaration
Swift
var font: NSFont -
The line height of the current font
Declaration
Swift
var fontLineHeight: CGFloat -
The line height
Declaration
Swift
var lineHeight: CGFloat -
The nudge of the base line
Declaration
Swift
var baselineNudge: CGFloat -
Takes care only of the last empty newline in the text backing store, or totally empty text views.
Declaration
Swift
override func setExtraLineFragmentRect( _ fragmentRect: NSRect, usedRect: NSRect, textContainer container: NSTextContainer )
-
Customise the line fragment geometry before committing to the layout cache
Declaration
Swift
func layoutManager( _ layoutManager: NSLayoutManager, shouldSetLineFragmentRect lineFragmentRect: UnsafeMutablePointer<NSRect>, lineFragmentUsedRect: UnsafeMutablePointer<NSRect>, baselineOffset: UnsafeMutablePointer<CGFloat>, in textContainer: NSTextContainer, forGlyphRange glyphRange: NSRange ) -> BoolParameters
layoutManagerThe current layout manager
lineFragmentRectThe rect of the line fragment
lineFragmentUsedRectThe used rect of the line fragment
baselineOffsetThe offset from the base line
textContainerThe current text container
glyphRangeThe current glyp range
Return Value
True
View on GitHub