1using System.Collections.Generic;
2using System.Threading.Tasks;
12 private readonly List<Padding> measured =
new List<Padding>();
14 private float maxWidth = 0;
15 private float maxHeight = 0;
23 this.session = Session;
32 this.measured.Add(
new Padding(Element, 0, 0));
34 float Width = Element.Width ?? 0;
35 if (Width > this.maxWidth)
36 this.maxWidth = Width;
38 float Height = Element.Height ?? 0;
39 if (Height > this.maxHeight)
40 this.maxHeight = Height;
42 return Task.CompletedTask;
60 foreach (
Padding P
in this.measured)
65 P.OffsetX -= Element.Left ?? 0;
66 P.OffsetY -= Element.Top ?? 0;
86 foreach (
Padding P
in this.measured)
87 P.
Distribute(this.maxWidth, this.maxHeight, this.session, SetPosition);
96 return this.measured.ToArray();
Lays ut cells one on-top of another
float TotHeight
Total height of layout
OverlayCells(Variables Session)
Lays ut cells one on-top of another
Padding[] Align()
Aligns cells and returns an array of padded cells.
void Distribute(bool SetPosition)
Distributes cells in layout.
void Flush()
Flushes any waiting elements int he layout pipeline.
void MeasurePositions(DrawingState State)
Measures layout entities and defines unassigned properties, related to positions.
float TotWidth
Total width of layout
Task Add(ILayoutElement Element)
Adds a cell to the layout.
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.