public MacDebuggerTooltipWindow(PinnedWatchLocation location, StackFrame frame, ObjectValue value, PinnedWatch watch) { Animates = false; Behavior = NSPopoverBehavior.Semitransient; controller = new ObjectValueTreeViewController(); controller.SetStackFrame(frame); controller.AllowEditing = true; controller.PinnedWatch = watch; controller.PinnedWatchLocation = location; treeView = controller.GetMacControl(ObjectValueTreeViewFlags.TooltipFlags); treeView.UIElementName = "Tooltip"; treeView.NodePinned += OnPinStatusChanged; treeView.StartEditing += OnStartEditing; treeView.EndEditing += OnEndEditing; controller.AddValue(value); scrollView = new NSScrollView { HasVerticalScroller = true, AutohidesScrollers = true, DocumentView = treeView, Frame = treeView.Frame }; ContentViewController = new NSViewController { View = scrollView }; widthConstraint = scrollView.WidthAnchor.ConstraintEqualToConstant(treeView.Frame.Width); widthConstraint.Active = true; heightConstraint = scrollView.HeightAnchor.ConstraintEqualToConstant(treeView.Frame.Height); heightConstraint.Active = true; treeView.Resized += OnTreeViewResized; }
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; }