コード例 #1
0
 void Init()
 {
     changer = new PadFontChanger(this,
                                  delegate(Pango.FontDescription desc) { textRenderer.FontDesc = desc; },
                                  ColumnsAutosize);
     MonoDevelop.Components.GtkUtil.EnableAutoTooltips(this);
 }
コード例 #2
0
ファイル: PadTreeView.cs プロジェクト: nieve/monodevelop
		void Init ()
		{
			changer = new PadFontChanger (this,
				delegate (Pango.FontDescription desc) { textRenderer.FontDesc = desc; },
				ColumnsAutosize);
			MonoDevelop.Components.GtkUtil.EnableAutoTooltips (this);
		}
コード例 #3
0
        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;
        }
コード例 #4
0
        public FileScout()
        {
            string path = IdeApp.ProjectOperations.ProjectsDefaultPath;

            if (Directory.Exists(path))
            {
                fb.CurrentDir = path;
            }

            fb.DirectoryChangedEvent += new DirectoryChangedEventHandler(OnDirChanged);
            filelister.RowActivated  += new Gtk.RowActivatedHandler(FileSelected);
            IdeApp.Workspace.FirstWorkspaceItemOpened += OnCombineOpened;
            IdeApp.Workspace.LastWorkspaceItemClosed  += OnCombineClosed;

            Gtk.ScrolledWindow listsw = new Gtk.ScrolledWindow();
            listsw.Add(filelister);

            fontChanger = new PadFontChanger(listsw, delegate(Pango.FontDescription desc)
            {
                filelister.SetCustomFont(desc);
                fb.SetCustomFont(desc);
            }, delegate()
            {
                filelister.ColumnsAutosize();
                fb.ColumnsAutosize();
            });

            this.Pack1(fb, true, true);
            this.Pack2(listsw, true, true);

            fb.SelectFirst();

            OnDirChanged(fb.CurrentDir);
            this.ShowAll();
        }
コード例 #5
0
        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;
        }
コード例 #6
0
ファイル: PadTreeView.cs プロジェクト: nieve/monodevelop
		protected override void OnDestroyed ()
		{
			if (changer != null) {
				changer.Dispose ();
				changer = null;
			}
			base.Dispose ();
		}
コード例 #7
0
		protected override void OnDestroyed ()
		{
			if (changer != null) {
				changer.Dispose ();
				changer = null;
			}
			renderers.Clear ();
			base.OnDestroyed ();
		}
コード例 #8
0
 protected override void OnDestroyed()
 {
     if (changer != null)
     {
         changer.Dispose();
         changer = null;
     }
     base.Dispose();
 }
コード例 #9
0
ファイル: PadTreeView.cs プロジェクト: noah1510/dotdevelop
 protected override void OnDestroyed()
 {
     if (changer != null)
     {
         changer.Dispose();
         changer = null;
     }
     renderers.Clear();
     base.OnDestroyed();
 }
コード例 #10
0
        public void Dispose()
        {
            if (fontChanger == null)
            {
                return;
            }

            fontChanger.Dispose();
            fontChanger = null;
            DebuggingService.CurrentFrameChanged      -= OnFrameChanged;
            DebuggingService.PausedEvent              -= OnDebuggerPaused;
            DebuggingService.ResumedEvent             -= OnDebuggerResumed;
            DebuggingService.StoppedEvent             -= OnDebuggerStopped;
            DebuggingService.EvaluationOptionsChanged -= OnEvaluationOptionsChanged;
        }
コード例 #11
0
ファイル: PadTreeView.cs プロジェクト: noah1510/dotdevelop
        void Init()
        {
            changer = new PadFontChanger(this,
                                         delegate(Pango.FontDescription desc) {
                textRenderer.FontDesc = desc;
                foreach (var renderer in renderers)
                {
                    renderer.FontDesc = desc;
                }
            }, ColumnsAutosize);
            MonoDevelop.Components.GtkUtil.EnableAutoTooltips(this);

            EnableSearch = false;
            SearchColumn = -1;

            AddNotification("model", ResetSearchColumn);
        }
コード例 #12
0
        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;
        }
コード例 #13
0
        public override void Dispose()
        {
            if (disposed)
            {
                return;
            }

            if (fontChanger != null)
            {
                fontChanger.Dispose();
                fontChanger = null;
            }

            disposed = true;

            DebuggingService.CurrentFrameChanged      -= OnFrameChanged;
            DebuggingService.PausedEvent              -= OnDebuggerPaused;
            DebuggingService.ResumedEvent             -= OnDebuggerResumed;
            DebuggingService.StoppedEvent             -= OnDebuggerStopped;
            DebuggingService.EvaluationOptionsChanged -= OnEvaluationOptionsChanged;
            DebuggingService.VariableChanged          -= OnVariableChanged;

            base.Dispose();
        }
コード例 #14
0
        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;
        }