internal void _Construct(Root Root) { this.Root = Root; if (!Constructed) { Constructed = true; this.Construct(); Root.SafeCall(OnConstruct, this); } }
/// <summary> /// Run the layout engine on this widget and all children. /// Warning: This operation invalidates the entire tree and potentially moves all children widgets. /// </summary> public virtual void Layout() { Root.SafeCall(this.OnLayout, this); var inside = GetDrawableInterior().Interior(InteriorMargin); foreach (var child in Children) { inside = LayoutChild(inside, Padding, child); } Invalidate(); }
internal void _Construct(Root Root) { this.Root = Root; if (!Constructed) { if (Text != null) { Text = StringLibrary.TransformDataString(Text, Text); } if (Tooltip != null) { Tooltip = StringLibrary.TransformDataString(Tooltip, Tooltip); } Constructed = true; this.Construct(); Root.SafeCall(OnConstruct, this); } }