Ejemplo n.º 1
0
 public Viewport(TvPoint point, int cols, int rows, int zindex)
 {
     Position = point;
     Columns  = cols;
     Rows     = rows;
     ZIndex   = zindex;
 }
Ejemplo n.º 2
0
 private void RepositionChildren(TvPoint displacement)
 {
     if (_thisComponent.Viewport != null)
     {
         foreach (var child in _childs.Components)
         {
             var childvp = child.Viewport;
             child.UpdateViewport(childvp.Translate(_thisComponent.Viewport.Position));
         }
     }
 }
Ejemplo n.º 3
0
        public void MoveTo(int left, int top)
        {
            if (!Visible)
            {
                ActionPending = VirtualConsoleCursorAction.Show;
            }

            if (Position.Left != left || Position.Top != top)
            {
                Position = new TvPoint(left, top);
                MovementPending = true;
            }
        }
Ejemplo n.º 4
0
 private void RepositionChildren(TvPoint displacement)
 {
     if (_thisComponent.Viewport != null)
     {
         var layout = _thisComponent.State;
         if (layout.ItemsCount > 0)
         {
             for (var layoutIdx = 0; layoutIdx < layout.ItemsCount; layoutIdx++)
             {
                 var height     = Layout.GetRealSize(Layout[layoutIdx], _thisComponent.Viewport.Rows);
                 var itemChilds = _childs.ComponentsForKey(layoutIdx);
                 foreach (var childComponent in itemChilds)
                 {
                     var childvp = childComponent.Viewport;
                     childComponent.UpdateViewport(_thisComponent.Viewport.TakeRows(height, height * layoutIdx), addIfNotExists: true);
                 }
             }
         }
     }
 }
Ejemplo n.º 5
0
 public IViewport Translate(TvPoint translation)
 {
     return(new DynamicViewport(_factory, _creator, _viewport.Translate(translation)));
 }
Ejemplo n.º 6
0
 public IViewport MoveTo(TvPoint newPos)
 {
     return(new DynamicViewport(_factory, _creator, _viewport.MoveTo(newPos)));
 }
Ejemplo n.º 7
0
 public VirtualConsoleCursor()
 {
     ActionPending = VirtualConsoleCursorAction.None;
     Position = new TvPoint(0, 0);
 }
Ejemplo n.º 8
0
 public IViewport Translate(TvPoint translation) => new Viewport(Position + translation, Columns, Rows, ZIndex);
Ejemplo n.º 9
0
 public IViewport MoveTo(TvPoint newPos) => new Viewport(newPos, Columns, Rows, ZIndex);
Ejemplo n.º 10
0
 public Viewport(TvPoint point, int cols) : this(point, cols, 1, 0)
 {
 }