1using System.Threading.Tasks;
20 : base(Document, Parent)
30 set => this.w = value;
37 public override Task
FromXml(XmlElement Input)
40 return base.FromXml(Input);
49 base.ExportAttributes(Output);
60 base.CopyContents(Destination);
73 await base.DoMeasureDimensions(State);
77 this.weight = Weight.
Result;
93 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.
Result of asynchronous evaluation.
T Result
Evaluated result, if successful.
bool Ok
If evaluation was successful.
Floating point (Single) attribute
FloatAttribute CopyIfNotPreset(Layout2DDocument ForDocument)
Copies the attribute object if undefined, or defined by an expression. Returns a reference to itself,...
Variables Session
Current session.
Layout2DDocument Document
Layout document.
Abstract base class for layout elements with two points.
Abstract base class for layout elements with two points and a weight.
override async Task DoMeasureDimensions(DrawingState State)
Measures layout entities and defines unassigned properties, related to dimensions.
override void CopyContents(ILayoutElement Destination)
Copies contents (attributes and children) to the destination element.
FloatAttribute WeightAttribute
Weight
float weight
Measured weight
override void ExportAttributes(XmlWriter Output)
Exports attributes to XML.
Point2Weight(Layout2DDocument Document, ILayoutElement Parent)
Abstract base class for layout elements with two points and a weight.
override void ExportStateAttributes(XmlWriter Output)
Exports the local attributes of the current element.
override Task FromXml(XmlElement Input)
Populates the element (including children) with information from its XML definition.
Base interface for all layout elements.
Layout2DDocument Document
Layout document.