1using System.Collections.Generic;
2using System.Threading.Tasks;
12 private readonly List<Padding> measured =
new List<Padding>();
15 private float maxWidth = 0;
23 this.session = Session;
32 this.measured.Add(
new Padding(Element, 0, this.y));
33 this.y += Element.Height ?? 0;
35 float Width = Element.Width ?? 0;
36 if (Width > this.maxWidth)
37 this.maxWidth = Width;
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(this.maxWidth,
null, this.session, SetPosition);
93 return this.measured.ToArray();
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
void Flush()
Flushes any waiting elements int he layout pipeline.
void Distribute(bool SetPosition)
Distributes cells in layout.
Padding[] Align()
Aligns cells and returns an array of padded cells.
void MeasurePositions(DrawingState State)
Measures layout entities and defines unassigned properties, related to positions.
float TotHeight
Total height of layout
VerticalCells(Variables Session)
Lays ut cells vertically
float TotWidth
Total width of layout
Task Add(ILayoutElement Element)
Adds a cell to the layout.
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.