Skip to content

Class Grid

Children in cells of a table of fixed and proportional tracks. Set the tracks, new Grid { Columns = { Track.Fixed(12), Track.Star() }, Rows = { Track.Star() } }, then place each child with Add(column, row, child).

Declaration
public sealed class Grid : Container

Inheritance: System.Object -> DarkEffekt.Terminal.UI.Element -> DarkEffekt.Terminal.UI.Container

Declaration
public List<Track> Columns { get; }
Declaration
public List<Track> Rows { get; }

Adds a child to the cell at a column and row.

Declaration
public void Add(int column, int row, Element child)
Type Name
System.Int32 column
System.Int32 row
DarkEffekt.Terminal.UI.Element child

A child left the container. A panel that keeps placement for its children drops it here.

Declaration
protected override void OnRemoved(Element child)
Type Name
DarkEffekt.Terminal.UI.Element child

The size this element wants, within the room given.

Declaration
protected override CellSize MeasureCore(CellSize available)

DarkEffekt.Terminal.UI.CellSize

Type Name
DarkEffekt.Terminal.UI.CellSize available

Places the children inside this element’s rectangle.

Declaration
protected override void ArrangeCore(CellRect rect)
Type Name
DarkEffekt.Terminal.UI.CellRect rect