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); })); }
public void GuiUpdateVertScrollBarPos() { RuntimeRepl.GuiInvoke(new Action(() => { if (VertScrollBar != null) { VertScrollBar.Value = 0; VertScrollBar.Maximum = Window.BufferHeight - 1; VertScrollBar.Value = Window.WindowTop; } })); }
public void GuiUpdateHoriScrollBarPos() { RuntimeRepl.GuiInvoke(new Action(() => { if (HoriScrollBar != null) { HoriScrollBar.Value = 0; HoriScrollBar.Maximum = Window.BufferWidth - 1; HoriScrollBar.Value = Window.WindowLeft; } })); }
public void GuiInvalidate() { RuntimeRepl.GuiInvoke(new Action(Invalidate)); }
public void GuiBringToFront() { RuntimeRepl.GuiInvoke(new Action(ParentForm.BringToFront)); }