Table of Contents

Interface ILayoutContainer

Namespace
SharpConsoleUI.Layout
Assembly
SharpConsoleUI.dll

Interface for layout algorithms that determine how children are measured and arranged. Different implementations provide different layout strategies (vertical stack, horizontal, grid, etc.)

public interface ILayoutContainer

Methods

ArrangeChildren(LayoutNode, LayoutRect)

Arranges all children within the container's final bounds. Called during the arrange pass (top-down).

void ArrangeChildren(LayoutNode node, LayoutRect finalRect)

Parameters

node LayoutNode

The container node being arranged

finalRect LayoutRect

The final bounds allocated to this container

MeasureChildren(LayoutNode, LayoutConstraints)

Measures all children within the container and returns the desired size. Called during the measure pass (bottom-up).

LayoutSize MeasureChildren(LayoutNode node, LayoutConstraints constraints)

Parameters

node LayoutNode

The container node being measured

constraints LayoutConstraints

The constraints from the parent

Returns

LayoutSize

The desired size for this container based on its children