Name
NSTextStorage — Mac OS X 10.0
Synopsis
This subclass of NSMutableAttributedString
is the
data model for Cocoa’s text-handling system.
NSTextStorage
manages one or more
NSLayoutManager
s, which are responsible for
determining how the text should be displayed. Two additional classes
have an equally important role in the text-handling system, as does
NSTextStorage
: NSTextContainer
and NSTextView
. In terms of the
Model-View-Controller pattern, NSTextStorage
is
the model, NSTextView
is the view, and
NSLayoutManager
and
NSTextContainer
serve as controllers between the
data layer and the view layer.
|
@interface NSTextStorage : NSMutableAttributedString
|
// Accessor Methods
|
- (void)setParagraphs:(NSArray *)paragraphs; |
- (NSArray *)paragraphs;
|
- (void)setForegroundColor:(NSColor *)color; |
- (NSColor *)foregroundColor;
|
- (void)setCharacters:(NSArray *)characters; |
- (NSArray *)characters;
|
- (void)setAttributeRuns:(NSArray *)attributeRuns; |
- (NSArray *)attributeRuns;
|
- (void)setDelegate:(id)delegate; |
- (id)delegate;
|
- (void)setWords:(NSArray *)words; |
- (NSArray *)words;
|
- (void)setFont:(NSFont *)font; |
- (NSFont *)font;
|
// Instance Methods
|
- (void)addLayoutManager:(NSLayoutManager *)obj; |
- (int)changeInLength;
|
- (void)edited:(unsigned)editedMask range:(NSRange)range changeInLength:(int)delta; |
- (unsigned)editedMask;
|
- (NSRange)editedRange;
|
- (void) ... |
Get Cocoa in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.