Platforms to show: All Mac Windows Linux Cross-Platform
NSTextContainerMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
An NSLayoutManager uses NSTextContainer to determine where to break lines, lay out portions of text, and so on. NSTextContainer defines rectangular regions, but you can create subclasses that define regions of other shapes, such as circular regions, regions with holes in them, or regions that flow alongside graphics.
- 7 properties
- property Handle as Integer
- property containerSize as NSSizeMBS
- property heightTracksTextView as boolean
- property layoutManager as NSLayoutManagerMBS
- property lineFragmentPadding as Double
- property textView as NSTextViewMBS
- property widthTracksTextView as boolean
- 5 methods
- method Constructor
- method Constructor(size as NSSizeMBS)
- method containsPoint(p as NSPointMBS) as boolean
- method isSimpleRectangularTextContainer as boolean
- method replaceLayoutManager(l as NSLayoutManagerMBS)
- 9 constants
Line Movement Constants
Constant | Value | Description |
---|---|---|
NSLineDoesntMove | 0 |
Line has no movement. |
NSLineMovesDown | 3 |
Lines move from top to bottom. |
NSLineMovesLeft | 1 |
Lines move from right to left. |
NSLineMovesRight | 2 |
Lines move from left to right. |
NSLineMovesUp | 4 |
Lines move from bottom to top. |
Line Sweep Direction Constants
Constant | Value | Description |
---|---|---|
NSLineSweepDown | 2 |
Characters move from top to bottom. |
NSLineSweepLeft | 0 |
Characters move from right to left. |
NSLineSweepRight | 1 |
Characters move from left to right. |
NSLineSweepUp | 3 |
Characters move from bottom to top. |
This class has no sub classes.
Some methods using this class:
- NSLayoutManagerMBS.addTextContainer(container as NSTextContainerMBS)
- NSLayoutManagerMBS.characterIndexForPoint(point as NSPointMBS, container as NSTextContainerMBS, byref partialFraction as Double) as Integer
- NSLayoutManagerMBS.glyphIndexForPoint(point as NSPointMBS, container as NSTextContainerMBS) as Integer
- NSLayoutManagerMBS.glyphIndexForPoint(point as NSPointMBS, container as NSTextContainerMBS, byref partialFraction as Double) as Integer
- NSLayoutManagerMBS.glyphRangeForTextContainer(container as NSTextContainerMBS) as NSRangeMBS
- NSLayoutManagerMBS.rectArrayForCharacterRange(charRange as NSRangeMBS, selCharRange as NSRangeMBS, container as NSTextContainerMBS, byref rectCount as Integer) as NSRectMBS()
- NSLayoutManagerMBS.rectArrayForGlyphRange(glyphRange as NSRangeMBS, selGlyphRange as NSRangeMBS, container as NSTextContainerMBS, byref rectCount as Integer) as NSRectMBS()
- NSLayoutManagerMBS.setExtraLineFragmentRect(fragmentRect as NSRectMBS, usedRect as NSRectMBS, TextContainer as NSTextContainerMBS)
- NSLayoutManagerMBS.usedRectForTextContainer(container as NSTextContainerMBS) as NSRectMBS
- NSTextViewMBS.replaceTextContainer(textContainer as NSTextContainerMBS)
Some properties using for this class:
- NSTextViewMBS.textContainer as NSTextContainerMBS
Some examples using this class:
- /MacControls/Line wrap in TextArea
- /MacControls/NSTextView show invisible characters
- /MacControls/NSTextView Unlimited Tab
Blog Entries
- MBS Xojo Plugins, version 18.6pr1
- Line Wrap for Textarea in Xojo Mac applications
- MBS Xojo / Real Studio Plugins, version 14.2pr1
- MBS Real Studio Plugins, version 12.4pr4
Release notes
- Version 19.0
- Added standard constructor to NSTextContainerMBS, NSMutableAttributedStringMBS and NSAttributedStringMBS.
- Fixed NSAttributedStringMBS methods to return NSTextContainerMBS if called on NSTextContainerMBS class.
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSTextCheckingResultMBS - NSTextFieldCellMBS