Published release 0.2.1. Unreleased PR #2 reference.
LOOM 0.2.1 / WIDGETS
PanelPadding
Padding is measured in terminal cells on each side. Panel.inner clamps negative padding to zero when calculating content geometry.
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 padding = PanelPadding(left: 2, right: 2, top: 1)
_ = Panel(padding: padding).inner(Rect(width: 40, height: 8))Members on this page
Feature guides and release status
PanelPadding
struct PanelPaddingConforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.
Terminal-cell padding inside a panel's borders.
Source · Panel.swift:4left
var left: IntLeft padding in cells.
Source · Panel.swift:5right
var right: IntRight padding in cells.
Source · Panel.swift:6top
var top: IntTop padding in cells.
Source · Panel.swift:7bottom
var bottom: IntBottom padding in cells.
Source · Panel.swift:8init(left:right:top:bottom:)
init(left: Int = 0, right: Int = 0, top: Int = 0, bottom: Int = 0)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (4)
left- Argument type and any default are shown in the declaration; see the behavior notes above.
right- Argument type and any default are shown in the declaration; see the behavior notes above.
top- Argument type and any default are shown in the declaration; see the behavior notes above.
bottom- Argument type and any default are shown in the declaration; see the behavior notes above.
init(all:)
init(all amount: Int)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (1)
all- Argument type and any default are shown in the declaration; see the behavior notes above.