1using System.Threading.Tasks;
43 : base(Document, Parent)
53 set => this.width = value;
62 set => this.height = value;
71 set => this.maxWidth = value;
79 get => this.maxHeight;
80 set => this.maxHeight = value;
89 set => this.minWidth = value;
97 get => this.minHeight;
98 set => this.minHeight = value;
106 get => this.overflow;
107 set => this.overflow = value;
116 set => this.onClick = value;
123 public override Task
FromXml(XmlElement Input)
134 return base.FromXml(Input);
143 base.ExportAttributes(Output);
145 this.width?.
Export(Output);
146 this.height?.
Export(Output);
147 this.maxWidth?.
Export(Output);
148 this.maxHeight?.
Export(Output);
149 this.minWidth?.
Export(Output);
150 this.minHeight?.
Export(Output);
151 this.overflow?.
Export(Output);
152 this.onClick?.
Export(Output);
161 base.CopyContents(Destination);
183 await base.DoMeasureDimensions(State);
191 this.Width = this.ExplicitWidth = a;
197 a = this.Height ?? 0;
199 this.Height = this.ExplicitHeight = a;
205 a = this.MinWidth ?? 0;
213 a = this.MaxWidth ?? 0;
221 a = this.MinHeight ?? 0;
229 a = this.MaxHeight ?? 0;
241 base.ExportStateAttributes(Output);
Contains a 2D layout document.
void Export(XmlWriter Output)
Exports the attribute.
void ExportState(XmlWriter Output)
Exports the state of the attribute.
static async Task< EvaluationResult< T > > TryEvaluate(Attribute< T > Attribute, Variables Session)
Tries to evaluate the attribute value.
EnumAttribute< TEnum > CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
Result of asynchronous evaluation.
ExpressionAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
LengthAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
Variables Session
Current session.
void CalcDrawingSize(Length L, ref float Size, bool Horizontal, ILayoutElement Element)
Converts a defined length to drawing size.
Abstract base class for layout elements with an implicit area.
LengthAttribute WidthAttribute
Width
LayoutArea(Layout2DDocument Document, ILayoutElement Parent)
Abstract base class for layout elements with an implicit area.
override void ExportStateAttributes(XmlWriter Output)
Exports the local attributes of the current element.
LengthAttribute MinWidthAttribute
Minimum Width
override void ExportAttributes(XmlWriter Output)
Exports attributes to XML.
LengthAttribute HeightAttribute
Height
ExpressionAttribute OnClickAttribute
OnClick event script
override void CopyContents(ILayoutElement Destination)
Copies contents (attributes and children) to the destination element.
override async Task DoMeasureDimensions(DrawingState State)
Measures layout entities and defines unassigned properties, related to dimensions.
LengthAttribute MaxWidthAttribute
Maximum Width
LengthAttribute MinHeightAttribute
Minimum Height
LengthAttribute MaxHeightAttribute
Maximum Height
EnumAttribute< Overflow > OverflowAttribute
Overflow
override Task FromXml(XmlElement Input)
Populates the element (including children) with information from its XML definition.
Abstract base class for layout elements.
Layout2DDocument Document
Layout document.
Base interface for all layout elements.
Layout2DDocument Document
Layout document.
Overflow
Overflow handling.