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 = false; 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(); }; 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; }; }
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 = false; 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 (); }; 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; }; }