NSTextInputClient
A set of methods that text views need to implement to interact properly with the text input management system.
Declaration
protocol NSTextInputClient : NSObjectProtocolMentioned in
Overview
To create another text view class, you can either subclass NSTextView, or subclass NSView and implement the NSTextInputClient protocol.
Topics
Handling marked text
hasMarkedText()markedRange()selectedRange()setMarkedText(_:selectedRange:replacementRange:)unmarkText()validAttributesForMarkedText()
Storing text
Getting character coordinates
characterIndex(for:)firstRect(forCharacterRange:actualRange:)baselineDeltaForCharacter(at:)drawsVerticallyForCharacter(at:)fractionOfDistanceThroughGlyph(for:)