1using System.Collections.Generic;
2using System.Threading.Tasks;
12 private readonly List<Padding> measured =
new List<Padding>();
15 private float maxHeight = 0;
23 this.session = Session;
32 this.measured.Add(
new Padding(Element, this.x, 0));
33 this.x += Element.Width ?? 0;
35 float Height = Element.Height ?? 0;
36 if (Height > this.maxHeight)
37 this.maxHeight = Height;
39 return Task.CompletedTask;
57 foreach (
Padding P
in this.measured)
62 P.OffsetX -= Element.Left ?? 0;
63 P.OffsetY -= Element.Top ?? 0;
83 foreach (
Padding P
in this.measured)
84 P.
Distribute(
null, this.maxHeight, this.session, SetPosition);
93 return this.measured.ToArray();
Lays ut cells horizontally
float TotHeight
Total height of layout
void Distribute(bool SetPosition)
Distributes cells in layout.
HorizontalCells(Variables Session)
Lays ut cells horizontally
float TotWidth
Total width of layout
Task Add(ILayoutElement Element)
Adds a cell to the layout.
void MeasurePositions(DrawingState State)
Measures layout entities and defines unassigned properties, related to positions.
void Flush()
Flushes any waiting elements int he layout pipeline.
Padding[] Align()
Aligns cells and returns an array of padded cells.
Provides padding for a layout element in a group contruct.
Task Distribute(float? MaxWidth, float? MaxHeight, Variables Session, bool SetPosition)
Aligns a measured cell
ILayoutElement Element
Embedded element
Basic interface for cell layout objects.
Base interface for all layout elements.
void MeasurePositions(DrawingState State)
Measures layout entities and defines unassigned properties, related to positions.