public windowTerminalVTE(clsHost host) : base(String.Format("{0} - {1}:{2}",host.Name,host.RemoteHost,host.RemoteSSHPort)) { SSH = new clsSSHTerminal(host); Host = host; HBox hbox = new HBox (); term = new Terminal (); term.CursorBlinks = true; term.MouseAutohide = false; term.ScrollOnKeystroke = true; term.DeleteBinding = TerminalEraseBinding.Auto; term.BackspaceBinding = TerminalEraseBinding.Auto; term.FontFromString = host.TerminalFont; term.Emulation = "xterm"; term.Encoding = "UTF-8"; term.SetSize(host.TerminalCols,host.TerminalRows); VScrollbar vscroll = new VScrollbar (term.Adjustment); hbox.PackStart (term); hbox.PackStart (vscroll); this.CanFocus = true; this.Add (hbox); ShowAll (); SSH.TerminalData += (string text) => { Gtk.Application.Invoke (delegate { term.Feed(text); }); }; }
public windowVTETerminal(String Name, int Columns, int Rows, String FontString) { HBox hbox = new HBox(); term = new Terminal(); term.CursorBlinks = true; term.MouseAutohide = false; term.ScrollOnKeystroke = true; term.DeleteBinding = TerminalEraseBinding.Auto; term.BackspaceBinding = TerminalEraseBinding.Auto; term.FontFromString = FontString; term.Emulation = "xterm"; term.Encoding = "UTF-8"; term.SetSize(Columns, Rows); VScrollbar vscroll = new VScrollbar(term.Adjustment); hbox.PackStart(term); hbox.PackStart(vscroll); // Gdk.Color white = new Gdk.Color (); // Gdk.Color.Parse ("white", ref white); // // Gdk.Color black = new Gdk.Color (); // Gdk.Color.Parse ("black", ref black); // term.SetColors (black, white, new Gdk.Color[]{}, 16); term.ButtonPressEvent += (o, args) => { Write(args.Event.Button.ToString()); }; this.CanFocus = true; term.Show(); hbox.Show(); vscroll.Show(); this.Add(hbox); ShowAll(); KeyPress += (Gdk.Key key) => { if (LocalEcho) { Write(key.ToString()); } if (shellStream != null && shellStream.CanWrite) { shellStream.WriteByte((byte)key); shellStream.Flush(); } }; }
public windowVTETerminal(String Name, int Columns, int Rows, String FontString) { HBox hbox = new HBox (); term = new Terminal (); term.CursorBlinks = true; term.MouseAutohide = false; term.ScrollOnKeystroke = true; term.DeleteBinding = TerminalEraseBinding.Auto; term.BackspaceBinding = TerminalEraseBinding.Auto; term.FontFromString = FontString; term.Emulation = "xterm"; term.Encoding = "UTF-8"; term.SetSize(Columns,Rows); VScrollbar vscroll = new VScrollbar (term.Adjustment); hbox.PackStart (term); hbox.PackStart (vscroll); // Gdk.Color white = new Gdk.Color (); // Gdk.Color.Parse ("white", ref white); // // Gdk.Color black = new Gdk.Color (); // Gdk.Color.Parse ("black", ref black); // term.SetColors (black, white, new Gdk.Color[]{}, 16); term.ButtonPressEvent += (o, args) => { Write(args.Event.Button.ToString()); }; this.CanFocus = true; term.Show (); hbox.Show (); vscroll.Show (); this.Add (hbox); ShowAll (); KeyPress += (Gdk.Key key) => { if (LocalEcho) Write(key.ToString()); if (shellStream!=null && shellStream.CanWrite) { shellStream.WriteByte((byte)key); shellStream.Flush(); } }; }
public windowTerminalVTE(clsHost host) : base(String.Format("{0} - {1}:{2}", host.Name, host.RemoteHost, host.RemoteSSHPort)) { SSH = new clsSSHTerminal(host); Host = host; HBox hbox = new HBox(); term = new Terminal(); term.CursorBlinks = true; term.MouseAutohide = false; term.ScrollOnKeystroke = true; term.DeleteBinding = TerminalEraseBinding.Auto; term.BackspaceBinding = TerminalEraseBinding.Auto; term.FontFromString = host.TerminalFont; term.Emulation = "xterm"; term.Encoding = "UTF-8"; term.SetSize(host.TerminalCols, host.TerminalRows); VScrollbar vscroll = new VScrollbar(term.Adjustment); hbox.PackStart(term); hbox.PackStart(vscroll); this.CanFocus = true; this.Add(hbox); ShowAll(); SSH.TerminalData += (string text) => { Gtk.Application.Invoke(delegate { term.Feed(text); }); }; }