LayoutGrid

Description

sealed class Tinman.Engine.Drawing.LayoutGrid<T ref>

The LayoutGrid computes layouts for hierarchically arranged components.

See also

LayoutAction

Public / Constructors

Layout​Grid


public constructor LayoutGrid → (2)

container in : T

[not-null]
The parent container.

adapter in : ILayoutAdapter<T>

[not-null]
The layout adapter.

Creates a new instance of LayoutGrid.

Public / Methods

Invalidate


public method Invalidate → (1)

action in : LayoutAction

The layout action that needs to be performed.

Invalidates this layout grid.

Layout​Pos


[Pure]
public method LayoutPos → (1)

cell in : int32

The layout grid cell index.

returns → int32

The layout grid cell position.

Returns the minimum position of the given layout grid cell.

To get the maximum position of a layout grid cell, pass cell in +1 as argument.

Validate


public method Validate → ()

returns → bool

true if a layout action has been performed, false if not.

Validates this layout grid by performing all necessary layout actions.

Public / Attributes

Can​Shrink


public attribute CanShrink → (get)

value : bool

true if the grid can shrink, false if not.

Does this layout grid support shrinking?

Layout​Extend


public attribute LayoutExtend → (get)

value : RangeI

The layout grid cell coordinate range.

The extends of this layout grid, in cells.

Layout​Size


public attribute LayoutSize → (get)

value : int32

[>=0]
The size, in pixels.

The size of this layout grid, in pixels.

The layout size of the grid is computed by the LayoutAction.ComputeLayoutGridExtend action.