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;
			//If pad is created/opened while debugging...
			initialResume = !DebuggingService.IsDebugging;
		}
Exemplo n.º 2
0
        public PinnedWatchWidget(MonoTextEditor editor, PinnedWatch watch)
        {
            objectValue = watch.Value;
            Editor      = editor;
            Watch       = watch;

            if (UseNewTreeView)
            {
                controller = new ObjectValueTreeViewController();
                controller.AllowEditing = true;

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

                controller.PinnedWatch = watch;
                valueTree = null;

                if (objectValue != null)
                {
                    controller.AddValue(objectValue);
                }
            }
            else
            {
                valueTree                = new ObjectValueTreeView();
                valueTree.AllowAdding    = false;
                valueTree.AllowEditing   = true;
                valueTree.AllowPinning   = true;
                valueTree.HeadersVisible = false;
                valueTree.CompactView    = true;
                valueTree.PinnedWatch    = watch;
                if (objectValue != null)
                {
                    valueTree.AddValue(objectValue);
                }

                treeView   = valueTree;
                controller = null;
            }

            treeView.ButtonPressEvent   += HandleValueTreeButtonPressEvent;
            treeView.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
            treeView.MotionNotifyEvent  += HandleValueTreeMotionNotifyEvent;
            treeView.SizeAllocated      += OnTreeSizeChanged;

            sw = new ScrolledWindow();
            sw.HscrollbarPolicy = PolicyType.Never;
            sw.VscrollbarPolicy = PolicyType.Never;
            sw.Add(treeView);

            var fr = new Frame();

            fr.ShadowType = ShadowType.Out;
            fr.Add(sw);
            Add(fr);

            ShowAll();

            DebuggingService.PausedEvent  += HandleDebuggingServicePausedEvent;
            DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
        }
Exemplo n.º 3
0
        public PinnedWatchWidget(TextEditor editor, PinnedWatch watch)
        {
            objectValue = watch.Value;
            Editor      = editor;
            Watch       = watch;

            valueTree                = new ObjectValueTreeView();
            valueTree.AllowAdding    = false;
            valueTree.AllowEditing   = true;
            valueTree.AllowPinning   = true;
            valueTree.HeadersVisible = false;
            valueTree.CompactView    = true;
            valueTree.PinnedWatch    = watch;
            if (objectValue != null)
            {
                valueTree.AddValue(objectValue);
            }

            valueTree.ButtonPressEvent   += HandleValueTreeButtonPressEvent;
            valueTree.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
            valueTree.MotionNotifyEvent  += HandleValueTreeMotionNotifyEvent;

            Gtk.Frame fr = new Gtk.Frame();
            fr.ShadowType = Gtk.ShadowType.Out;
            fr.Add(valueTree);
            Add(fr);
            HandleEditorOptionsChanged(null, null);
            ShowAll();
            //unpin.Hide ();
            Editor.EditorOptionsChanged += HandleEditorOptionsChanged;

            DebuggingService.PausedEvent  += HandleDebuggingServicePausedEvent;
            DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
        }
		public PinnedWatchWidget (TextEditor editor, PinnedWatch watch)
		{
			objectValue = watch.Value;
			Editor = editor;
			Watch = watch;

			valueTree = new ObjectValueTreeView ();
			valueTree.AllowAdding = false;
			valueTree.AllowEditing = true;
			valueTree.AllowPinning = true;
			valueTree.HeadersVisible = false;
			valueTree.CompactView = true;
			valueTree.PinnedWatch = watch;
			if (objectValue != null)
				valueTree.AddValue (objectValue);
			
			valueTree.ButtonPressEvent += HandleValueTreeButtonPressEvent;
			valueTree.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
			valueTree.MotionNotifyEvent += HandleValueTreeMotionNotifyEvent;
			
			Gtk.Frame fr = new Gtk.Frame ();
			fr.ShadowType = Gtk.ShadowType.Out;
			fr.Add (valueTree);
			Add (fr);
			HandleEditorOptionsChanged (null, null);
			ShowAll ();
			//unpin.Hide ();
			Editor.EditorOptionsChanged += HandleEditorOptionsChanged;
			
			DebuggingService.PausedEvent += HandleDebuggingServicePausedEvent;
			DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
		}
Exemplo n.º 5
0
//		PinWindow pinWindow;
//		TreeIter currentPinIter;

        public DebugValueWindow(Mono.TextEditor.TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch) : base(Gtk.WindowType.Toplevel)
        {
            this.TypeHint    = WindowTypeHint.PopupMenu;
            this.AllowShrink = false;
            this.AllowGrow   = false;
            this.Decorated   = false;

            TransientFor = (Gtk.Window)editor.Toplevel;

            // 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;

            tree = new ObjectValueTreeView();
            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;
            DocumentLocation location = editor.Document.OffsetToLocation(offset);

            tree.PinnedWatchLine = location.Line;
            tree.PinnedWatchFile = ((ExtensibleTextEditor)editor).View.ContentName;

            tree.AddValue(value);
            tree.Selection.UnselectAll();
            tree.SizeAllocated    += OnTreeSizeChanged;
            tree.PinStatusChanged += delegate {
                Destroy();
            };

//			tree.MotionNotifyEvent += HandleTreeMotionNotifyEvent;

            sw.ShowAll();

//			pinWindow = new PinWindow (this);
//			pinWindow.SetPinned (false);
//			pinWindow.ButtonPressEvent += HandlePinWindowButtonPressEvent;

            tree.StartEditing += delegate {
                Modal = true;
            };

            tree.EndEditing += delegate {
                Modal = false;
            };

            ShowArrow          = true;
            Theme.CornerRadius = 3;
        }
Exemplo n.º 6
0
		public DebugValueWindow (Mono.TextEditor.TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch)
		{
			TransientFor = (Gtk.Window) editor.Toplevel;
			
			// 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;
			
			tree = new ObjectValueTreeView ();
			sw.Add (tree);
			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;
			DocumentLocation location = editor.Document.OffsetToLocation (offset);
			tree.PinnedWatchLine = location.Line;
			tree.PinnedWatchFile = ((ExtensibleTextEditor)editor).View.ContentName;
			
			tree.AddValue (value);
			tree.Selection.UnselectAll ();
			tree.SizeAllocated += OnTreeSizeChanged;
			tree.PinStatusChanged += delegate {
				Destroy ();
			};
			
//			tree.MotionNotifyEvent += HandleTreeMotionNotifyEvent;
			
			sw.ShowAll ();
			
//			pinWindow = new PinWindow (this);
//			pinWindow.SetPinned (false);
//			pinWindow.ButtonPressEvent += HandlePinWindowButtonPressEvent;
			
			tree.StartEditing += delegate {
				Modal = true;
			};
			
			tree.EndEditing += delegate {
				Modal = false;
			};
		}
Exemplo n.º 7
0
        public DebugValueWindow(TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch) : base(Gtk.WindowType.Toplevel)
        {
            this.TypeHint    = WindowTypeHint.PopupMenu;
            this.AllowShrink = false;
            this.AllowGrow   = false;
            this.Decorated   = false;

            TransientFor = (Gtk.Window)(editor.GetNativeWidget <Gtk.Widget> ()).Toplevel;
            // 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;
            var location = editor.OffsetToLocation(offset);

            tree.PinnedWatchLine = location.Line;
            tree.PinnedWatchFile = editor.FileName;

            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;
        }
Exemplo n.º 8
0
        public DebugValueWindow(Mono.TextEditor.TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch)
        {
            TransientFor = (Gtk.Window)editor.Toplevel;

            // 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;

            tree = new ObjectValueTreeView();
            sw.Add(tree);
            Add(sw);

            tree.Frame          = frame;
            tree.CompactView    = true;
            tree.AllowAdding    = false;
            tree.AllowEditing   = true;
            tree.HeadersVisible = false;
            tree.AllowPinning   = true;
            tree.PinnedWatch    = watch;
            DocumentLocation location = editor.Document.OffsetToLocation(offset);

            tree.PinnedWatchLine = location.Line + 1;
            tree.PinnedWatchFile = ((ExtensibleTextEditor)editor).View.ContentName;

            tree.AddValue(value);
            tree.Selection.UnselectAll();
            tree.SizeAllocated    += OnTreeSizeChanged;
            tree.PinStatusChanged += delegate {
                Destroy();
            };

            sw.ShowAll();

            tree.StartEditing += delegate {
                Modal = true;
            };

            tree.EndEditing += delegate {
                Modal = false;
            };
        }
        public PinnedWatchWidget(MonoTextEditor editor, PinnedWatch watch)
        {
            objectValue = watch.Value;
            Editor      = editor;
            Watch       = watch;

            valueTree                = new ObjectValueTreeView();
            valueTree.AllowAdding    = false;
            valueTree.AllowEditing   = true;
            valueTree.AllowPinning   = true;
            valueTree.HeadersVisible = false;
            valueTree.CompactView    = true;
            valueTree.PinnedWatch    = watch;
            if (objectValue != null)
            {
                valueTree.AddValue(objectValue);
            }

            valueTree.ButtonPressEvent   += HandleValueTreeButtonPressEvent;
            valueTree.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
            valueTree.MotionNotifyEvent  += HandleValueTreeMotionNotifyEvent;
            valueTree.SizeAllocated      += OnTreeSizeChanged;

            sw = new ScrolledWindow();
            sw.HscrollbarPolicy = PolicyType.Never;
            sw.VscrollbarPolicy = PolicyType.Never;
            sw.Add(valueTree);

            Frame fr = new Frame();

            fr.ShadowType = ShadowType.Out;
            fr.Add(sw);
            Add(fr);

            ShowAll();

            DebuggingService.PausedEvent  += HandleDebuggingServicePausedEvent;
            DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
        }
Exemplo n.º 10
0
		public PinnedWatchWidget (TextEditor editor, PinnedWatch watch)
		{
			objectValue = watch.Value;
			Editor = editor;
			Watch = watch;

			valueTree = new ObjectValueTreeView ();
			valueTree.AllowAdding = false;
			valueTree.AllowEditing = true;
			valueTree.AllowPinning = true;
			valueTree.HeadersVisible = false;
			valueTree.CompactView = true;
			valueTree.PinnedWatch = watch;
			if (objectValue != null)
				valueTree.AddValue (objectValue);
			
			valueTree.ButtonPressEvent += HandleValueTreeButtonPressEvent;
			valueTree.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
			valueTree.MotionNotifyEvent += HandleValueTreeMotionNotifyEvent;
			valueTree.SizeAllocated += OnTreeSizeChanged;

			sw = new ScrolledWindow ();
			sw.HscrollbarPolicy = PolicyType.Never;
			sw.VscrollbarPolicy = PolicyType.Never;
			sw.Add (valueTree);

			Frame fr = new Frame ();
			fr.ShadowType = ShadowType.Out;
			fr.Add (sw);
			Add (fr);

			ShowAll ();
			
			DebuggingService.PausedEvent += HandleDebuggingServicePausedEvent;
			DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
		}
Exemplo n.º 11
0
		Widget CreateExceptionValueTreeView ()
		{
			ExceptionValueTreeView = new ObjectValueTreeView ();
			ExceptionValueTreeView.Frame = DebuggingService.CurrentFrame;
			ExceptionValueTreeView.ModifyBase (StateType.Normal, new Gdk.Color (223, 228, 235));
			ExceptionValueTreeView.AllowExpanding = true;
			ExceptionValueTreeView.AllowPinning = false;
			ExceptionValueTreeView.AllowEditing = false;
			ExceptionValueTreeView.AllowAdding = false;
			ExceptionValueTreeView.RulesHint = false;

			ExceptionValueTreeView.Show ();

			var scrolled = new ScrolledWindow () { HeightRequest = 128 };
			scrolled.ShadowType = ShadowType.None;
			scrolled.Add (ExceptionValueTreeView);
			scrolled.Show ();

			return scrolled;
		}
Exemplo n.º 12
0
		public DebugValueWindow (TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch) : base (Gtk.WindowType.Toplevel)
		{
			this.TypeHint = WindowTypeHint.PopupMenu;
			this.AllowShrink = false;
			this.AllowGrow = false;
			this.Decorated = false;

			TransientFor = (Gtk.Window) ((Gtk.Widget)editor).Toplevel;
			// 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;

			tree = new ObjectValueTreeView ();
			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;
			var location = editor.OffsetToLocation (offset);
			tree.PinnedWatchLine = location.Line;
			tree.PinnedWatchFile = editor.FileName;

			tree.AddValue (value);
			tree.Selection.UnselectAll ();
			tree.SizeAllocated += OnTreeSizeChanged;
			tree.PinStatusChanged += delegate {
				Destroy ();
			};

			sw.ShowAll ();

			tree.StartEditing += delegate {
				Modal = true;
			};

			tree.EndEditing += delegate {
				Modal = false;
			};

			ShowArrow = true;
			Theme.CornerRadius = 3;
		}
Exemplo n.º 13
0
		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;
		}
Exemplo n.º 14
0
		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, HscrollbarPolicy = PolicyType.Automatic, VscrollbarPolicy = PolicyType.Automatic };

			scrolled.ShadowType = ShadowType.None;
			scrolled.Add (ExceptionValueTreeView);
			scrolled.Show ();

			return scrolled;
		}