From 357653ecc9d9bb6f6f7693dca53b461ecd5970f9 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 16 Jun 2006 13:05:11 +0000 Subject: [PATCH] Applied custom quick class browser patch by Robert Zaunere. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1481 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Gui/Editor/SharpDevelopTextAreaControl.cs | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs index 8d6440fbb5..3db4ec853b 100644 --- a/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs +++ b/src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs @@ -34,6 +34,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor readonly static string advancedHighlighterPath = "/AddIns/DefaultTextEditor/AdvancedHighlighter"; QuickClassBrowserPanel quickClassBrowserPanel = null; + Control customQuickClassBrowserPanel = null; ErrorDrawer errorDrawer; IAdvancedHighlighter advancedHighlighter; @@ -42,6 +43,19 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor return quickClassBrowserPanel; } } + public Control CustomQuickClassBrowserPanel { + get { + return customQuickClassBrowserPanel; + } + set { + if (customQuickClassBrowserPanel != null) { + RemoveQuickClassBrowserPanel(); + customQuickClassBrowserPanel.Dispose(); + } + customQuickClassBrowserPanel = value; + ActivateQuickClassBrowserOnDemand(); + } + } public SharpDevelopTextAreaControl() { @@ -101,6 +115,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor quickClassBrowserPanel.Dispose(); quickClassBrowserPanel = null; } + if (customQuickClassBrowserPanel != null) { + customQuickClassBrowserPanel.Dispose(); + customQuickClassBrowserPanel = null; + } if (advancedHighlighter != null) { advancedHighlighter.Dispose(); advancedHighlighter = null; @@ -189,6 +207,13 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor quickClassBrowserPanel = null; textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.None; } + if (customQuickClassBrowserPanel != null) { + if (Controls.Contains(customQuickClassBrowserPanel)) { + Controls.Remove(customQuickClassBrowserPanel); + customQuickClassBrowserPanel.Enabled = false; + textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.None; + } + } } void ShowQuickClassBrowserPanel() { @@ -197,6 +222,16 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor Controls.Add(quickClassBrowserPanel); textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; } + if (customQuickClassBrowserPanel != null) { + if (quickClassBrowserPanel != null) + RemoveQuickClassBrowserPanel(); + if (!Controls.Contains(customQuickClassBrowserPanel)) { + Controls.Add(customQuickClassBrowserPanel); + customQuickClassBrowserPanel.Enabled = true; + textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + } + return; + } } public void ActivateQuickClassBrowserOnDemand() {