Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.
LOOM Unreleased (PR #2) / ADDITIONAL WIDGETS AND TEXT
TextWrapOptions
Optional wrapping controls.
Defaults preserve existing layout and literal source copying.
Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.
Example
_ = TextLayout("some long words", width: 12, wrapping: .word, options: TextWrapOptions(breakLongWords: false))Members on this page
Feature guides and release status
TextWrapOptions
struct TextWrapOptionsConforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.
Optional wrapping controls.
Defaults preserve existing layout and literal source copying.
Source · TextLayout.swift:14trimLeadingWhitespace
var trimLeadingWhitespace: BoolA public field of this type. Its value type and mutability are shown in the declaration.
Source · TextLayout.swift:15breakLongWords
var breakLongWords: BoolA public field of this type. Its value type and mutability are shown in the declaration.
Source · TextLayout.swift:16tabWidth
var tabWidth: IntNumber of cells emitted for each tab, independent of its column.
Source · TextLayout.swift:18init(trimLeadingWhitespace:breakLongWords:tabWidth:)
init(trimLeadingWhitespace: Bool = false, breakLongWords: Bool = true, tabWidth: Int = 4)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (3)
trimLeadingWhitespace- Argument type and any default are shown in the declaration; see the behavior notes above.
breakLongWords- Argument type and any default are shown in the declaration; see the behavior notes above.
tabWidth- Argument type and any default are shown in the declaration; see the behavior notes above.