1using System.Threading.Tasks;
44 : base(Document, Parent)
54 set => this.width = value;
63 set => this.height = value;
72 set => this.maxWidth = value;
80 get => this.maxHeight;
81 set => this.maxHeight = value;
90 set => this.minWidth = value;
98 get => this.minHeight;
99 set => this.minHeight = value;
107 get => this.keepAspectRatio;
108 set => this.keepAspectRatio = value;
116 get => this.overflow;
117 set => this.overflow = value;
126 set => this.onClick = value;
133 public override Task
FromXml(XmlElement Input)
145 return base.FromXml(Input);
154 base.ExportAttributes(Output);
156 this.width?.
Export(Output);
157 this.height?.
Export(Output);
158 this.maxWidth?.
Export(Output);
159 this.maxHeight?.
Export(Output);
160 this.minWidth?.
Export(Output);
161 this.minHeight?.
Export(Output);
162 this.keepAspectRatio?.
Export(Output);
163 this.overflow?.
Export(Output);
164 this.onClick?.
Export(Output);
173 base.CopyContents(Destination);
196 await base.DoMeasureDimensions(State);
204 this.Width = this.ExplicitWidth = a;
210 a = this.Height ?? 0;
212 this.Height = this.ExplicitHeight = a;
218 a = this.MinWidth ?? 0;
226 a = this.MaxWidth ?? 0;
234 a = this.MinHeight ?? 0;
242 a = this.MaxHeight ?? 0;
254 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.
BooleanAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
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
BooleanAttribute KeepAspectRatioAttribute
Keep aspect-ratio
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.