NSMutableParagraphStyleMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

NSMutableParagraphStyleMBS class

Super class: NSParagraphStyleMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Text MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ✅ Yes All
NSMutableParagraphStyle adds methods to its superclass, NSParagraphStyle, for changing the values of the subattributes in a paragraph style attribute.
Example
dim n as NSParagraphStyleMBS = NSParagraphStyleMBS.defaultParagraphStyle
MsgBox str(n.alignment) // 4 = natural

dim m as NSMutableParagraphStyleMBS = n.mutableCopy
m.setAlignment NSParagraphStyleMBS.NSCenterTextAlignment
MsgBox str(m.alignment) // 2 = center

See the NSParagraphStyle and NSAttributedString specifications for more information.

Important A paragraph style object should not be mutated after adding it to an attributed string; doing so can cause your program to crash.
Subclass of the NSParagraphStyleMBS class.

Super class NSParagraphStyleMBS

Alignment Modes

Constant Value Description
NSJustifiedTextAlignment 3 Fully-justified. The last line in a paragraph is natural-aligned.
NSLeftTextAlignment 0 Visually left aligned
NSNaturalTextAlignment 4 Indicates the default alignment for script.

Line Break Modes

Constant Value Description
NSLineBreakByCharWrapping 1 Wrapping occurs before the first character that doesn't fit.
NSLineBreakByClipping 2 Lines are simply not drawn past the edge of the text container.
NSLineBreakByTruncatingHead 3 Each line is displayed so that the end fits in the container and the missing text is indicated by some kind of ellipsis glyph.
NSLineBreakByTruncatingMiddle 5 Each line is displayed so that the beginning and end fit in the container and the missing text is indicated by some kind of ellipsis glyph in the middle.
NSLineBreakByTruncatingTail 4 Each line is displayed so that the beginning fits in the container and the missing text is indicated by some kind of ellipsis glyph.
NSLineBreakByWordWrapping 0 Wrapping occurs at word boundaries, unless the word itself doesn't fit on a single line.

Writing Direction

Constant Value Description
NSWritingDirectionLeftToRight 0 The writing direction is left to right.

Available in Mac OS X v10.2 and later.
NSWritingDirectionNatural -1 The writing direction is determined using the Unicode Bidi Algorithm rules P2 and P3. Default.

Available in Mac OS X v10.4 and later.
NSWritingDirectionRightToLeft 1 The writing direction is right to left.

Available in Mac OS X v10.2 and later.

This class has no sub classes.

Some methods using this class:

Some examples using this class:

Blog Entries

Release notes


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


NSMutableIndexSetMBS   -   NSMutableURLRequestMBS


💬 Ask a question or report a problem