public ObjectInspectorPad()
        {
            controller = new ObjectInspectorTreeViewController();
            controller.AllowEditing = true;

            treeView = controller.GetMacTreeView(ObjectValueTreeViewFlags.ObjectValuePadFlags);

            fontChanger = new PadFontChanger(treeView, SetCustomFont);

            var scrolled = new AppKit.NSScrollView {
                DocumentView          = treeView,
                AutohidesScrollers    = false,
                HasVerticalScroller   = true,
                HasHorizontalScroller = true,
            };

            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;
        }
Example #2
0
        public PinnedWatchView(PinnedWatch watch, StackFrame frame)
        {
            this.watch = watch ?? throw new ArgumentNullException(nameof(watch));
            this.frame = frame;

            controller = new ObjectValueTreeViewController();
            controller.SetStackFrame(frame);
            controller.AllowEditing   = true;
            controller.AllowExpanding = false;

            treeView = controller.GetMacControl(ObjectValueTreeViewFlags.PinnedWatchFlags);

            controller.PinnedWatch = watch;

            if (watch.Value != null)
            {
                controller.AddValue(objectValue = watch.Value);
            }

            var rect = treeView.Frame;

            if (rect.Height < 1)
            {
                treeView.Frame = new CoreGraphics.CGRect(rect.X, rect.Y, rect.Width, 19);
            }

            AddSubview(treeView);
            Frame = treeView.Frame;

            heightConstraint        = HeightAnchor.ConstraintEqualToConstant(treeView.Frame.Height);
            heightConstraint.Active = true;

            widthConstraint        = WidthAnchor.ConstraintEqualToConstant(treeView.Frame.Width);
            widthConstraint.Active = true;

            DebuggingService.ResumedEvent += OnDebuggerResumed;
            DebuggingService.PausedEvent  += OnDebuggerPaused;
            treeView.Resized += OnTreeViewResized;

            AddTrackingArea(new NSTrackingArea(
Example #3
0
        public PinnedWatchView(PinnedWatch watch, StackFrame frame)
        {
            HasVerticalScroller = true;
            AutohidesScrollers  = true;

            controller = new ObjectValueTreeViewController();
            controller.SetStackFrame(frame);
            controller.AllowEditing = true;

            treeView = controller.GetMacControl(headersVisible: false, compactView: true, allowPinning: true);

            controller.PinnedWatch = watch;

            if (watch.Value != null)
            {
                controller.AddValue(watch.Value);
            }

            var rect = treeView.Frame;

            if (rect.Height < 1)
            {
                treeView.Frame = new CoreGraphics.CGRect(rect.X, rect.Y, rect.Width, 19);
            }

            DocumentView = treeView;
            Frame        = treeView.Frame;

            heightConstraint        = HeightAnchor.ConstraintEqualToConstant(treeView.Frame.Height);
            heightConstraint.Active = true;

            widthConstraint        = WidthAnchor.ConstraintEqualToConstant(treeView.Frame.Width);
            widthConstraint.Active = true;

            DebuggingService.ResumedEvent += OnDebuggerResumed;
            DebuggingService.PausedEvent  += OnDebuggerPaused;
            treeView.Resized += OnTreeViewResized;
        }