Widget CreateExceptionValueTreeView() { ExceptionValueTreeView = new ObjectValueTreeView(); ExceptionValueTreeView.Frame = DebuggingService.CurrentFrame; ExceptionValueTreeView.ModifyBase(StateType.Normal, Styles.ExceptionCaughtDialog.TreeBackgroundColor.ToGdkColor()); ExceptionValueTreeView.AllowPopupMenu = false; ExceptionValueTreeView.AllowExpanding = true; ExceptionValueTreeView.AllowPinning = false; ExceptionValueTreeView.AllowEditing = false; ExceptionValueTreeView.AllowAdding = false; ExceptionValueTreeView.RulesHint = false; ExceptionValueTreeView.Selection.Changed += ExceptionValueSelectionChanged; ExceptionValueTreeView.Show(); var scrolled = new ScrolledWindow { HeightRequest = 180, HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic }; scrolled.ShadowType = ShadowType.None; scrolled.Add(ExceptionValueTreeView); scrolled.Show(); return(scrolled); }
Widget CreateExceptionValueTreeView() { ExceptionValueTreeView = new ObjectValueTreeView(); ExceptionValueTreeView.Frame = DebuggingService.CurrentFrame; ExceptionValueTreeView.ModifyBase(StateType.Normal, Styles.ExceptionCaughtDialog.ValueTreeBackgroundColor.ToGdkColor()); ExceptionValueTreeView.AllowPopupMenu = false; ExceptionValueTreeView.AllowExpanding = true; ExceptionValueTreeView.AllowPinning = false; ExceptionValueTreeView.AllowEditing = false; ExceptionValueTreeView.AllowAdding = false; ExceptionValueTreeView.RulesHint = true; ExceptionValueTreeView.ModifyFont(Pango.FontDescription.FromString(Platform.IsWindows ? "9" : "11")); ExceptionValueTreeView.RulesHint = false; ExceptionValueTreeView.Show(); var scrolled = new ScrolledWindow { HeightRequest = 180, HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic }; scrolled.ShadowType = ShadowType.None; scrolled.Add(ExceptionValueTreeView); scrolled.Show(); var vbox = new VBox(); expanderProperties = WrapInExpander(GettextCatalog.GetString("Properties"), scrolled); vbox.PackStart(new VBox(), false, false, 5); vbox.PackStart(expanderProperties, true, true, 0); vbox.ShowAll(); return(vbox); }
Widget CreateExceptionValueTreeView() { ExceptionValueTreeView = new ObjectValueTreeView(); ExceptionValueTreeView.Frame = DebuggingService.CurrentFrame; ExceptionValueTreeView.ModifyBase(StateType.Normal, new Gdk.Color(223, 228, 235)); ExceptionValueTreeView.AllowPopupMenu = false; ExceptionValueTreeView.AllowExpanding = true; ExceptionValueTreeView.AllowPinning = false; ExceptionValueTreeView.AllowEditing = false; ExceptionValueTreeView.AllowAdding = false; ExceptionValueTreeView.RulesHint = false; ExceptionValueTreeView.Selection.Changed += ExceptionValueSelectionChanged; ExceptionValueTreeView.Show(); var scrolled = new ScrolledWindow() { HeightRequest = 180 }; scrolled.ShadowType = ShadowType.None; scrolled.Add(ExceptionValueTreeView); scrolled.Show(); return(scrolled); }
public ObjectValuePad(bool allowWatchExpressions = false) { if (UseNewTreeView) { controller = new ObjectValueTreeViewController(allowWatchExpressions); controller.AllowEditing = true; if (Platform.IsMac) { LoggingService.LogInfo("Using MacObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad"); var treeView = controller.GetMacControl(ObjectValueTreeViewFlags.ObjectValuePadFlags); _treeview = treeView; fontChanger = new PadFontChanger(treeView, treeView.SetCustomFont, treeView.QueueResize); var scrolled = new AppKit.NSScrollView { DocumentView = treeView, AutohidesScrollers = false, HasVerticalScroller = true, HasHorizontalScroller = true, }; // disable implicit animations scrolled.WantsLayer = true; scrolled.Layer.Actions = new NSDictionary( "actions", NSNull.Null, "contents", NSNull.Null, "hidden", NSNull.Null, "onLayout", NSNull.Null, "onOrderIn", NSNull.Null, "onOrderOut", NSNull.Null, "position", NSNull.Null, "sublayers", NSNull.Null, "transform", NSNull.Null, "bounds", NSNull.Null); var host = new GtkNSViewHost(scrolled); host.ShowAll(); control = host; } else { LoggingService.LogInfo("Using GtkObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad"); var treeView = controller.GetGtkControl(ObjectValueTreeViewFlags.ObjectValuePadFlags); treeView.Show(); fontChanger = new PadFontChanger(treeView, treeView.SetCustomFont, treeView.QueueResize); var scrolled = new ScrolledWindow { HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic }; scrolled.Add(treeView); scrolled.Show(); control = scrolled; } } else { LoggingService.LogInfo("Using old ObjectValueTreeView for {0}", allowWatchExpressions ? "Watch Pad" : "Locals Pad"); tree = new ObjectValueTreeView(); tree.AllowAdding = allowWatchExpressions; tree.AllowEditing = true; tree.Show(); fontChanger = new PadFontChanger(tree, tree.SetCustomFont, tree.QueueResize); var scrolled = new ScrolledWindow { HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic }; scrolled.Add(tree); scrolled.Show(); control = scrolled; } DebuggingService.CurrentFrameChanged += OnFrameChanged; DebuggingService.PausedEvent += OnDebuggerPaused; DebuggingService.ResumedEvent += OnDebuggerResumed; DebuggingService.StoppedEvent += OnDebuggerStopped; DebuggingService.EvaluationOptionsChanged += OnEvaluationOptionsChanged; DebuggingService.VariableChanged += OnVariableChanged; needsUpdateValues = false; needsUpdateFrame = true; //If pad is created/opened while debugging... IsInitialResume = !DebuggingService.IsDebugging; }