← Standard library

ChildConstraints

struct ChildConstraints
import ChildConstraints from Wax;

The box constraints and layout weight supplied when measuring a child. An unweighted child has weight zero.

Layout.wax:186

Members

boxfield

public BoxConstraints box

The minimum and maximum dimensions the child must satisfy.

Layout.wax:190

weightfield

public float weight

The child's allotted share of free main-axis space; zero for an unweighted child.

Layout.wax:194

constructorconstructor

public constructor (BoxConstraints box, float weight)

Stores the supplied box constraints and weight.

Layout.wax:199

Tightmethod

public static fn Tight(Size size) : ChildConstraints

Creates exact-size box constraints with weight zero.

Layout.wax:207

Loosemethod

public static fn Loose(Size size) : ChildConstraints

Creates zero-to-size box constraints with weight zero.

Layout.wax:214

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.