API  1.0.0
CPTextStorage Class Reference

#import <CPTextStorage.h>

+ Inheritance diagram for CPTextStorage:

Instance Methods

(id< CPTextStorageDelegate > _delegate) - accessors
 
(void) - addAttributes:range:
 
(void) - addLayoutManager:
 
(CPAttributedString- attributedSubstringFromRange:
 
(void) - beginEditing
 
(int) - changeInLength
 
(void) - deleteCharactersInRange:
 
(void) - edited:range:changeInLength:
 
(unsigned) - editedMask
 
(CPRange) - editedRange
 
(void) - encodeWithCoder:
 
(void) - endEditing
 
(CPFont- font
 
(CPColor- foregroundColor
 
(id) - init
 
(id) - initWithCoder:
 
(id) - initWithString:
 
(id) - initWithString:attributes:
 
(void) - invalidateAttributesInRange:
 
(CPMutableArray- layoutManagers
 
(void) - processEditing
 
(void) - removeAttribute:range:
 
(void) - removeLayoutManager:
 
(void) - replaceCharactersInRange:withAttributedString:
 
(void) - replaceCharactersInRange:withString:
 
(void) - setChangeInLength:
 
(void) - setDelegate:
 
(void) - setEditedMask:
 
(void) - setFont:
 
(void) - setForegroundColor:
 
- Instance Methods inherited from CPAttributedString
(void) - addAttribute:value:range:
 
(void) - appendAttributedString:
 
(id) - attribute:atIndex:effectiveRange:
 
(id) - attribute:atIndex:longestEffectiveRange:inRange:
 
(CPDictionary- attributesAtIndex:effectiveRange:
 
(CPDictionary- attributesAtIndex:longestEffectiveRange:inRange:
 
(id) - initWithAttributedString:
 
(void) - insertAttributedString:atIndex:
 
(BOOL) - isEqual:
 
(BOOL) - isEqualToAttributedString:
 
(unsigned) - length
 
(CPString- mutableString
 
(void) - setAttributedString:
 
(void) - setAttributes:range:
 
(CPString- string
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Additional Inherited Members

- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

Definition at line 2 of file CPTextStorage.h.

Method Documentation

◆ accessors()

- (id< CPTextStorageDelegate > _delegate) accessors (property)  = delegate
implementation

◆ addAttributes:range:()

- (void) addAttributes: (CPDictionary aDictionary
range: (CPRange)  aRange 
implementation

Add a collection of attributes to the specified character range.

Note
Attributes currently associated with the characters in the range are untouched. To remove all previous attributes when adding use -setAttributes:range:.
Parameters
aDictionarya CPDictionary of attributes (names and values) to add.
aRangea CPRange indicating the range of characters to add the attributes to.

Reimplemented from CPAttributedString.

Definition at line 214 of file CPTextStorage.j.

◆ addLayoutManager:()

- (void) addLayoutManager: (CPLayoutManager aManager
implementation

Definition at line 116 of file CPTextStorage.j.

◆ attributedSubstringFromRange:()

- (CPAttributedString) attributedSubstringFromRange: (CPRange)  aRange
implementation

Extracts a substring from the receiver, both characters and attributes, within the range given by aRange.

Parameters
aRangethe range of the substring to extract.
Returns
a CPAttributedString containing the desired substring.
Exceptions
CPRangeExceptionif the range lies outside the receiver's bounds.

Reimplemented from CPAttributedString.

Definition at line 246 of file CPTextStorage.j.

◆ beginEditing()

- (void) beginEditing
implementation

This function is deliberately empty. It is provided to ease code converting from Cocoa.

Reimplemented from CPAttributedString.

Definition at line 165 of file CPTextStorage.j.

◆ changeInLength()

- (int) changeInLength
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 352 of file CPTextStorage.j.

◆ deleteCharactersInRange:()

- (void) deleteCharactersInRange: (CPRange)  aRange
implementation

Deletes a range of characters and their associated attributes.

Parameters
aRangea CPRange indicating the range of characters to delete.

Reimplemented from CPAttributedString.

Definition at line 222 of file CPTextStorage.j.

◆ edited:range:changeInLength:()

- (void) edited: (unsigned)  editedMask
range: (CPRange)  aRange
changeInLength: (int)  lengthChange 
implementation

Definition at line 181 of file CPTextStorage.j.

◆ editedMask()

- (unsigned) editedMask
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 368 of file CPTextStorage.j.

◆ editedRange()

- (CPRange) editedRange
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 344 of file CPTextStorage.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPAttributedString.

Provided by category CPTextStorage(CPCoding).

Definition at line 292 of file CPTextStorage.j.

◆ endEditing()

- (void) endEditing
implementation

This function is deliberately empty. It is provided to ease code converting from Cocoa.

Reimplemented from CPAttributedString.

Definition at line 173 of file CPTextStorage.j.

◆ font()

- (CPFont) font
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 320 of file CPTextStorage.j.

◆ foregroundColor()

- (CPColor) foregroundColor
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 304 of file CPTextStorage.j.

◆ init()

- (id) init
implementation

Creates an empty attributed string.

Returns
a new empty CPAttributedString.

Reimplemented from CPAttributedString.

Definition at line 85 of file CPTextStorage.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Reimplemented from CPAttributedString.

Provided by category CPTextStorage(CPCoding).

Definition at line 280 of file CPTextStorage.j.

◆ initWithString:()

- (id) initWithString: (CPString aString
implementation

Creates a new attributed string from a character string.

Parameters
aStringis the string to initialise from.
Returns
a new CPAttributedString containing the string aString.

Reimplemented from CPAttributedString.

Definition at line 80 of file CPTextStorage.j.

◆ initWithString:attributes:()

- (id) initWithString: (CPString aString
attributes: (CPDictionary attributes 
implementation

Creates a new attributed string from a character string and the specified dictionary of attributes.

Parameters
aStringis the attributed string to initialise from.
attributesis a dictionary of string attributes.
Returns
a new CPAttributedString containing the string aString with associated attributes, attributes.

Reimplemented from CPAttributedString.

Definition at line 65 of file CPTextStorage.j.

◆ invalidateAttributesInRange:()

- (void) invalidateAttributesInRange: (CPRange)  aRange
implementation

Definition at line 134 of file CPTextStorage.j.

◆ layoutManagers()

- (CPMutableArray) layoutManagers
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 336 of file CPTextStorage.j.

◆ processEditing()

- (void) processEditing
implementation

Definition at line 143 of file CPTextStorage.j.

◆ removeAttribute:range:()

- (void) removeAttribute: (CPString anAttribute
range: (CPRange)  aRange 
implementation

Remove a named attribute from a character range.

Parameters
anAttributea CPString specifying the name of the attribute.
aRangea CPRange indicating the range of character from which the attribute will be removed.

Reimplemented from CPAttributedString.

Definition at line 206 of file CPTextStorage.j.

◆ removeLayoutManager:()

- (void) removeLayoutManager: (CPLayoutManager aManager
implementation

Definition at line 125 of file CPTextStorage.j.

◆ replaceCharactersInRange:withAttributedString:()

- (void) replaceCharactersInRange: (CPRange)  aRange
withAttributedString: (CPAttributedString aString 
implementation

Replaces characters and attributes in the range aRange with those of the given attributed string, aString.

Parameters
aRangea CPRange object specifying the range of characters and attributes in the object to replace.
aStringa CPAttributedString containing the data to be used for replacement.

Reimplemented from CPAttributedString.

Definition at line 238 of file CPTextStorage.j.

◆ replaceCharactersInRange:withString:()

- (void) replaceCharactersInRange: (CPRange)  aRange
withString: (CPString aString 
implementation

Replaces the characters in the receiver with those of the specified string over the range, aRange. If the range has a length of 0 then the specified string is inserted at the range location. The new characters inherit the attributes of the first character in the range that they replace or in the case if a 0 range length, the first character before of after the insert (after if the insert is at location 0).

Note
the replacement string need not be the same length as the range being replaced. The full aString is inserted and thus the receiver's length changes to match this
Parameters
aRangethe range of characters to replace.
aStringthe string to replace the specified characters in the receiver.

Reimplemented from CPAttributedString.

Definition at line 230 of file CPTextStorage.j.

◆ setChangeInLength:()

- (void) setChangeInLength: (int)  aValue
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 360 of file CPTextStorage.j.

◆ setDelegate:()

- (void) setDelegate: (id <CPTextStorageDelegate>)  aDelegate
implementation

Definition at line 94 of file CPTextStorage.j.

◆ setEditedMask:()

- (void) setEditedMask: (unsigned)  aValue
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 376 of file CPTextStorage.j.

◆ setFont:()

- (void) setFont: (CPFont aValue
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 328 of file CPTextStorage.j.

◆ setForegroundColor:()

- (void) setForegroundColor: (CPColor aValue
implementation

Synthesized accessor method.

Provided by category CPTextStorage(CPSynthesizedAccessors).

Definition at line 312 of file CPTextStorage.j.


The documentation for this class was generated from the following files: