Beispiel #1
0
        public void GuiInvalidate(int x, int y, int w, int h)
        {
            if (w == 1)
            {
                // cursor update needs more bits to avoid artefacts
                if (x > 0)
                {
                    --x;
                    ++w;
                }
                if (x + w < Cols)
                {
                    ++w;
                }
            }

            RuntimeRepl.GuiInvoke(new Action(() =>
            {
                var screen = new Rectangle(0, 0, Cols, Rows);
                var dirty  = new Rectangle(x, y, w, h);
                dirty.Intersect(screen);
                var bounds = new Rectangle(dirty.Left * CharWidth, dirty.Top * LineHeight, dirty.Width * CharWidth, dirty.Height * LineHeight);
                Invalidate(bounds);
            }));
        }
Beispiel #2
0
 public void GuiUpdateVertScrollBarPos()
 {
     RuntimeRepl.GuiInvoke(new Action(() =>
     {
         if (VertScrollBar != null)
         {
             VertScrollBar.Value   = 0;
             VertScrollBar.Maximum = Window.BufferHeight - 1;
             VertScrollBar.Value   = Window.WindowTop;
         }
     }));
 }
Beispiel #3
0
 public void GuiUpdateHoriScrollBarPos()
 {
     RuntimeRepl.GuiInvoke(new Action(() =>
     {
         if (HoriScrollBar != null)
         {
             HoriScrollBar.Value   = 0;
             HoriScrollBar.Maximum = Window.BufferWidth - 1;
             HoriScrollBar.Value   = Window.WindowLeft;
         }
     }));
 }
Beispiel #4
0
 public void GuiInvalidate()
 {
     RuntimeRepl.GuiInvoke(new Action(Invalidate));
 }
Beispiel #5
0
 public void GuiBringToFront()
 {
     RuntimeRepl.GuiInvoke(new Action(ParentForm.BringToFront));
 }