예제 #1
0
 public NodePrintController(VisualTask node)
 {
     _node     = node;
     _box      = node.Box;
     _divider  = node.Divider;
     _iconMain = new TextureLoader(_node.Task.IconPath);
 }
        private void CalculateChild(IGraphBox child)
        {
            child.SetLocalPosition(0, Height);
            child.AddGlobalPosition(GlobalPositionX + child.LocalPositionX, GlobalPositionY + child.LocalPositionY);

            Height += child.Height;
            if (child.Width > Width)
            {
                Width = child.Width;
            }
        }
        private void CalculateChild(IGraphBox child)
        {
            child.SetLocalPosition(Width, 0);
            child.AddGlobalPosition(GlobalPositionX + child.LocalPositionX, GlobalPositionY + child.LocalPositionY);

            Width += child.Width;
            if (child.Height > Height)
            {
                Height = child.Height;
            }
        }
 public override void AddBox(IGraphBox child)
 {
     CalculateChild(child);
     _childContainers.Add(child);
 }
 public void BeforeEach()
 {
     _container = new GraphContainerHorizontal();
     _childBox  = A.GraphBoxStub().WithSize(100, 50).Build();
 }
 public virtual void AddBox(IGraphBox child)
 {
     CalculateChild(child);
     _childContainers.Add(child);
 }