public static char GetChar(Window win) { return win.GetChar(); }
public static bool Standout(Window win) { return win.Standout(); }
internal static void Register(Window win) { WindowList.Add(win); }
public static int SelectKey(Window win, params Keys[] keys) { return win.SelectKey(keys); }
public static void SetScreenPos(Window win,int x,int y) { if (win.SetWindowPos(x, y)) { RefreshAll(); } }
public static int RunMenu(Window win, IEnumerable items, IApply handler) { return win.RunMenu(items, handler); }
public static void Scroll(Window win, int top,int height,int count) { win.Scroll( top, height, count); }
public static void Hide(Window win) { if (win == StdScr) { return; } if (win.Visible) { win.Visible = false; RefreshAll(); } }
public static Window MakeWindow(int x, int y, int w, int h, int maxh) { CheckBounds(ref x, ref y, ref w, ref h, Terminal.Width, Terminal.Height); maxh = Math.Max(h, maxh); var pad = new Buffer(w, maxh); var win = new Window(x, y, pad, 0, 0, w, h); Register(win); return win; }
public static string GetLine(Window win, string s) { return win.GetLine(s, -1); }
public static string GetLine(Window win, string s, int maxChars) { return win.GetLine(s, maxChars); }
public static string GetLine(Window win) { return win.GetLine("", -1); }
public static KeyInfo GetKey(Window win, bool echo) { return win.GetKey(echo); }
public static KeyInfo GetKey(Window win) { return win.GetKey(false); }
public static void Refresh(Window win) { win.Refresh(); }
public static Window MakeWindow(Window orig, int x, int y, int w, int h) { CheckBounds(ref x, ref y, ref w, ref h, orig.Width, orig.Height); var win = new Window(orig.ScreenLeft + x, orig.ScreenTop + y, orig.Buffer, x, y, w, h); Register(win); return win; }
public static int RunMenu(Window win, IEnumerable items) { return win.RunMenu(items, null); }
public static void Move(Window win, int col, int row) { win.Move(col, row); }
public static void Scroll(Window win, int count) { Scroll(win,0,-1,count); }
public static void OutRefresh(Window win) { win.OutRefresh(); }
public static void ScrollOk(Window win, bool flag) { win.ScrollOk(flag); }
public static void Put(Window w, char ch) { w.Put(ch); }
public static void SetBufferPos(Window win,int x,int y) { win.SetBufferPos(x, y); }
public static void PutLine(Window w) { w.PutLine(); }
public static void Show(Window win) { if (!win.Visible) { win.Visible = true; RefreshAll(); } }
public static void PutLine(Window w, string s) { w.PutLine(s); }
public static bool Standout(Window win, bool flag) { return win.Standout(flag); }
public static void PutLine(Window w, char ch) { w.PutLine(ch); }
internal static void Unregister(Window win) { WindowList.Remove(win); }
public static object ForeColor(Window win, object color) { if (color == null) { return null; } var fg = win.ForeColor; win.ForeColor = new ColorType(color); return fg; }