Exemplo n.º 1
0
 internal void _Construct(Root Root)
 {
     this.Root = Root;
     if (!Constructed)
     {
         Constructed = true;
         this.Construct();
         Root.SafeCall(OnConstruct, this);
     }
 }
Exemplo n.º 2
0
        /// <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();
        }
Exemplo n.º 3
0
        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);
            }
        }