struct VStack
Swift
struct VStack<Content> where Content : View
Lays its children out top to bottom.
Given a .point or .percent width, it is also painted with the theme's
panel colour. See StackStyle.width.
Sources/LavaUI/Stack.swift:144
Constructors
init(flexGrow: Float = 0, width: Dimension = .auto, height: Dimension = .auto, padding: Float = 0, alignment: StackAlignment = .stretch, spacing: Float? = nil, wraps: Bool = false, onClick: (() -> Void)? = nil, onPointer: ((_ mods: Int32, _ button: Int32) -> Void)? = nil, onHover: ((Bool) -> Void)? = nil, onWheel: ((Float, Float) -> Void)? = nil, @ViewBuilder content: () -> Content)
Creates a column. Every parameter matches the property of the same name.
Sources/LavaUI/Stack.swift:161
Properties
var content: Content
The children.
Sources/LavaUI/Stack.swift:148
var dumpDetail: String { get }
Not documented.
Sources/LavaUI/Stack.swift:186
var onClick: (() -> Void)?
Called when the stack, or a child with no click handler of its own, is clicked.
Sources/LavaUI/Stack.swift:150
var onHover: ((Bool) -> Void)?
Called with true when the pointer enters the stack and false when it leaves.
Sources/LavaUI/Stack.swift:155
var onPointer: ((_ mods: Int32, _ button: Int32) -> Void)?
Button-aware press (PointerButton.left / .right / …). When set,
takes priority over onClick.
Sources/LavaUI/Stack.swift:153
var onWheel: ((Float, Float) -> Void)?
Called with the deltas, in notches, when the wheel turns over the stack.
Setting it keeps the wheel from reaching a ScrollView around the stack.
Sources/LavaUI/Stack.swift:158
var style: StackStyle
Size, padding, spacing and alignment.
Sources/LavaUI/Stack.swift:146
Methods
func mountPrimitive() -> any AnyViewNode
Not documented.
Sources/LavaUI/Stack.swift:196
func reconcilePrimitive(_ node: any AnyViewNode) -> any AnyViewNode
Not documented.
Sources/LavaUI/Stack.swift:209
func structureLines(indent: Int = 0) -> [String]
Not documented.
Sources/LavaUI/Stack.swift:188