Platforms to show: All Mac Windows Linux Cross-Platform

NSTextStorageMBS class

Super class: NSMutableAttributedStringMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Text MBS MacCocoa Plugin 8.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The class for the text storage of a text view.

NSTextStorage is a semiconcrete subclass of NSMutableAttributedString that manages a set of client NSLayoutManager objects, notifying them of any changes to its characters or attributes so that they can relay and redisplay the text as needed. NSTextStorage defines the fundamental storage mechanism of the Application Kit's extended text-handling system.

NSTextStorage also defines a set of methods, listed under "Getting and setting scriptable properties" in the Method Types section, useful for getting and setting scriptable properties of NSTextStorage objects. Unless you are dealing with scriptability, you do not normally need to invoke these methods directly. In particular, using the characters, words or paragraphs methods or their corresponding setter methods is an inefficient way to manipulate the text storage, since these methods create and return many objects. Instead, use the text access methods defined by NSMutableAttributedString, NSAttributedString, NSMutableString, and NSString to perform character-level manipulation.
Subclass of the NSMutableAttributedStringMBS class.

Constants

Constant Value Description
NSTextStorageEditedAttributes 1 The constants for text messages. Attributes were added, removed, or changed.
NSTextStorageEditedCharacters 2 The constants for text messages. Characters were added, removed, or replaced.

Super class NSMutableAttributedStringMBS

Super class NSAttributedStringMBS

Constants

Constant Value Description
NSSpellingStateSpellingFlag 0 One of the constants for spelling state. Flag for spelling issues.

Spelling Constants.

Constant Value Description
NSSpellingStateGrammarFlag 1 Flag for grammar issues.

Underline Constants.

Constant Value Description
NSUnderlineByWord &h8000 Draw the line only underneath or through words, not whitespace.
NSUnderlinePatternDash &h0200 Draw a line of dashes.
NSUnderlinePatternDashDot &h0300 Draw a line of alternating dashes and dots.
NSUnderlinePatternDashDotDot &h0400 Draw a line of alternating dashes and two dots.
NSUnderlinePatternDot &h0100 Draw a line of dots.
NSUnderlinePatternSolid 0 Draw a solid line.
NSUnderlineStyleDouble 9 Draw a double line.
NSUnderlineStyleNone 0 Do not draw a line.
NSUnderlineStyleSingle 1 Draw a single line.
Example
NSUnderlineStyleThick 2 Draw a thick line.

Writing Direction Constants.

Constant Value Description
NSWritingDirectionEmbedding 0 Text is embedded in text with another writing direction. For example, an English quotation in the middle of an Arabic sentence could be marked as being embedded left-to-right text.
NSWritingDirectionOverride 1 Enables character types with inherent directionality to be overridden when required for special cases, such as for part numbers made of mixed English, digits, and Hebrew letters to be written from right to left.

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries


The items on this page are in the following plugins: MBS MacBase Plugin, MBS MacCocoa Plugin.


NSTextMBS   -   NSTextTableBlockMBS


The biggest plugin in space...