loom & weft
Made for Swift.

Published release 0.2.1. Unreleased PR #2 reference.

LOOM 0.2.1 / WIDGETS

BorderEdges

An OptionSet: combine edges with an array literal, use .all for every side, and [] for none. Each selected edge consumes one cell in Panel.inner.

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

let edges: BorderEdges = [.top, .bottom]
_ = edges.contains(.left)
_ = Panel(borders: edges)
Members on this page

Feature guides and release status

BorderEdges

Structure
struct BorderEdges

Conforms to: Swift.Equatable, Swift.ExpressibleByArrayLiteral, Swift.OptionSet, Swift.RawRepresentable, Swift.Sendable, Swift.SendableMetatype, Swift.SetAlgebra.

The sides of a panel that receive a border.

Source · Panel.swift:23

rawValue

Instance Property
let rawValue: UInt8

Underlying identifier, bit field, or enum representation; see the containing type.

Source · Panel.swift:24

init(rawValue:)

Initializer
init(rawValue: UInt8)

Creates a value with the supplied arguments. Default arguments are shown in the declaration.

Parameters (1)
rawValue
Argument type and any default are shown in the declaration; see the behavior notes above.
Source · Panel.swift:26

top

Type Property
static let top: BorderEdges

Enables the top border; consumes one content row.

Source · Panel.swift:30

right

Type Property
static let right: BorderEdges

Enables the right border; consumes one content column.

Source · Panel.swift:31

bottom

Type Property
static let bottom: BorderEdges

Enables the bottom border; consumes one content row.

Source · Panel.swift:32

left

Type Property
static let left: BorderEdges

Enables the left border; consumes one content column.

Source · Panel.swift:33

all

Type Property
static let all: BorderEdges

All four border edges.

Source · Panel.swift:34