Up

# NSTextStorage

### Authors

Richard Frith-Macdonald (`richard@brainstorm.co.uk`)

Copyright: (C) 1999 Free Software Foundation, Inc.

### Contents -

1. Software documentation for the NSTextStorage class
2. Software documentation for the NSObject(NSTextStorageDelegate) informal protocol
3. Software documentation for the NSTextStorage(Scripting) category

# Software documentation for the NSTextStorage class

## NSTextStorage : NSMutableAttributedString

> Declared in:
>   AppKit/NSTextStorage.h

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- -attributeRuns
- -characters
- -font
- -foregroundColor
- -paragraphs
- -setFont:
- -words
- -addLayoutManager:
- -beginEditing
- -changeInLength
- -delegate
- -edited:range:changeInLength:
- -editedMask
- -editedRange
- -endEditing
- -ensureAttributesAreFixedInRange:
- -fixesAttributesLazily
- -invalidateAttributesInRange:
- -layoutManagers
- -processEditing
- -removeLayoutManager:
- -setDelegate:
- -string

### addLayoutManager:

- (void) addLayoutManager: (GSLayoutManager*)obj;
Availability: OpenStep
Description forthcoming.

### beginEditing

- (void) beginEditing;
Availability: OpenStep
Description forthcoming.

### changeInLength

- (NSInteger) changeInLength;
Availability: OpenStep
Description forthcoming.

### delegate

- (id) delegate;
Availability: OpenStep
Returns the value most recently set usiong the -setDelegate: method.

### edited: range: changeInLength:

- (void) edited: (NSTextStorageEditedOptions)mask range: (NSRange)old changeInLength: (NSInteger)delta;
Availability: OpenStep
Description forthcoming.

### editedMask

- (NSTextStorageEditedOptions) editedMask;
Availability: OpenStep
Description forthcoming.

### editedRange

- (NSRange) editedRange;
Availability: OpenStep
Description forthcoming.

### endEditing

- (void) endEditing;
Availability: OpenStep
Description forthcoming.

### ensureAttributesAreFixedInRange:

- (void) ensureAttributesAreFixedInRange: (NSRange)range;
Availability: MacOS-X 10.0.0
Description forthcoming.

### fixesAttributesLazily

- (BOOL) fixesAttributesLazily;
Availability: MacOS-X 10.0.0
Description forthcoming.

### invalidateAttributesInRange:

- (void) invalidateAttributesInRange: (NSRange)range;
Availability: MacOS-X 10.0.0
Description forthcoming.

### layoutManagers

- (NSArray*) layoutManagers;
Availability: OpenStep
Description forthcoming.

### processEditing

- (void) processEditing;
Availability: OpenStep
Description forthcoming.

### removeLayoutManager:

- (void) removeLayoutManager: (GSLayoutManager*)obj;
Availability: OpenStep
Description forthcoming.

### setDelegate:

- (void) setDelegate: (id)delegate;
Availability: OpenStep
Set the delegate (adds it as an observer for text storage notifications) and removes any old value (removes it as an observer).
The delegate is not retained.

### string

- (NSString*) string;
Availability: OpenStep
Returns the string data stored by the receiver.
For performance reasons (and OSX compatibility) this is actually a proxy to the internal representation of the string.
This proxy provides an immutable string interface, but you must be aware that the underlying information may be modified by the receiver at any point, so if you need a consistent/fixed snapshot of the data (or if you are going to pass the string to other code which expects to be working with a constant string), you should copy the object returned by this method rather than simply retaining it.

## Instance Variables for NSTextStorage Class

### _delegate

@protected id _delegate;
Availability: OpenStep
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _editCount

@protected NSUInteger _editCount;
Availability: OpenStep
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _editedDelta

@protected NSInteger _editedDelta;
Availability: OpenStep
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _editedMask

@protected NSTextStorageEditedOptions _editedMask;
Availability: OpenStep
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _editedRange

@protected NSRange _editedRange;
Availability: OpenStep
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _layoutManagers

@protected NSMutableArray* _layoutManagers;
Availability: OpenStep
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

# Software documentation for the NSObject(NSTextStorageDelegate) informal protocol

## NSObject(NSTextStorageDelegate)

> Declared in:
>   AppKit/NSTextStorage.h

Availability: OpenStep
Description forthcoming.
Method summary

- -textStorageDidProcessEditing:
- -textStorageWillProcessEditing:

### textStorageDidProcessEditing:

- (void) textStorageDidProcessEditing: (NSNotification*)notification;
Availability: OpenStep
Description forthcoming.

### textStorageWillProcessEditing:

- (void) textStorageWillProcessEditing: (NSNotification*)notification;
Availability: OpenStep
Description forthcoming.

# Software documentation for the NSTextStorage(Scripting) category

## NSTextStorage(Scripting)

> Declared in:
>   AppKit/NSTextStorage.h

Availability: OpenStep
Description forthcoming.
Method summary

- -attributeRuns
- -characters
- -font
- -foregroundColor
- -paragraphs
- -setFont:
- -words

### attributeRuns

- (NSArray*) attributeRuns;
Availability: OpenStep
Description forthcoming.

### characters

- (NSArray*) characters;
Availability: OpenStep
Description forthcoming.

### font

- (NSFont*) font;
Availability: OpenStep
Description forthcoming.

### foregroundColor

- (NSColor*) foregroundColor;
Availability: OpenStep
Description forthcoming.

### paragraphs

- (NSArray*) paragraphs;
Availability: OpenStep
Description forthcoming.

### setFont:

- (void) setFont: (NSFont*)font;
Availability: OpenStep
Description forthcoming.

### words

- (NSArray*) words;
Availability: OpenStep
Description forthcoming.

Up