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, 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); }
public ObjectValuePad() { scrolled = new ScrolledWindow(); scrolled.HscrollbarPolicy = PolicyType.Automatic; scrolled.VscrollbarPolicy = PolicyType.Automatic; tree = new ObjectValueTreeView(); fontChanger = new PadFontChanger(tree, tree.SetCustomFont, tree.QueueResize); tree.AllowEditing = true; tree.AllowAdding = false; tree.HeadersVisible = true; tree.RulesHint = true; scrolled.Add(tree); scrolled.ShowAll(); DebuggingService.CurrentFrameChanged += OnFrameChanged; DebuggingService.PausedEvent += OnDebuggerPaused; DebuggingService.ResumedEvent += OnDebuggerResumed; DebuggingService.StoppedEvent += OnDebuggerStopped; DebuggingService.EvaluationOptionsChanged += OnEvaluationOptionsChanged; needsUpdate = true; initialResume = true; }
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 DebugValueWindow(Gtk.Window transientFor, string pinnedWatchFileName, int pinnedWatchLine, StackFrame frame, ObjectValue value, PinnedWatch watch) : base(Gtk.WindowType.Toplevel) { this.TypeHint = WindowTypeHint.PopupMenu; this.AllowShrink = false; this.AllowGrow = false; this.Decorated = false; TransientFor = transientFor; // Avoid getting the focus when the window is shown. We'll get it when the mouse enters the window AcceptFocus = false; sw = new ScrolledWindow(); sw.HscrollbarPolicy = PolicyType.Never; sw.VscrollbarPolicy = PolicyType.Never; UpdateTreeStyle(Theme.BackgroundColor); Tree = new ObjectValueTreeView(); Tree.Name = innerTreeName; sw.Add(Tree); ContentBox.Add(sw); Tree.Frame = frame; Tree.CompactView = true; Tree.AllowAdding = false; Tree.AllowEditing = true; Tree.HeadersVisible = false; Tree.AllowPinning = true; Tree.RootPinAlwaysVisible = true; Tree.PinnedWatch = watch; Tree.PinnedWatchLine = pinnedWatchLine; Tree.PinnedWatchFile = pinnedWatchFileName; Tree.AddValue(value); Tree.Selection.UnselectAll(); Tree.SizeAllocated += OnTreeSizeChanged; Tree.PinStatusChanged += OnPinStatusChanged; sw.ShowAll(); Tree.StartEditing += OnStartEditing; Tree.EndEditing += OnEndEditing; ShowArrow = true; Theme.CornerRadius = 3; PreviewWindowManager.WindowClosed += PreviewWindowManager_WindowClosed; }
public ObjectValuePad() { scrolled = new ScrolledWindow(); scrolled.HscrollbarPolicy = PolicyType.Automatic; scrolled.VscrollbarPolicy = PolicyType.Automatic; if (UseNewTreeView) { controller = new ObjectValueTreeViewController(); controller.AllowEditing = true; var treeView = controller.GetControl() as GtkObjectValueTreeView; fontChanger = new PadFontChanger(treeView, treeView.SetCustomFont, treeView.QueueResize); scrolled.Add(treeView); } else { tree = new ObjectValueTreeView(); tree.AllowEditing = true; tree.AllowAdding = false; fontChanger = new PadFontChanger(tree, tree.SetCustomFont, tree.QueueResize); scrolled.Add(tree); } scrolled.ShowAll(); 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... initialResume = !DebuggingService.IsDebugging; }
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; }
Widget CreateExceptionValueTreeView() { Widget scrolledWidget = null; if (useNewTreeView) { controller = new ObjectValueTreeViewController(); controller.SetStackFrame(DebuggingService.CurrentFrame); controller.AllowExpanding = true; if (Platform.IsMac) { macExceptionValueTreeView = controller.GetMacControl(ObjectValueTreeViewFlags.ObjectValuePadFlags); macExceptionValueTreeView.UIElementName = "ExceptionCaughtDialog"; } else { exceptionValueTreeView = controller.GetGtkControl(ObjectValueTreeViewFlags.ExceptionCaughtFlags); } } else { var objValueTreeView = new ObjectValueTreeView(); objValueTreeView.Frame = DebuggingService.CurrentFrame; objValueTreeView.AllowPopupMenu = false; objValueTreeView.AllowExpanding = true; objValueTreeView.AllowPinning = false; objValueTreeView.AllowEditing = false; objValueTreeView.AllowAdding = false; exceptionValueTreeView = objValueTreeView; } if (useNewTreeView && Platform.IsMac) { var scrolled = new AppKit.NSScrollView { DocumentView = macExceptionValueTreeView, AutohidesScrollers = true, 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(); scrolledWidget = host; } else { exceptionValueTreeView.ModifyBase(StateType.Normal, Styles.ExceptionCaughtDialog.ValueTreeBackgroundColor.ToGdkColor()); exceptionValueTreeView.ModifyBase(StateType.Active, Styles.ObjectValueTreeActiveBackgroundColor.ToGdkColor()); exceptionValueTreeView.ModifyFont(Pango.FontDescription.FromString(Platform.IsWindows ? "9" : "11")); exceptionValueTreeView.RulesHint = false; exceptionValueTreeView.CanFocus = true; exceptionValueTreeView.Show(); var scrolled = new ScrolledWindow { CanFocus = true, HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic }; scrolled.ShadowType = ShadowType.None; scrolled.Add(exceptionValueTreeView); scrolled.Show(); scrolledWidget = scrolled; } var label = new Label(); label.Markup = "<b>" + GettextCatalog.GetString("Properties") + "</b>"; label.Xalign = 0; label.Xpad = 10; if (exceptionValueTreeView != null) { exceptionValueTreeView.SetCommonAccessibilityAttributes("ExceptionCaughtDialog.ExceptionValueTreeView", label, null); } else { macExceptionValueTreeView.AccessibilityTitle = new NSString(label.Text); } var vbox = new VBox(); vbox.PackStart(label, false, false, 12); vbox.PackStart(scrolledWidget, true, true, 0); vbox.ShowAll(); return(vbox); }
public DebugValueWindow(Gtk.Window transientFor, PinnedWatchLocation location, StackFrame frame, ObjectValue value, PinnedWatch watch) : base(Gtk.WindowType.Toplevel) { TypeHint = WindowTypeHint.PopupMenu; AllowShrink = false; AllowGrow = false; Decorated = false; TransientFor = transientFor; // Avoid getting the focus when the window is shown. We'll get it when the mouse enters the window AcceptFocus = false; sw = new ScrolledWindow { HscrollbarPolicy = PolicyType.Never, VscrollbarPolicy = PolicyType.Never }; UpdateTreeStyle(Theme.BackgroundColor); if (useNewTreeView) { controller = new ObjectValueTreeViewController(); controller.SetStackFrame(frame); controller.AllowEditing = true; controller.PinnedWatch = watch; controller.PinnedWatchLocation = location; treeView = controller.GetGtkControl(headersVisible: false, allowPinning: true, compactView: true, rootPinVisible: true); if (treeView is IObjectValueTreeView ovtv) { ovtv.StartEditing += OnStartEditing; ovtv.EndEditing += OnEndEditing; ovtv.NodePinned += OnPinStatusChanged; } controller.AddValue(value); } else { objValueTreeView = new ObjectValueTreeView(); objValueTreeView.RootPinAlwaysVisible = true; objValueTreeView.HeadersVisible = false; objValueTreeView.AllowEditing = true; objValueTreeView.AllowPinning = true; objValueTreeView.CompactView = true; objValueTreeView.PinnedWatch = watch; objValueTreeView.PinnedWatchLocation = location; objValueTreeView.Frame = frame; objValueTreeView.AddValue(value); objValueTreeView.PinStatusChanged += OnPinStatusChanged; objValueTreeView.StartEditing += OnStartEditing; objValueTreeView.EndEditing += OnEndEditing; treeView = objValueTreeView; } treeView.Name = innerTreeName; treeView.Selection.UnselectAll(); treeView.SizeAllocated += OnTreeSizeChanged; sw.Add(treeView); ContentBox.Add(sw); sw.ShowAll(); ShowArrow = true; Theme.CornerRadius = 3; PreviewWindowManager.WindowClosed += PreviewWindowManager_WindowClosed; }