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
nodeLayoutNodeThe container node being arranged
finalRectLayoutRectThe 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
nodeLayoutNodeThe container node being measured
constraintsLayoutConstraintsThe constraints from the parent
Returns
- LayoutSize
The desired size for this container based on its children