Esempio n. 1
0
        public virtual int Layout(Rectangle extents, int order, LayoutNode parent)
        {
            var node = new LayoutNode(parent, this, extents, order);

            return(DoLayout(extents, order,
                            (child, childExtents, childOrder) => child.Layout(childExtents, childOrder, node)));
        }
Esempio n. 2
0
        public LayoutNode GetLayout()
        {
            var rootNode = new LayoutNode(null, null, UiConstants.UiExtents, 0);

            DoLayout((extents, order, element) => element.Layout(extents, order, new LayoutNode(rootNode, element, extents, order)));
            return(rootNode);
        }
Esempio n. 3
0
 public LayoutNode(LayoutNode parent, IUiElement element, Rectangle extents, int order)
 {
     Children = _children.AsReadOnly();
     Parent   = parent;
     Element  = element;
     Extents  = extents;
     Order    = order;
     parent?._children.Add(this);
 }