Name

NSTextView — Mac OS X 10.0

Synopsis

This class is the frontend class to Cocoa’s text-manipulation architecture. For most purposes, programmers can use this class to interface with the text system; however, if more control is desired, than they may work with the individual component classes of the text system, which are NSTextStorage, NSTextContainer, NSLayoutManager, and this class. In terms of the Model-View-Controller pattern, NSTextStorage is the model, NSTextView is the view, and NSLayoutManager and NSTextContainer serve as controllers for the data layer and the view layer.

image with no caption

@interface NSTextView : NSText <NSTextInput>
                                  // Initializers
   - (id)initWithFrame:(NSRect)frameRect;
   - (id)initWithFrame:(NSRect)frameRect 
                                 textContainer:(NSTextContainer *)container;
                                  // Accessor Methods
   - (void)setImportsGraphics:(BOOL)flag;
   - (BOOL)importsGraphics;
   - (void)setBackgroundColor:(NSColor *)color;
   - (NSColor *)backgroundColor;
   - (void)setAcceptsGlyphInfo:(BOOL)flag;
   - (BOOL)acceptsGlyphInfo;
   - (void)setSelectable:(BOOL)flag;
   - (void)setUsesRuler:(BOOL)flag;
   - (BOOL)usesRuler;
   - (void)setRulerVisible:(BOOL)flag;
   - (void)setRichText:(BOOL)flag;
   - (void)setTypingAttributes:(NSDictionary *)attrs;
   - (NSDictionary *)typingAttributes;
   - (void)setMarkedTextAttributes:(NSDictionary *)attributeDictionary;
   - (NSDictionary *)markedTextAttributes;
   - (void)setAlignment ...

Get Cocoa in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.