Adopted by: NSInputManager
Declared in: AppKit/NSInputManager.h
This class specification is incomplete and has not received a technical review. It is included in this release to test the linkage between the application development tools and the on-line documentation. What information it contains should be considered preliminary and subject to change.
The methods of the NSTextInput protocol are implemented by objects-for example, responders-that handle text input. A client object such as a text view ("the client object") that speaks this protocol must be reponsible for the following things:
If this protocol is not implemented by a client object that does have a keyDown: method, then in-line input is not possible for that client object, and will have to be handled externally.
The NSTextInput protocol is implemented by an Input Manager to receive input from the server on behalf of the current client, and otherwise mediate between the client object and the server. It then forwards the corresponding messages to the client, or gets information from the client to pass back to the server, as appropriate.
The message passing between NSApp
,
Input Manager, User Interface object, and Server is all synchronous.
That is, e.g., when the Input Manager sends a message to Server,
any reply comes back and is relayed to the User Interface object
before the original message returns.
A key binding manager splits the stream of keyDown: messages (intercepted by NSResopnder) into commands and text. If there is an Input Manager in the loop, it will further use any of these NSTextInput messages to control the marked region.
- Marking text
- - setMarkedText:selectedRange:
- - getMarkedText:selectedRange:
- - hasMarkedText
- - unmarkText
- Other
- - conversationIdentifier
- - doCommandBySelector:
- - insertText:
- (long)conversationIdentifier
<<more information forthcoming>>
- (void)doCommandBySelector:(SEL)aSelector
<<more information forthcoming>>
See Also: - interpretKeyEvents: (NSResponder)
- (void)getMarkedText:(out
NSString **)aString selectedRange:(out
NSRange *)aRange
- (BOOL)hasMarkedText
<<more information forthcoming>>
- (void)insertText:(NSString
*)aString
<<more information forthcoming>>
See Also: - interpretKeyEvents: (NSResponder)
- (void)setMarkedText:(NSString
*)aString selectedRange:(NSRange)selRange
- (void)unmarkText
<<more information forthcoming>>