Name
NSTextContainer — Mac OS X 10.0
Synopsis
This class is responsible for defining a region in which text will be
laid out. The class NSLayoutManager manages a set
of NSTextContainer objects and controls how text
should fill these text containers. An
NSTextContainer object, in turn, owns an instance
of NSTextView that is responsible for putting the
text up on screen. The default implementation of
NSTextContainer defines a rectangular region of
text; however, subclasses may be implemented to provide irregular
shaped regions for text. 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. For more information on
Cocoa’s text layout engine, see Chapter 5.
|
|
@interface NSTextContainer : NSObject <NSCoding>
|
// Initializers
|
- (id)initWithContainerSize:(NSSize)size; |
// Accessor Methods
|
- (void)setLineFragmentPadding:(float)pad; |
- (float)lineFragmentPadding;
|
- (void)setLayoutManager:(NSLayoutManager *)layoutManager; |
- (NSLayoutManager *)layoutManager;
|
- (void)setHeightTracksTextView:(BOOL)flag; |
- (BOOL)heightTracksTextView;
|
- (void)setWidthTracksTextView:(BOOL)flag; |
- (BOOL)widthTracksTextView;
|
- (void)setTextView:(NSTextView *)textView; |
- (NSTextView *)textView;
|
- (void)setContainerSize:(NSSize)size; |
- (NSSize) ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access