loom & weft
Made for Swift.

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

Structure
struct TextWrapOptions

Conforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.

Optional wrapping controls.

Defaults preserve existing layout and literal source copying.

Source · TextLayout.swift:14

trimLeadingWhitespace

Instance Property
var trimLeadingWhitespace: Bool

A public field of this type. Its value type and mutability are shown in the declaration.

Source · TextLayout.swift:15

breakLongWords

Instance Property
var breakLongWords: Bool

A public field of this type. Its value type and mutability are shown in the declaration.

Source · TextLayout.swift:16

tabWidth

Instance Property
var tabWidth: Int

Number of cells emitted for each tab, independent of its column.

Source · TextLayout.swift:18

init(trimLeadingWhitespace:breakLongWords:tabWidth:)

Initializer
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.
Source · TextLayout.swift:20