O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSInputManager — Mac OS X 10.0

Synopsis

This class is a key component of Cocoa’s text input system, which also consists of the classes NSInputServer and NSTextView. This class sits between NSInputServer and NSTextView. Applications don’t need to interact with this class directly, unless they are implementing a custom text input and management system.

image with no caption

@interface NSInputManager : NSObject <NSTextInput>
                                  // Class Methods
   + (NSInputManager *)currentInputManager;
   + (void)cycleToNextInputLanguage:(id)sender;
   + (void)cycleToNextInputServerInLanguage:(id)sender;
                                  // Instance Methods
   - (BOOL)handleMouseEvent:(NSEvent*)theMouseEvent;
   - (NSImage *)image;
   - (NSInputManager *)initWithName:(NSString *)inputServerName 
                                 host:(NSString *)hostName;
   - (NSString*)language;
   - (NSString *)localizedInputManagerName;
   - (void)markedTextAbandoned:(id)cli;
   - (void)markedTextSelectionChanged:(NSRange)newSel 
                                 client:(id)cli;
   - (NSInputServer*)server;
   - (BOOL)wantsToDelayTextChangeNotifications;
   - (BOOL)wantsToHandleMouseEvents;
   - (BOOL)wantsToInterpretAllKeystrokes;
                                  // Methods Implementing NSTextInput
   - (void)insertText:(id)aString;
   - (void)doCommandBySelector:(SEL)aSelector;
   - (void)setMarkedText:(id)aString 
                                 selectedRange:(NSRange)selRange;
   - (void)unmarkText;
   - (BOOL)hasMarkedText;
   - (long)conversationIdentifier;
   - (NSAttributedString *)attributedSubstringFromRange ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required