Name

NSLayoutManager — Mac OS X 10.0

Synopsis

NSLayoutManager is responsible for managing how text is laid out. NSLayoutManager objects manage a set of NSTextContainer objects, and supervise how text is laid out in these containers. Additionally, NSLayoutManager is responsible for mapping Unicode character codes into glyphs that will be displayed in an NSTextView object. In terms of the Model-View-Controller design pattern, NSTextStorage is the model, NSTextView the view, and NSLayoutManager and NSTextContainer are controllers between the data layer and the view layer.

image with no caption

@interface NSLayoutManager : NSObject <NSCoding>
                                  // Initializers
   - (id)init;
                                  // Accessor Methods
   - (void)setDelegate:(id)delegate;
   - (id)delegate;
   - (void)setDefaultAttachmentScaling:(NSImageScaling)scaling;
   - (NSImageScaling)defaultAttachmentScaling;
   - (void)setTemporaryAttributes:(NSDictionary *)attrs 
                                 forCharacterRange:(NSRange)charRange;
   - (void)setAttachmentSize:(NSSize)attachmentSize 
                                 forGlyphRange:(NSRange)glyphRange;
   - (void)setNotShownAttribute:(BOOL)flag 
                                 forGlyphAtIndex:(unsigned)glyphIndex;
   - (void)setTypesetter:(NSTypesetter *)typesetter;
   - (NSTypesetter *)typesetter;
   - (void)setLocation:(NSPoint)location 
                                 forStartOfGlyphRange:(NSRange)glyphRange;
   - (void)setCharacterIndex:(unsigned)charIndex 
                                 forGlyphAtIndex:(unsigned)glyphIndex;
   - (void)setBackgroundLayoutEnabled:(BOOL)

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.