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

The LayoutGrid computes layouts for hierarchically arranged components.

See also


Public / Constructors


public constructor LayoutGrid → (2)

container in : T

The parent container.

adapter in : ILayoutAdapter<T>

The layout adapter.

Creates a new instance of LayoutGrid.

Public / Methods


public method Invalidate → (1)

action in : LayoutAction

The layout action that needs to be performed.

Invalidates this layout grid.


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.


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


public attribute CanShrink → (get)

value : bool

true if the grid can shrink, false if not.

Does this layout grid support shrinking?


public attribute LayoutExtend → (get)

value : RangeI

The layout grid cell coordinate range.

The extends of this layout grid, in cells.


public attribute LayoutSize → (get)

value : int32

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.