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

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)

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