1using System.Threading.Tasks;
22 : base(Document, Parent)
40 await base.DoMeasureDimensions(State);
54 await this.cellLayout.
Add(Child2);
57 await this.cellLayout.
Add(Child);
60 this.cellLayout.
Flush();
70 await base.AfterMeasureDimensions(State);
78 this.Width = this.cellLayout.
TotWidth;
90 base.MeasurePositions(State);
94 this.measured = this.cellLayout?.
Align();
108 SKCanvas Canvas = State.
Canvas;
109 SKMatrix M = Canvas.TotalMatrix;
111 foreach (
Padding P
in this.measured)
Contains a 2D layout document.
SKCanvas Canvas
Current drawing canvas.
Provides padding for a layout element in a group contruct.
ILayoutElement Element
Embedded element
Abstract base class of elements that do spatial distribution of children.
Padding[] measured
Measured children.
override async Task AfterMeasureDimensions(DrawingState State)
Called when dimensions have been measured.
override void MeasurePositions(DrawingState State)
Measures layout entities and defines unassigned properties, related to positions.
abstract Task< ICellLayout > GetCellLayout(DrawingState State)
Gets a cell layout object that will be responsible for laying out cells.
override async Task DoMeasureDimensions(DrawingState State)
Measures layout entities and defines unassigned properties, related to dimensions.
override bool MeasureChildrenPositions
If children positions are to be measured.
override async Task Draw(DrawingState State)
Draws layout entities.
SpatialDistribution(Layout2DDocument Document, ILayoutElement Parent)
Abstract base class of elements that do spatial distribution of children.
Abstract base class for layout containers (area elements containing embedded layout elements).
bool HasChildren
If the element has children or not.
ILayoutElement[] Children
Child elements
Basic interface for cell layout objects.
Padding[] Align()
Aligns cells and returns an array of padded cells.
void Flush()
Flushes any waiting elements int he layout pipeline.
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 Distribute(bool SetPosition)
Distributes cells in layout.
float TotWidth
Total width of layout
float TotHeight
Total height of layout
Interface for layout elements that generate children dynamically.
Base interface for all layout elements.
Task Draw(DrawingState State)
Draws layout entities.
bool IsVisible
If the element is visible or not.