Layout

Description

struct Tinman.Engine.GUI.Layout

Layout descriptor for GUI components in a LayoutGrid.

Public / Constants

Default


public static readonly attribute Default → (Layout)

Default layout settings.

The following default layout settings are defined:

None


public static readonly attribute None → (Layout)

Empty layout settings.

Public / Constructors

At

2 overloads


[Pure]
public static method At1 → (1)

grid in : Box2I

The grid position.

returns → Layout

The Layout value.

Returns a new Layout value that places the component at the given grid position.

The returned layout value is based on None and only specifies the layout grid bounds.


[Pure]
public static method At2 → (4)

in : int32

The grid X-position.

in : int32

The grid Y-position.

width opt : int32 = 1

The grid span width, in cells.

height opt : int32 = 1

The grid span height, in cells.

returns → Layout

The Layout value.

Returns a new Layout value that places the component at the given grid position.

The returned layout value is based on None and only specifies the layout grid bounds.

Public / Methods

Align


[Pure]
public method Align → (1)

align in : Anchor

The alignment of the component in its layout grid cell.

returns → Layout

The resulting Layout value.

Specifies the layout grid cell align of the component.

Compact


[Pure]
public method Compact → ()

returns → Layout

The resulting Layout value.

Specifies zero margin and insets.

Fill


[Pure]
public method Fill → (1)

fill in : Axis

The fill axes.

returns → Layout

The resulting Layout value.

Specifies how the component shall fill its layout grid cell.

Grow


[Pure]
public method Grow → (1)

grow in : Axis

The grow axes.

returns → Layout

The resulting Layout value.

Specifies whether the layout grid cell can grow in order to compensate for additional missing space.

Insets

3 overloads


[Pure]
public method Insets1 → (1)

insets in : int32

The container insets.

returns → Layout

The resulting Layout value.

Specifies the insets of the container.


[Pure]
public method Insets2 → (1)

insets in : Edging

The container insets.

returns → Layout

The resulting Layout value.

Specifies the insets of the container.


[Pure]
public method Insets3 → (4)

insetTop in : int32

The top insets.

insetLeft in : int32

The left insets.

insetBottom in : int32

The bottom insets.

insetRight in : int32

The right insets.

returns → Layout

The resulting Layout value.

Specifies the insets of the container.

Insets​Bottom


[Pure]
public method InsetsBottom → (1)

insetBottom in : int32

The bottom insets.

returns → Layout

The resulting Layout value.

Specifies the insets of the container.

Insets​Left


[Pure]
public method InsetsLeft → (1)

insetLeft in : int32

The left insets.

returns → Layout

The resulting Layout value.

Specifies the insets of the container.

Insets​Right


[Pure]
public method InsetsRight → (1)

insetRight in : int32

The right insets.

returns → Layout

The resulting Layout value.

Specifies the insets of the container.

Insets​Top


[Pure]
public method InsetsTop → (1)

insetTop in : int32

The top insets.

returns → Layout

The resulting Layout value.

Specifies the insets of the container.

Limit

2 overloads


[Pure]
public method Limit1 → (1)

size in : Vec2I

The maximum size, in pixels.

returns → Layout

The resulting Layout value.

Specifies the maximum size of the component.


[Pure]
public method Limit2 → (2)

width in : int32

The maximum width, in pixels.

height in : int32

The maximum height, in pixels.

returns → Layout

The resulting Layout value.

Specifies the maximum size of the component.

Margin

3 overloads


[Pure]
public method Margin1 → (1)

margin in : int32

The component margin.

returns → Layout

The resulting Layout value.

Specifies the margin of the component.


[Pure]
public method Margin2 → (1)

margin in : Edging

The component margin.

returns → Layout

The resulting Layout value.

Specifies the margin of the component.


[Pure]
public method Margin3 → (4)

marginTop in : int32

The top margin.

marginLeft in : int32

The left margin.

marginBottom in : int32

The bottom margin.

marginRight in : int32

The right margin.

returns → Layout

The resulting Layout value.

Specifies the margin of the component.

Margin​Bottom


[Pure]
public method MarginBottom → (1)

marginBottom in : int32

The bottom margin.

returns → Layout

The resulting Layout value.

Specifies the margin of the component.

Margin​Left


[Pure]
public method MarginLeft → (1)

marginLeft in : int32

The left margin.

returns → Layout

The resulting Layout value.

Specifies the margin of the component.

Margin​Right


[Pure]
public method MarginRight → (1)

marginRight in : int32

The right margin.

returns → Layout

The resulting Layout value.

Specifies the margin of the component.

Margin​Top


[Pure]
public method MarginTop → (1)

marginTop in : int32

The top margin.

returns → Layout

The resulting Layout value.

Specifies the margin of the component.

Set​Default


[Pure]
public method SetDefault → (1)

other in : Layout

The other layout values.

returns → Layout

The resulting Layout value.

Checks which layout properties are specified by other in but not by this layout and copies them to this layout.

Shrink


[Pure]
public method Shrink → (1)

shrink in : Axis

The shrink axes.

returns → Layout

The resulting Layout value.

Specifies whether the layout grid cell can shrink in order to compensate for missing space.

Size

2 overloads


[Pure]
public method Size1 → (1)

size in : Vec2I

The minimum size, in pixels.

returns → Layout

The resulting Layout value.

Specifies the minimum size of the component.


[Pure]
public method Size2 → (2)

width in : int32

The minimum width, in pixels.

height in : int32

The minimum height, in pixels.

returns → Layout

The resulting Layout value.

Specifies the minimum size of the component.

Public / Attributes

Layout​Align


public readonly attribute LayoutAlign → (Anchor)

The cell alignment.

Layout​Fill


public readonly attribute LayoutFill → (Axis)

The cell fill mode.

Layout​Grid


public readonly attribute LayoutGrid → (Box2I)

The cell bounds.

Layout​Grow


public readonly attribute LayoutGrow → (Axis)

The grow mode.

Layout​Insets


public readonly attribute LayoutInsets → (Edging)

The container insets.

Layout​Limit


public readonly attribute LayoutLimit → (Vec2I)

The maximum pixel size.

Layout​Margin


public readonly attribute LayoutMargin → (Edging)

The component margin.

Layout​Shrink


public readonly attribute LayoutShrink → (Axis)

The shrink mode.

Layout​Size


public readonly attribute LayoutSize → (Vec2I)

The minimum pixel size.