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

NSTextInput — Mac OS X 10.0

Synopsis

This protocol declares the methods that text view classes should implement to interface with Cocoa’s input management system. In the Application Kit, NSText and NSTextView implement the methods of this protocol.

@protocol NSTextInput
                                  // Instance Methods
   - (void)insertText:(id)aString;
   - (void)doCommandBySelector:(SEL)aSelector;
   - (void)setMarkedText:(id)aString 
                                 selectedRange:(NSRange)selRange;
   - (void)unmarkText;
   - (BOOL)hasMarkedText;
   - (long)conversationIdentifier;
   - (NSAttributedString *)attributedSubstringFromRange:(NSRange)theRange;
   - (NSRange)markedRange;
   - (NSRange)selectedRange;
   - (NSRect)firstRectForCharacterRange:(NSRange)theRange;
   - (unsigned int)characterIndexForPoint:(NSPoint)thePoint;
   - (NSArray*)validAttributesForMarkedText;
@end

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