public void Initialize(IPadWindow container) { if (IdeApp.Preferences.CustomOutputPadFont != null) customFont = IdeApp.Preferences.CustomOutputPadFont; else customFont = Pango.FontDescription.FromString("Courier New"); view = new ReplView (); view.PromptMultiLineString = "+ "; view.ConsoleInput += OnViewConsoleInput; view.SetFont (customFont); view.ShadowType = Gtk.ShadowType.None; //view.AddMenuCommand("Start Interactive Session", StartInteractiveSessionHandler); //view.AddMenuCommand("Connect to Interactive Session", ConnectToInteractiveSessionHandler); view.ShowAll (); IdeApp.Preferences.CustomOutputPadFontChanged += HandleCustomOutputPadFontChanged; ReplPad.Instance = this; }
public ConnectToReplDialog(ReplPad replPad) { this.Build (); this.replPad = replPad; }
public void Initialize(IPadWindow window) { replSessions = new Dictionary<ReplView, ReplSession> (); window.Icon = MonoDevelop.Ide.Gui.Stock.Console; emptyImage = new Image (); if (IdeApp.Preferences.CustomOutputPadFont != null) customFont = IdeApp.Preferences.CustomOutputPadFont; else customFont = FontService.DefaultMonospaceFontDescription; //view.AddMenuCommand("Start Interactive Session", StartInteractiveSessionHandler); //view.AddMenuCommand("Connect to Interactive Session", ConnectToInteractiveSessionHandler); notebook = new Notebook (); notebook.Scrollable = true; newReplButton = CreateNewReplButton (); connectToReplButton = ConnectToReplButton (); /*notebook.Added += (object o, AddedArgs args) => { currentReplView = (args.Widget as ReplView); };*/ /*notebook.SwitchPage += (object o, SwitchPageArgs args) => { currentReplView = (notebook.GetNthPage ((int)(args.PageNum))) as ReplView; }; */ toolbar = CreateToolbar (); //toolbar.Add (newReplButton); window.GetToolbar (PositionType.Right).Add (newReplButton); window.GetToolbar (PositionType.Right).Add (connectToReplButton); window.GetToolbar (PositionType.Right).Visible = true; window.GetToolbar (PositionType.Right).ShowAll (); layout = new HBox (); layout.PackStart (notebook, true, true, 0); layout.PackEnd (toolbar, false, true, 0); Control = layout; Control.ShowAll (); IdeApp.Preferences.CustomOutputPadFontChanged += HandleCustomOutputPadFontChanged; ReplPad.Instance = this; }