From d814e6235ce17f58e872dacfb0938ee50109c464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Sat, 22 Jan 2005 16:16:16 +0000 Subject: [PATCH] updated dockpanel suite. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@58 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- AddIns/ICSharpCode.SharpDevelop.addin | 2 +- .../DockPanel_Src/DockSample/AboutDialog.cs | 4 +- .../DockSample/DockSample.csproj | 2 + .../DockSample/Images/XmlFile.ico | Bin 0 -> 318 bytes .../DockPanel_Src/DockSample/MainForm.cs | 137 ++++++++- .../DockPanel_Src/DockSample/MainForm.resx | 98 +++++-- .../DockSample/Resources/DockPanel.xml | Bin 0 -> 9554 bytes src/Libraries/DockPanel_Src/WinFormsUI.ndoc | 39 +++ src/Libraries/DockPanel_Src/WinFormsUI.suo | Bin 10752 -> 9216 bytes .../DockPanel_Src/WinFormsUI/AssemblyInfo.cs | 4 +- .../Controls/CodeDoc/InertButton.xml | 75 +++++ .../WinFormsUI/{ => Controls}/InertButton.cs | 24 ++ .../{ => Docking}/AutoHideWindow.cs | 1 + .../{ => Docking}/AutoHideWindowSplitter.cs | 0 .../Docking/CodeDoc/DisplayingDockList.xml | 73 +++++ .../Docking/CodeDoc/DockContent.xml | 203 +++++++++++++ .../Docking/CodeDoc/DockContentCollection.xml | 46 +++ .../WinFormsUI/Docking/CodeDoc/DockList.xml | 86 ++++++ .../WinFormsUI/Docking/CodeDoc/DockPane.xml | 276 ++++++++++++++++++ .../Docking/CodeDoc/DockPaneCollection.xml | 45 +++ .../WinFormsUI/Docking/CodeDoc/DockPanel.xml | 238 +++++++++++++++ .../WinFormsUI/Docking/CodeDoc/DockWindow.xml | 48 +++ .../Docking/CodeDoc/DockWindowCollection.xml | 14 + .../WinFormsUI/Docking/CodeDoc/Enums.xml | 88 ++++++ .../WinFormsUI/Docking/CodeDoc/EventArgs.xml | 18 ++ .../Docking/CodeDoc/FloatWindow.xml | 66 +++++ .../Docking/CodeDoc/FloatWindowCollection.xml | 45 +++ .../WinFormsUI/Docking/CodeDoc/Interfaces.xml | 89 ++++++ .../Docking/CodeDoc/NestedDockingStatus.xml | 60 ++++ .../{ => Docking}/DisplayingDockList.cs | 36 +-- .../{ => Docking}/DockAreasEditor.cs | 0 .../WinFormsUI/{ => Docking}/DockContent.cs | 157 +++++++--- .../{ => Docking}/DockContentCollection.cs | 6 +- .../WinFormsUI/{ => Docking}/DockHelper.cs | 3 - .../WinFormsUI/{ => Docking}/DockList.cs | 11 +- .../WinFormsUI/{ => Docking}/DockPane.cs | 162 ++++++---- .../{ => Docking}/DockPaneCollection.cs | 4 + .../{ => Docking}/DockPaneSplitter.cs | 0 .../WinFormsUI/{ => Docking}/DockPanel.cs | 76 +++-- .../{ => Docking}/DockPanelPersist.cs | 0 .../WinFormsUI/{ => Docking}/DockWindow.cs | 10 + .../{ => Docking}/DockWindowCollection.cs | 2 + .../{ => Docking}/DockWindowSplitter.cs | 0 .../WinFormsUI/{ => Docking}/DragHandler.cs | 0 .../{ => Docking}/DragHandlerBase.cs | 0 .../WinFormsUI/{ => Docking}/DummyControl.cs | 0 .../DockPanel_Src/WinFormsUI/Docking/Enums.cs | 78 +++++ .../WinFormsUI/{ => Docking}/EventArgs.cs | 5 +- .../WinFormsUI/{ => Docking}/FloatWindow.cs | 21 +- .../{ => Docking}/FloatWindowCollection.cs | 7 +- .../{ => Docking}/HiddenMdiChild.cs | 3 - .../WinFormsUI/Docking/Interfaces.cs | 92 ++++++ .../WinFormsUI/{ => Docking}/Measures.cs | 0 .../{ => Docking}/NestedDockingStatus.cs | 13 + .../WinFormsUI/{ => Docking}/SplitterBase.cs | 0 .../DockPanel_Src/WinFormsUI/Enums.cs | 60 ---- .../WinFormsUI/{ => Helpers}/DrawHelper.cs | 3 - .../{ => Helpers}/LocalWindowsHook.cs | 0 .../WinFormsUI/{ => Helpers}/Localization.cs | 0 .../{ => Helpers}/ResourceHelper.cs | 4 - .../DockPanel_Src/WinFormsUI/Interfaces.cs | 69 ----- .../DockPanel_Src/WinFormsUI/Strings.ResX | 9 + .../DockPanel_Src/WinFormsUI/Win32/User32.cs | 1 - .../WinFormsUI/WinFormsUI.csproj | 147 +++++++--- .../WinFormsUI/WinFormsUI.csproj.user | 32 +- .../Project/Src/Actions/BookmarkActions.cs | 4 +- .../Project/Src/Actions/MiscActions.cs | 4 +- 67 files changed, 2417 insertions(+), 383 deletions(-) create mode 100644 src/Libraries/DockPanel_Src/DockSample/Images/XmlFile.ico create mode 100644 src/Libraries/DockPanel_Src/DockSample/Resources/DockPanel.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI.ndoc create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Controls/CodeDoc/InertButton.xml rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Controls}/InertButton.cs (86%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/AutoHideWindow.cs (99%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/AutoHideWindowSplitter.cs (100%) create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DisplayingDockList.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContent.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContentCollection.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockList.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPane.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPaneCollection.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPanel.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindow.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindowCollection.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Enums.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/EventArgs.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindow.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindowCollection.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Interfaces.xml create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/NestedDockingStatus.xml rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DisplayingDockList.cs (84%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockAreasEditor.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockContent.cs (72%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockContentCollection.cs (76%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockHelper.cs (98%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockList.cs (76%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockPane.cs (87%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockPaneCollection.cs (76%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockPaneSplitter.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockPanel.cs (86%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockPanelPersist.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockWindow.cs (81%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockWindowCollection.cs (86%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DockWindowSplitter.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DragHandler.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DragHandlerBase.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/DummyControl.cs (100%) create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/Enums.cs rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/EventArgs.cs (62%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/FloatWindow.cs (78%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/FloatWindowCollection.cs (70%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/HiddenMdiChild.cs (95%) create mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Docking/Interfaces.cs rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/Measures.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/NestedDockingStatus.cs (61%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Docking}/SplitterBase.cs (100%) delete mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Enums.cs rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Helpers}/DrawHelper.cs (98%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Helpers}/LocalWindowsHook.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Helpers}/Localization.cs (100%) rename src/Libraries/DockPanel_Src/WinFormsUI/{ => Helpers}/ResourceHelper.cs (93%) delete mode 100644 src/Libraries/DockPanel_Src/WinFormsUI/Interfaces.cs diff --git a/AddIns/ICSharpCode.SharpDevelop.addin b/AddIns/ICSharpCode.SharpDevelop.addin index 2a229d17ee..ec86b20b40 100644 --- a/AddIns/ICSharpCode.SharpDevelop.addin +++ b/AddIns/ICSharpCode.SharpDevelop.addin @@ -1800,4 +1800,4 @@ tooltip = "Search" class = "SearchAndReplace.FindComboBox"/> - + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/DockSample/AboutDialog.cs b/src/Libraries/DockPanel_Src/DockSample/AboutDialog.cs index ea1ba0329d..4232162e3a 100644 --- a/src/Libraries/DockPanel_Src/DockSample/AboutDialog.cs +++ b/src/Libraries/DockPanel_Src/DockSample/AboutDialog.cs @@ -74,7 +74,7 @@ namespace DockSample this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(272, 16); this.label1.TabIndex = 1; - this.label1.Text = "DockSample, Version 1.1"; + this.label1.Text = "DockSample, Version 1.2"; // // label2 // @@ -82,7 +82,7 @@ namespace DockSample this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(272, 32); this.label2.TabIndex = 2; - this.label2.Text = "Copyright 2003, Weifen Luo"; + this.label2.Text = "Copyright 2003 - 2005, Weifen Luo"; // // AboutDialog // diff --git a/src/Libraries/DockPanel_Src/DockSample/DockSample.csproj b/src/Libraries/DockPanel_Src/DockSample/DockSample.csproj index fee1cfd94c..3f0446cf2b 100644 --- a/src/Libraries/DockPanel_Src/DockSample/DockSample.csproj +++ b/src/Libraries/DockPanel_Src/DockSample/DockSample.csproj @@ -169,6 +169,7 @@ OptionsDialog.cs + @@ -190,6 +191,7 @@ + diff --git a/src/Libraries/DockPanel_Src/DockSample/Images/XmlFile.ico b/src/Libraries/DockPanel_Src/DockSample/Images/XmlFile.ico new file mode 100644 index 0000000000000000000000000000000000000000..7c00c79fa822ba74aefddf4655dbb6d2dfad9dac GIT binary patch literal 318 zcmb79D-HrN5PeNZMj%>+-mF5w6$lsDtKhJe>$p;n)U4UM;k_0lf|ze%mdrH2qa!3C6FC5u#MAZJk8w?&>B>(^b literal 0 HcmV?d00001 diff --git a/src/Libraries/DockPanel_Src/DockSample/MainForm.cs b/src/Libraries/DockPanel_Src/DockSample/MainForm.cs index 1bff201c71..efcd61c04a 100644 --- a/src/Libraries/DockPanel_Src/DockSample/MainForm.cs +++ b/src/Libraries/DockPanel_Src/DockSample/MainForm.cs @@ -12,6 +12,7 @@ using System; using System.Drawing; using System.Collections; using System.ComponentModel; +using System.Reflection; using System.Windows.Forms; using System.Data; using System.IO; @@ -24,6 +25,7 @@ namespace DockSample /// public class MainForm : System.Windows.Forms.Form { + private DeserializeDockContent m_deserializeDockContent; private DummySolutionExplorer m_solutionExplorer = new DummySolutionExplorer(); private DummyPropertyWindow m_propertyWindow = new DummyPropertyWindow(); private DummyToolbox m_toolbox = new DummyToolbox(); @@ -53,7 +55,6 @@ namespace DockSample private System.Windows.Forms.ImageList imageList; private System.Windows.Forms.ToolBarButton toolBarButtonNew; private System.Windows.Forms.ToolBarButton toolBarButtonOpen; - private System.Windows.Forms.ToolBarButton toolBarButtonSeparator; private System.Windows.Forms.ToolBarButton toolBarButtonSolutionExplorer; private System.Windows.Forms.ToolBarButton toolBarButtonPropertyWindow; private System.Windows.Forms.ToolBarButton toolBarButtonToolbox; @@ -66,10 +67,18 @@ namespace DockSample private System.Windows.Forms.MenuItem menuItemNewWindow; private WeifenLuo.WinFormsUI.DockPanel dockPanel; private System.Windows.Forms.MenuItem menuItemLockLayout; + private System.Windows.Forms.MenuItem menuItem2; + private System.Windows.Forms.ToolBarButton toolBarButtonSeparator1; + private System.Windows.Forms.ToolBarButton toolBarButtonSeparator2; + private System.Windows.Forms.MenuItem menuItemLayoutByCode; + private System.Windows.Forms.ToolBarButton toolBarButtonLayoutByCode; + private System.Windows.Forms.MenuItem menuItemLayoutByXml; + private System.Windows.Forms.ToolBarButton toolBarButtonLayoutByXml; private System.ComponentModel.IContainer components; public MainForm() { + m_deserializeDockContent = new DeserializeDockContent(GetContentFromPersistString); // // Required for Windows Form Designer support // @@ -121,6 +130,9 @@ namespace DockSample this.menuItem1 = new System.Windows.Forms.MenuItem(); this.menuItemToolBar = new System.Windows.Forms.MenuItem(); this.menuItemStatusBar = new System.Windows.Forms.MenuItem(); + this.menuItem2 = new System.Windows.Forms.MenuItem(); + this.menuItemLayoutByCode = new System.Windows.Forms.MenuItem(); + this.menuItemLayoutByXml = new System.Windows.Forms.MenuItem(); this.menuItemTools = new System.Windows.Forms.MenuItem(); this.menuItemLockLayout = new System.Windows.Forms.MenuItem(); this.menuItemOptions = new System.Windows.Forms.MenuItem(); @@ -134,12 +146,15 @@ namespace DockSample this.toolBar = new System.Windows.Forms.ToolBar(); this.toolBarButtonNew = new System.Windows.Forms.ToolBarButton(); this.toolBarButtonOpen = new System.Windows.Forms.ToolBarButton(); - this.toolBarButtonSeparator = new System.Windows.Forms.ToolBarButton(); + this.toolBarButtonSeparator1 = new System.Windows.Forms.ToolBarButton(); this.toolBarButtonSolutionExplorer = new System.Windows.Forms.ToolBarButton(); this.toolBarButtonPropertyWindow = new System.Windows.Forms.ToolBarButton(); this.toolBarButtonToolbox = new System.Windows.Forms.ToolBarButton(); this.toolBarButtonOutputWindow = new System.Windows.Forms.ToolBarButton(); this.toolBarButtonTaskList = new System.Windows.Forms.ToolBarButton(); + this.toolBarButtonSeparator2 = new System.Windows.Forms.ToolBarButton(); + this.toolBarButtonLayoutByCode = new System.Windows.Forms.ToolBarButton(); + this.toolBarButtonLayoutByXml = new System.Windows.Forms.ToolBarButton(); this.SuspendLayout(); // // mainMenu @@ -210,7 +225,10 @@ namespace DockSample this.menuItemTaskList, this.menuItem1, this.menuItemToolBar, - this.menuItemStatusBar}); + this.menuItemStatusBar, + this.menuItem2, + this.menuItemLayoutByCode, + this.menuItemLayoutByXml}); this.menuItemView.MergeOrder = 1; this.menuItemView.Text = "&View"; // @@ -264,6 +282,23 @@ namespace DockSample this.menuItemStatusBar.Text = "Status B&ar"; this.menuItemStatusBar.Click += new System.EventHandler(this.menuItemStatusBar_Click); // + // menuItem2 + // + this.menuItem2.Index = 8; + this.menuItem2.Text = "-"; + // + // menuItemLayoutByCode + // + this.menuItemLayoutByCode.Index = 9; + this.menuItemLayoutByCode.Text = "Layout By &Code"; + this.menuItemLayoutByCode.Click += new System.EventHandler(this.menuItemLayoutByCode_Click); + // + // menuItemLayoutByXml + // + this.menuItemLayoutByXml.Index = 10; + this.menuItemLayoutByXml.Text = "Layout By &XML"; + this.menuItemLayoutByXml.Click += new System.EventHandler(this.menuItemLayoutByXml_Click); + // // menuItemTools // this.menuItemTools.Index = 2; @@ -345,12 +380,15 @@ namespace DockSample this.toolBar.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] { this.toolBarButtonNew, this.toolBarButtonOpen, - this.toolBarButtonSeparator, + this.toolBarButtonSeparator1, this.toolBarButtonSolutionExplorer, this.toolBarButtonPropertyWindow, this.toolBarButtonToolbox, this.toolBarButtonOutputWindow, - this.toolBarButtonTaskList}); + this.toolBarButtonTaskList, + this.toolBarButtonSeparator2, + this.toolBarButtonLayoutByCode, + this.toolBarButtonLayoutByXml}); this.toolBar.DropDownArrows = true; this.toolBar.ImageList = this.imageList; this.toolBar.Location = new System.Drawing.Point(0, 0); @@ -363,16 +401,16 @@ namespace DockSample // toolBarButtonNew // this.toolBarButtonNew.ImageIndex = 0; - this.toolBarButtonNew.ToolTipText = "New"; + this.toolBarButtonNew.ToolTipText = "Show Layout From XML"; // // toolBarButtonOpen // this.toolBarButtonOpen.ImageIndex = 1; this.toolBarButtonOpen.ToolTipText = "Open"; // - // toolBarButtonSeparator + // toolBarButtonSeparator1 // - this.toolBarButtonSeparator.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; + this.toolBarButtonSeparator1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; // // toolBarButtonSolutionExplorer // @@ -399,6 +437,19 @@ namespace DockSample this.toolBarButtonTaskList.ImageIndex = 6; this.toolBarButtonTaskList.ToolTipText = "Task List"; // + // toolBarButtonSeparator2 + // + this.toolBarButtonSeparator2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; + // + // toolBarButtonLayoutByCode + // + this.toolBarButtonLayoutByCode.ImageIndex = 7; + this.toolBarButtonLayoutByCode.ToolTipText = "Show Layout By Code"; + // + // toolBarButtonLayoutByXml + // + this.toolBarButtonLayoutByXml.ImageIndex = 8; + // // MainForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); @@ -476,6 +527,12 @@ namespace DockSample } private void menuItemNew_Click(object sender, System.EventArgs e) + { + DummyDoc dummyDoc = CreateNewDocument(); + dummyDoc.Show(dockPanel); + } + + private DummyDoc CreateNewDocument() { DummyDoc dummyDoc = new DummyDoc(); @@ -487,7 +544,14 @@ namespace DockSample text = "Document" + count.ToString(); } dummyDoc.Text = text; - dummyDoc.Show(dockPanel); + return dummyDoc; + } + + private DummyDoc CreateNewDocument(string text) + { + DummyDoc dummyDoc = new DummyDoc(); + dummyDoc.Text = text; + return dummyDoc; } private void menuItemOpen_Click(object sender, System.EventArgs e) @@ -539,6 +603,11 @@ namespace DockSample } private void menuItemCloseAll_Click(object sender, System.EventArgs e) + { + CloseAllDocuments(); + } + + private void CloseAllDocuments() { foreach (DockContent content in dockPanel.Documents) content.Close(); @@ -619,7 +688,7 @@ namespace DockSample string configFile = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.config"); if (File.Exists(configFile)) - dockPanel.LoadFromXml(configFile, new DeserializeDockContent(GetContentFromPersistString)); + dockPanel.LoadFromXml(configFile, m_deserializeDockContent); } private void MainForm_Closing(object sender, System.ComponentModel.CancelEventArgs e) @@ -654,6 +723,10 @@ namespace DockSample menuItemOutputWindow_Click(null, null); else if (e.Button == toolBarButtonTaskList) menuItemTaskList_Click(null, null); + else if (e.Button == toolBarButtonLayoutByCode) + menuItemLayoutByCode_Click(null, null); + else if (e.Button == toolBarButtonLayoutByXml) + menuItemLayoutByXml_Click(null, null); } private void menuItemNewWindow_Click(object sender, System.EventArgs e) @@ -671,7 +744,49 @@ namespace DockSample private void menuItemLockLayout_Click(object sender, System.EventArgs e) { dockPanel.AllowRedocking = !dockPanel.AllowRedocking; - + } + + private void menuItemLayoutByCode_Click(object sender, System.EventArgs e) + { + m_solutionExplorer.Show(dockPanel, DockState.DockRight); + m_propertyWindow.Show(m_solutionExplorer.Pane, m_solutionExplorer); + m_toolbox.Show(dockPanel, new Rectangle(98, 133, 200, 383)); + m_outputWindow.Show(m_solutionExplorer.Pane, DockAlignment.Bottom, 0.35); + m_taskList.Show(m_toolbox.Pane, DockAlignment.Left, 0.4); + + CloseAllDocuments(); + DummyDoc doc1 = CreateNewDocument("Document1"); + DummyDoc doc2 = CreateNewDocument("Document2"); + DummyDoc doc3 = CreateNewDocument("Document3"); + DummyDoc doc4 = CreateNewDocument("Document4"); + doc1.Show(dockPanel, DockState.Document); + doc2.Show(doc1.Pane, null); + doc3.Show(doc1.Pane, DockAlignment.Bottom, 0.5); + doc4.Show(doc3.Pane, DockAlignment.Right, 0.5); + } + + private void menuItemLayoutByXml_Click(object sender, System.EventArgs e) + { + // In order to load layout from XML, we need to close all the DockContents + CloseAllContents(); + + Assembly assembly = Assembly.GetAssembly(typeof(MainForm)); + Stream xmlStream = assembly.GetManifestResourceStream("DockSample.Resources.DockPanel.xml"); + dockPanel.LoadFromXml(xmlStream, m_deserializeDockContent); + xmlStream.Close(); + } + + private void CloseAllContents() + { + // we don't want to create another instance of tool window, set DockPanel to null + m_solutionExplorer.DockPanel = null; + m_propertyWindow.DockPanel = null; + m_toolbox.DockPanel = null; + m_outputWindow.DockPanel = null; + m_taskList.DockPanel = null; + + // Close all other document windows + CloseAllDocuments(); } } } diff --git a/src/Libraries/DockPanel_Src/DockSample/MainForm.resx b/src/Libraries/DockPanel_Src/DockSample/MainForm.resx index eade1c27cd..f6437c702a 100644 --- a/src/Libraries/DockPanel_Src/DockSample/MainForm.resx +++ b/src/Libraries/DockPanel_Src/DockSample/MainForm.resx @@ -202,6 +202,24 @@ Private + + Private + + + Private + + + Private + + + Private + + + Private + + + Private + Private @@ -276,8 +294,8 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT eXN0ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMA - AAAgCwAAAk1TRnQBSQFMAgEBBwEAAQkBAAEEAQABEAEAARABAAT/AQkBEAj/AUIBTQE2AQQGAAE2AQQC - AAEoAwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB + AADeDAAAAk1TRnQBSQFMAgEBCQEAAQ4BAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQC + AAEoAwABQAMAAUADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB 3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IB AAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8B MwMAAWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYC @@ -304,26 +322,34 @@ /wGZAcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC /wEzAQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC /wFmAQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gB - AAHwAfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8A/wD/AP8AhwAB - AQcAAQcXAAHsCv8WAAEBBQABBwkACv8FAAHsA/8CBwX/FwABAQMAAQcKAAH/B+wC/wUAAewD/wEBAgcE - /xgAAQEBAAEHCwAK/wUAAewC/wMBAgcD/xkAAQcMAAH/COwB/wUAAewB/wIBAf8CAQEHA/8YAAEHAQAB - AQsACv8FAAHsBf8BAQHsAQcC/xcAAQcDAAEBBAABAwUAAf8HAAL/BQAB7Ab/AQECBwH/HAABAQMAAgME - AAr/BQAB7Af/AQEBBwH/HgACAwYAAf8I7AH/BQAB7Aj/AQEB/x0AAwMGAAr/BQAB7Ar/HQADAwUADAQE - AAHsAv8GAAL/GwACAwgADAQFAALsAQAB/wMHAQAC7DkABOy8AAEEBAABAzkAAQQB/AL5AQABAwL7BAAK - /wgACf8GAAkDCQAB7AH8AQAD+QEAAvsBAAH6AgAB/wIAAf8FAAH/CAAJ/wUAAfsBAAkDBQAE/wEAAv8D - +QIAAf8B+gIACv8IAAn/BQAB/wH7AQAJAwQABP8B+gEAAf8BBwP5AQAC/wIAAf8CAAH/BQAB/wgACf8F - AAH7Af8B+wEACQMDAAT/AvoB/wH7AQcD+QEAAfwCAAr/CAAJ/wUAAf8B+wH/AfsMAAX/AfoB/wH7AQcB - /wL5AQAB/AIAAv8CAAP/AQAC/wgACf8FAAH7Af8B+wH/AfsB/wH7Af8B+wcABv8CAwP/AQEEAAL/AwAB - /wMAAf8EAAEEAwAJ/wUAAf8B+wH/AfsB/wH7Af8B+wH/BwAM/wEHAwAD/woAAgQDAAn/BQAB+wH/AfsN - AAz/AQcQAAIEAwAG/xgADP8BBxAAAgQDAAb/AQAB/xYADP8BBxAAAgQDAAb/GAANBBAAAgQhAA0EEAAC - BEAAAUIBTQE+BwABPgMAASgDAAFAAwABMAMAAQEBAAEBBQABgAEBFgAD/4EABv8CAAGfAc8C/wHgAQcC - AAKPAcABAwHAAQMCAAHHAR8BwAEDAcABAwIAAeIBPwHAAQMBwAEDAgAB8AF/AcABAwHAAQMCAAH4Af8B - wAEDAcABAwIAAfABewHAAQMBwAEDAgABAgExAcABAwHAAQMCAAEHAQABwAEDAcABAwIAAWcBgQHAAQMB - wAEDAgAB5wGDAcABAwHAAQMCAAHHAQMBwAEDAcABAwIAAfwBBwHAAQMB4AEHAgAB/gEfAv8B/AE/AgAG - /wIADP8B/AFjAQABDwHAAQcBAAEfAfgBAQEAAQ8BwAEHAQABDwGAAgABDwHAAQcBAAEHAYACAAEPAcAB - BwEAAQMBgAIAAQ8BwAEHAQABAQGAAgABDwHAAQcCAAGAAQEBAAEPAcABBwEAAR8BgAEDAQgBjgHAAQcB - AAEfAYABAwEFAUQBwAEHAQABHwGAAQMBAgG4AcABBwGPAfEBgAEDAf0BfAHAAQ8B/wH5AYABAwH+AfwB - wAEfAf8BdQGAAQMB/wEAAcABPwH/AY8BgAEDAf8B/Aj/FgAL + AAHwAfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD//8A/wD/AP8ARgAB + 7AwHMwAB7Av/AQczAAHsA/8GAgL/AQczAAHsC/8BBzMAAewD/wYCAv8BBzMAAewL/wEHMwAB7AH/AQcB + AAL/AgAC/wEAAgczAAHsAQcBAAL/AQQBAgEEAQAC/wEAAewzAAHsAf8BBwEAAf8BAgH+AQIBAAH/AQAC + BzMAAewC/wEHAv8BAgEEBP8BBzMAAewJ/zYAAewJ/wHsAQAB7DMAAewJ/wLsNAAL7OYAAewLBwQAAQEH + AAEHFwAB7Ar/BQAB7Ar/AQcFAAEBBQABBwkACv8FAAHsA/8CBwX/BQAB7AT/BQcB/wEHBgABAQMAAQcK + AAH/B+wC/wUAAewD/wEBAgcE/wUAAewK/wEHBwABAQEAAQcLAAr/BQAB7AL/AwECBwP/BQAB7AT/BQcB + /wEHCAABBwwAAf8I7AH/BQAB7AH/AgEB/wIBAQcD/wUAAewC/wECB/8BBwcAAQcBAAEBCwAK/wUAAewF + /wEBAewBBwL/BQAB7AH/AgIB/wECBAcB/wEHBgABBwMAAQEEAAEDBQAB/wcAAv8FAAHsBv8BAQIHAf8F + AAHsAv8DAgX/AQcLAAEBAwACAwQACv8FAAHsB/8BAQEHAf8FAAHsAf8CAgH/AgIE/wEHDQACAwYAAf8I + 7AH/BQAB7Aj/AQEB/wUAAewC/wMCBP8CBwwAAwMGAAr/BQAB7Ar/BQAB7AL/AQIB/wICAv8PAAMDBQAM + BAQAAewC/wYAAv8FAAHsBP8BAgP/AewBAAHsCgACAwgADAQFAALsAQAB/wMHAQAC7AUAAewI/wLsKQAE + 7AgACuyqAAEEBAABAzkAAQQB/AL5AQABAwL7BAAK/wgACf8GAAkDCQAB7AH8AQAD+QEAAvsBAAH6AgAB + /wIAAf8FAAH/CAAJ/wUAAfsBAAkDBQAE/wEAAv8D+QIAAf8B+gIACv8IAAn/BQAB/wH7AQAJAwQABP8B + +gEAAf8BBwP5AQAC/wIAAf8CAAH/BQAB/wgACf8FAAH7Af8B+wEACQMDAAT/AvoB/wH7AQcD+QEAAfwC + AAr/CAAJ/wUAAf8B+wH/AfsMAAX/AfoB/wH7AQcB/wL5AQAB/AIAAv8CAAP/AQAC/wgACf8FAAH7Af8B + +wH/AfsB/wH7Af8B+wcABv8CAwP/AQEEAAL/AwAB/wMAAf8EAAEEAwAJ/wUAAf8B+wH/AfsB/wH7Af8B + +wH/BwAM/wEHAwAD/woAAgQDAAn/BQAB+wH/AfsNAAz/AQcQAAIEAwAG/xgADP8BBxAAAgQDAAb/AQAB + /xYADP8BBxAAAgQDAAb/GAANBBAAAgQhAA0EEAACBEAAAUIBTQE+BwABPgMAASgDAAFAAwABQAMAAQEB + AAEBBgABAhYAA/+BAAGAAQEGAAGAAQEGAAGAAQEGAAGAAQEGAAGAAQEGAAGAAQEGAAGAAQEGAAGAAQEG + AAGAAQEGAAGAAQEGAAGAAQEGAAGAAQEGAAGAAQsGAAGAAQcGAAGAAQ8GAAL/BgAG/wHAAQEBnwHPAv8B + 4AEHAcABAQKPAcABAwHAAQMBwAEBAccBHwHAAQMBwAEDAcABAQHiAT8BwAEDAcABAwHAAQEB8AF/AcAB + AwHAAQMBwAEBAfgB/wHAAQMBwAEDAcABAQHwAXsBwAEDAcABAwHAAQEBAgExAcABAwHAAQMBwAEBAQcB + AAHAAQMBwAEDAcABAQFnAYEBwAEDAcABAwHAAQEB5wGDAcABAwHAAQMBwAEBAccBAwHAAQMBwAEDAcAB + CwH8AQcBwAEDAeABBwHAAQcB/gEfAv8B/AE/AcABDxT/AfwBYwEAAQ8BwAEHAQABHwH4AQEBAAEPAcAB + BwEAAQ8BgAIAAQ8BwAEHAQABBwGAAgABDwHAAQcBAAEDAYACAAEPAcABBwEAAQEBgAIAAQ8BwAEHAgAB + gAEBAQABDwHAAQcBAAEfAYABAwEIAY4BwAEHAQABHwGAAQMBBQFEAcABBwEAAR8BgAEDAQIBuAHAAQcB + jwHxAYABAwH9AXwBwAEPAf8B+QGAAQMB/gH8AcABHwH/AXUBgAEDAf8BAAHAAT8B/wGPAYABAwH/AfwI + /ws= @@ -347,10 +373,10 @@ Private - + Private - + Private @@ -383,6 +409,24 @@ Private + + Private + + + Private + + + Private + + + Private + + + Private + + + Private + False @@ -398,15 +442,15 @@ 8, 8 - - MainForm - True 80 + + MainForm + True diff --git a/src/Libraries/DockPanel_Src/DockSample/Resources/DockPanel.xml b/src/Libraries/DockPanel_Src/DockSample/Resources/DockPanel.xml new file mode 100644 index 0000000000000000000000000000000000000000..e32b858e4a37f78498fa3d47a8eb83ab1acfcb72 GIT binary patch literal 9554 zcmds7?@t>?5S`DJ`ac}`oB)B)B$eBU7D$n3L4-DHztPwv2(Tk#xAdQH``!-2-tNtv zF+PlmEaPKuc6NTeoqfA^|NYyMH*zHxaxR7ZB|RC+rJTw@`tqGTk>|23tN1N&r!ODS z-o@R%d<=KTGLjQ{2B~i#^G3dxujMQ0$P(I~q0biNKggLJ$T9l#!Wh)iN3T=p7-O_! z=+Np_R4|gT_zja~b~Y;g{af zr*6md`?e-Cme@b@6}wJ0)c zlwXsLMEdY1KDU!Ug4WNs)cpfwNB9hYqh{@!zymF1R@9F%`Y@;TLs3Ex)YGzbepfSD zAjTbJitX)cG7fFj_8Q+P@AWB=v8{k|fHvY+k-d!>Mk!*MdY`~T#rHsdf=m~!&2ifWnpKjrIyZL$_K9-pqr^@a zgENX=r}tNG9f9XT-)s>$fS1G%y&WMU??d#uX#0D?y?vt{nom%xOI&jr9hpXrLxz1 zuXST_y?=SH-rIW3HE$8uv{(1)y;hQk%zZ~zDl8~6p3V)ox*az%u9dSQMgLjgLu47f zz%#5hGEC(+k?E!UOc`p<$UIh7wU)Ci`o%u>$ys1-`ys47$yi>_i6-mP8kg$QHcwY` zRyZ0ZEZV7GF=x>e9m(QNRvNPqx!>gIbI0bzF^^$2{(e98B+YWPS{Zd3Gp&~Mh?$P` zCB#gt%sgV2?lV)IX(Z#WZ8F-(I#O(Vc&TEot+}qO$BUb1N5rkpwiLI@Av|4e&vnhV zkK5^Uz}5dQIcRIXEBly7+|pBzS+Psr@Q`s+-ZGE4DYAXMJ+8GytJgeYrl|H~X07G3 zv78}JuATJdF8FJ!cGkyo`r0|a^-E`sWx%Te+_CHF>GV1AWBZu7Q<;TcmhjfO-s7Jo z=XceWnwd>e>i3Lmt8&7o45bX?51gtG!#U{?9KIi}uEOraU!mgob~2Nn3HvikQEiMo zw>RYiIyZRI*~59Z_2KSD`8CgY&v7pF5%$^{H}9tVBs(eP*|41#>keu8`UKyrWOa6W zoJHrIXQz7LTUoAKtW)jUsjNJWr=3n!61*-1(@OU1QfMUVW~r z)p1_AvS(RecCNIFHRmcvUwyXfcB`iU{$`e)&`z7J6o+@K({0SFvW{~7OBqGnOQbS+ zrK+;5PU-n(xo@nmig)Ik&wjgjBEyw*1E00XW@8m-A$)>X8c<#l-xGRn76UWTi+QkGxc zyi?Fdmi={fGV83Onrp!{>#ut6vAO2;w~Z=MXQ$f4Srbp#bp`e8RB4~h*{*C7<5WiI gG2?O-vRa)ZY^A1>L^*2l(Q4JKJdSbybIknz0r>4#+yDRo literal 0 HcmV?d00001 diff --git a/src/Libraries/DockPanel_Src/WinFormsUI.ndoc b/src/Libraries/DockPanel_Src/WinFormsUI.ndoc new file mode 100644 index 0000000000..672b2b6952 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI.ndoc @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI.suo b/src/Libraries/DockPanel_Src/WinFormsUI.suo index 9ef82d1f4b258de45b06f9b1fa4c8e1a2c782277..5f9789c27e4236dee1a90dfa4610e45b64fe71f2 100644 GIT binary patch delta 939 zcmYjPO-vI}5T4h4+iqcLrTnzCrL+_S0j>Nh2qY>HjUlBdDkdBN#rlItphOELu6pob zB-*)p;9xjtj1Uq%Y2sf3{zNpMNjw-6FUHsdL}Q)Tc0(umc4oeL^JaG5XnoqD#Wn+e zF}jxq=h@vsCC*1Ji`S=q--9k zRv2T)c9T&}s3Ghk{G-%BM%R+ABh(XGGMtF(XwGnZNw*T(2dj?wMYD>s=9VKv z(aAt?Bm#I%`9&>tO6yddRkg%(RunrO*=lziXKT2blQjJxngpMD_Al>KZ%Fux*DWWk z7FLoD3_%2jU;sMcD4Zp00>-h|SJXW~{sf$&$O$+HV_>A?jHPodq}*u}K0Iu+{e1pt zU5}M!c%k$d#`0J2wXGH-wvcM2fJ)GNl?%x+;im1dXbmF;J$WpbC{aW|vz#b+FENfU z>`&PoMjc7Rh5@Hb=2!=soi5+^!tI|Q`~3%>eET|EIef7()uv_DIr`V^@AU#CaINer zt~qNl=2YXZKGa;*gklC5E~-J*Q;rXuZkE8LYgH-Es*4GCNR^2&Ws{N8km?{JKa0$5 zB8L-5vZ~qSR4;hT?(%lR2n@p%gdqk22tpV1kv;21l9rC9zqk7rF0XXYie`8}o1tqOprhwb^5(|Jm-o9;{iL7S z>M3FaIPSGeBQS>V%uR8%Ui`f-lQ2#za0$*s4Cj4rnvp}yfh2pN0StJ&QZtB~DotWl v!eslngBy5|VRd0^yu4Et+g3o(UsT>n&T)*E|B)NWGGf#}qc)ONMG*2I$zlVp delta 1561 zcmb7DU1*bM6h3eACC%4-P1~fHn4~sov{q+rn!j1C|IztVNW_jQ^hRxkIkjR7t~Ryt zYFC>z2fXlNOpskn+z$o45Tx3HIwt;H=$)t_11~0p!X`?y=cGwg2&0~l^SFjVkL%Ro}LG0I@|ey*f?Zm|! z3Y8W5G@=3MLg2fXV$N5yf9GFazx+g0{O6$GLmT8LNFfHkdOlr0WjMe{Rw9Ke4>{AE zbcQVwZs*s|9W}}hv!)m~7voCtl-4mZHZ_qGvbWT!-sqgANPwFcWy12Nw!`?>oAUR-gn1V1*?4a8GqVvgOEy> z$)U!yVF4kRwnW;y08n!gUKUL8rbQ8p3E&am(mVN-*UDC7b$ve_rC!=iN$Q~##uQru zO|dWNOYmE1fR57<8l=x@JED@n2k0wG(>{3nX(iAgR-CI9KM5|%HMO=DLMtsW7k&&& z4$vXWaK3TOF^J1G1l$MhCEgJ5^Pb>>F@dtvu@832pdTZ&krKGzpW=1IV6UP!yrV4z zyA9)3_!8h&;Y+|T-URpva1?eNcB1h2C^CO%0mR}7qK-&37T*lRP4~@vP37yZ%vpq# z<=Z_!p7^1wQ69hEtwtzWsg5nnlE`cmzC-{g+=r9)qp)+K6;JM0lPJs5TyxU!V`&$( z)K5zrz|TC~{KgW2^_+)8BX;CTtxyPG2<)v~P7k*PYWb<=<}BX-Jlfx0seAv^emuAk zI?pYdCl~Uo4#7NGtr?QLy!rAOwgJ54-|BW2TtbV0Nb$J7WFF*cJv^TitoyhVtbJK^ SeXN*gIibnA4P4T&rvC@w`M&4? diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/AssemblyInfo.cs b/src/Libraries/DockPanel_Src/WinFormsUI/AssemblyInfo.cs index 7d2db014e9..02591c4e88 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/AssemblyInfo.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/AssemblyInfo.cs @@ -26,7 +26,7 @@ using System.Runtime.CompilerServices; // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.9.3.0")] +[assembly: AssemblyVersion("0.98.0.2")] // In order to sign your assembly you must specify a key to use. Refer to the // Microsoft .NET Framework documentation for more information on assembly signing. @@ -53,3 +53,5 @@ using System.Runtime.CompilerServices; // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Controls/CodeDoc/InertButton.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Controls/CodeDoc/InertButton.xml new file mode 100644 index 0000000000..21a75e5bc9 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Controls/CodeDoc/InertButton.xml @@ -0,0 +1,75 @@ + + + + + Image button with flat appearance, border visible only when activated by mouse. + + + + Initializes a new instance of the class. + + + + Initializes a new instance of the class, with default settings. + + + Initializes a new instance of the class, with specified image for enabled button. + + The object to show when the button is enabled. The disabled image will be draw based on this image. + + + + Initializes a new instance of the class, with specified images for enabled and disabled button. + + The object to show when the button is enabled. + + + The object to show when the button is disabled. + + + + Gets or sets the border color for the control. + A object that represents the border color of the control. + + + Gets or sets the border width for the control. + A integer that represents the border width for the control, in pixel. The default is 1. + + + Gets or sets the image to display for the control when disabled. + A object to display for the control when disabled. + + + Gets or sets the image to display for the control when enabled. + A object to display for the control when enabled. + + + Gets or sets the index of the image to display for the control when disabled. + The zero-base index of the image in the to display for the control when disabled. + + + Gets or sets the index of the image to display for the control when enabled. + The zero-base index of the image in the to display for the control when enabled. + + + Gets or sets the that contains the images to display. + The that contains the images to display. + + + Determines if the buttons is displayed as popup when activated. + True if the button is displayed as popup when activated; otherwise false. The default value is true. + + + Determines if the button is displayed as black and white. + True if the button is displayed as as black and white; otherwise false. The default value is false. + + + Gets or sets the alignment of the text in the button. + One of the values. The default is MiddleCenter. + + + Gets or sets the ToolTip text for this button. + The ToolTip text for this button. + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/InertButton.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs similarity index 86% rename from src/Libraries/DockPanel_Src/WinFormsUI/InertButton.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs index 05cff5fe23..a20f82419b 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/InertButton.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs @@ -16,6 +16,7 @@ using System.ComponentModel; namespace WeifenLuo.WinFormsUI { + /// public class InertButton : Control { private IContainer components = new Container(); @@ -34,16 +35,20 @@ namespace WeifenLuo.WinFormsUI private string m_toolTipText = ""; private Color m_borderColor = Color.Empty; + /// + /// public InertButton() { InternalConstruct(null, null); } + /// public InertButton(Image imageEnabled) { InternalConstruct(imageEnabled, null); } + /// public InertButton(Image imageEnabled, Image imageDisabled) { InternalConstruct(imageEnabled, imageDisabled); @@ -70,6 +75,7 @@ namespace WeifenLuo.WinFormsUI SetStyle(ControlStyles.Selectable, false); } + /// protected override void Dispose(bool disposing) { if (disposing) @@ -80,6 +86,7 @@ namespace WeifenLuo.WinFormsUI base.Dispose(disposing); } + /// [Category("Appearance")] [LocalizedDescription("InertButton.BorderColor.Description")] public Color BorderColor @@ -100,6 +107,7 @@ namespace WeifenLuo.WinFormsUI return (m_borderColor != Color.Empty); } + /// [Category("Appearance")] [LocalizedDescription("InertButton.BorderWidth.Description")] [DefaultValue(1)] @@ -119,6 +127,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Category("Appearance")] [LocalizedDescription("InertButton.ImageEnabled.Description")] [DefaultValue(null)] @@ -157,6 +166,7 @@ namespace WeifenLuo.WinFormsUI return (m_imageEnabled != null); } + /// [Category("Appearance")] [LocalizedDescription("InertButton.ImageDisabled.Description")] [DefaultValue(null)] @@ -195,6 +205,7 @@ namespace WeifenLuo.WinFormsUI return (m_imageDisabled != null); } + /// [Category("Appearance")] [LocalizedDescription("InertButton.ImageList.Description")] [DefaultValue(null)] @@ -212,6 +223,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Category("Appearance")] [LocalizedDescription("InertButton.ImageIndexEnabled.Description")] [DefaultValue(-1)] @@ -231,6 +243,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Category("Appearance")] [LocalizedDescription("InertButton.ImageIndexDisabled.Description")] [DefaultValue(-1)] @@ -250,6 +263,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Category("Appearance")] [LocalizedDescription("InertButton.IsPopup.Description")] [DefaultValue(false)] @@ -267,6 +281,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Category("Appearance")] [LocalizedDescription("InertButton.Monochrom.Description")] [DefaultValue(true)] @@ -283,6 +298,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Category("Appearance")] [LocalizedDescription("InertButton.TextAlign.Description")] [DefaultValue(ContentAlignment.MiddleCenter)] @@ -299,6 +315,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Category("Appearance")] [LocalizedDescription("InertButton.ToolTipText.Description")] [DefaultValue("")] @@ -317,6 +334,7 @@ namespace WeifenLuo.WinFormsUI } } + /// protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); @@ -334,6 +352,7 @@ namespace WeifenLuo.WinFormsUI } } + /// protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); @@ -353,6 +372,7 @@ namespace WeifenLuo.WinFormsUI base.OnMouseUp(e); } + /// protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); @@ -371,6 +391,7 @@ namespace WeifenLuo.WinFormsUI } } + /// protected override void OnMouseEnter(EventArgs e) { // Update state to reflect mouse over the button area @@ -385,6 +406,7 @@ namespace WeifenLuo.WinFormsUI base.OnMouseEnter(e); } + /// protected override void OnMouseLeave(EventArgs e) { // Update state to reflect mouse not over the button area @@ -399,6 +421,7 @@ namespace WeifenLuo.WinFormsUI base.OnMouseLeave(e); } + /// protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); @@ -571,6 +594,7 @@ namespace WeifenLuo.WinFormsUI colorRightBottom, m_borderWidth, bs); } + /// protected override void OnEnabledChanged(EventArgs e) { base.OnEnabledChanged(e); diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/AutoHideWindow.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideWindow.cs similarity index 99% rename from src/Libraries/DockPanel_Src/WinFormsUI/AutoHideWindow.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideWindow.cs index 9d816de42e..ec76c49d5d 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/AutoHideWindow.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideWindow.cs @@ -95,6 +95,7 @@ namespace WeifenLuo.WinFormsUI AnimateWindow(true); DockPanel.ResumeLayout(); + DockPanel.Invalidate(); SetTimerMouseTrack(); } diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/AutoHideWindowSplitter.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideWindowSplitter.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/AutoHideWindowSplitter.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideWindowSplitter.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DisplayingDockList.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DisplayingDockList.xml new file mode 100644 index 0000000000..5e90eda2a7 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DisplayingDockList.xml @@ -0,0 +1,73 @@ + + + + + Maintains a list of visible nested docking objects. + + + + DockPane Class + + + Gets the associated DockList object. + A object which associates with this DisplayingDockList object. + + + Gets the container which owns the associated object. + A which contains the associated + object. + DockList Class + + + Gets the docking state from the . + + + + Determines whether the the is floating. + + + + + Gets a at the specified index. + In C#, this property is the indexer for the class. + + + The zero-based to get. + + + The at the specified index. + + + + + Determines whether a is in the + . + + + The to locate in + . + + + true if is found in the + ; + otherwise, false. + + + + + Searches for the specified + and returns the zero-based index within the entire + . + + + The + to locate in the + + + The zero-based index of within the entire + , if found; + otherwise, -1. + + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContent.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContent.xml new file mode 100644 index 0000000000..9101e748f8 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContent.xml @@ -0,0 +1,203 @@ + + + + + The smallest dockable unit within the docking framework. + + + derives from class. + To use the DockPanel library, derive your form from class, + and implement your user interface in this class. There are several overloaded + methods to show as specified docking state. + If property is set to true and + is , the menu of the form will be merged into to the main form automatically. + + + + + Initialize a new DockContent instance. + + + Gets or sets to specify whether drag and drop re-docking is allowed. + True if drag and drop re-docking is allowed, otherwise, false. + + + Gets or sets to specify the portion of the screen size when showing in auto-hide mode. + A value between 0 and 1 to specify the portion of the DockPanel to determine the size of the window when + displaying in auto-hide mode. The default value is 0.25 (25%). + Thrown when value is not between 0 and 1. + + + Gets or sets to enalbe/disable the close button for this DockContent in the DockPane. + True to enable the close button; false to disable. + + + Gets or sets to specify the areas this DockContent can be displayed. + + Combination of values. + If conflicts with this value, a exception will be thrown. + + + + Gets or sets to attach/detach the DockContent to DockPanel. + object to attach. Null to detach this DockContent to any DockPanel. + + + Gets or sets the docking state of . + + One of the values: + + + Value + Description + + + + + + Valid only when the is newly + initialized or detached from . Can not + be explicitly set. + + + + + + Synchronized with the property. + + + + Others + + Synchronized with the docking state of + . + + + + + + + Gets or sets the containing object when floating. + The containing object when floating. + + + + Gets or sets to determine when clicking the close button, the DockContent form should be closed or hidden. + True to hide the form when clicking the close button; otherwise, false. The default value is false. + + + Gets to specified the DockContent object is currently activated. + True if the DockContent object is currently activated, otherwise, false. + + + Gets or sets whether the DockContent object is floating. + True if the DockContent object is floating; otherwise, false. + + + Gets or sets whether the DockContent object is hidden. + True if the DockContent object is hidden; otherwise, false. + + + Gets or sets the displayed containing object. + The currently displayed containing object. + + A object can have two containing + objects: and + . The + property returns currently displaying containing . The docking state of a + object is always synchronized with its displaying containing + . + + + + Gets or sets the containing object when docked. + The containing object when docked. + + + + Gets or sets the desired docking state for this DockContent object. + One of the valid values. This value should not + conflicts with property. + + + Gets or sets the context menu for the DockPane tab page. + The for the DockPane tab page. + + + Gets or sets the text to display for the DockPane tab strip. + The text to display for the DockPane tab strip. + If this value is not set, the value of will be used. + + + Gets or sets the tooltip text for this form. + The tooltip text for this form. + + + Gets or sets the visible docking state for this form. + One of the values for visible docking state of this form. + + + Activates the DockContent form and gives it focus. + Activating the DockContent form makes it the of its + containing . To determine the active DockContent in an application, + use property. To determine the active document + content, use property. + + + Gets the string to persist this DockContent object. + The string to persist this DockContent object. + + + + Test with to see whether the specified + is valid. + The specified value to test. + + + Raises the event. + An that contains the event data. + + + + Displays the form. Overloaded. + + + + Displays the form, with default settings. + If property is set, the form + will be displayed as docking state; + otherwise it will be displayed as normal form. + + + Displays the form, as specified nested docking. + The target to dock. + The edge of the target to dock. + The proportion size of the source to take + inside the target . + + + Displays the form, at the specified tab location of DockPane + The target to contain this DockContent. + The position to show in the tab strip of the . + Null to show at the last position in the tab strip. + + + + Displays the form, attaching to specified DockPanel. + The object to attach. + + + Displays the form, as floating window at the specified location and size. + The object to attach. + The bounds of the floating window. + + + Displays the form, with specified docking state. + The object to attach. + The docking state to display. + + + Occurs when the property changed. + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContentCollection.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContentCollection.xml new file mode 100644 index 0000000000..e7270c1e5e --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockContentCollection.xml @@ -0,0 +1,46 @@ + + + + + Provides methods to manage a collection of objects. + + + + Gets a at the specified index. + In C#, this property is the indexer for the class. + + + + + Determines whether a is in the + . + + + The to locate in + . + + + true if is found in the + ; + otherwise, false. + + + + + Searches for the specified + and returns the zero-based index within the entire + . + + + The + to locate in the + + + The zero-based index of within the entire + , if found; + otherwise, -1. + + + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockList.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockList.xml new file mode 100644 index 0000000000..41d9db303b --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockList.xml @@ -0,0 +1,86 @@ + + + + + Maintains a list of nested docking objects. + + + + DockPane Class + + + Gets the associated DisplayingDockList object. + A object which associates with this DockList object. + + + Gets the container which owns this object. + A which contains this object. + DisplayingDockList Class + + + Gets the docking state from the . + + + + Determines whether the the is floating. + + + + + Gets a at the specified index. + In C#, this property is the indexer for the class. + + + The zero-based to get. + + + The at the specified index. + + + + + Determines whether a is in the + . + + + The to locate in + . + + + true if is found in the + ; + otherwise, false. + + + + + Searches for the specified + and returns the zero-based index within the entire + . + + + The + to locate in the + + + The zero-based index of within the entire + , if found; + otherwise, -1. + + + + + Gets the default + in this to dock inside. + + + The + to add to this . + + + The default for to dock inside, + null if this is empty. + + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPane.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPane.xml new file mode 100644 index 0000000000..0367f5bc82 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPane.xml @@ -0,0 +1,276 @@ + + + + + The containing window for a collection of forms + displayed in a tabbed manner. + + + + There are two types of in appearance: + and , + determined by the docking state of the . + + + You can derive your own class from to make + your own customizations. If so, you need to override the + property to return the instance of your own class. + + + + + + Initializes a new instance of DockPane class. + + + + Initializes a new instance of DockPane class, with specified visible docking state. + The first DockContent for this DockPane. + The visible docking state for this DockPane. + True to show the , otherwise, false. + + + Initializes a new instance of DockPane class, as nested docking to specified FloatWindow. + The first DockContent for this DockPane. + The for nested docking. + True to show the , otherwise, false. + + + Initializes a new instance of DockPane class, as specified nested docking. + + The target to dock. + The edge of the target to dock. + The proportion size of the source + to take inside the target . + + + + Initializes a new instance of DockPane class, as floating at the specified bounds. + + The bounds of the floating window. + + + + Gets or sets the currently active form. + The currently active form. + + + Gets or sets to specify whether drag and drop re-docking is allowed. + True if drag and drop re-docking is allowed, otherwise, false. + + + Gets the text displayed for the caption. + The text displayed for the caption. + The default implementation returns the property + of current active form. You can override this + property to provide your own implementation. + + + Gets the collection of contained forms. + The which contains all the + forms for this . + + + A object can be added to the + by various of ways: + + + Calling one of class's constructors, + providing the object as parameter. + + + + Explicitly setting one of the + , + or + properties + of class. + + + + Implicitly setting the docking state of the , + for example, calling one of the methods. + + + + You can access the contained collection of + forms through the + property of class + , and you can access a + 's containing + through its + , + or + properties. + + If there is no in + this , + this will be disposed automatically. + + + + + Gets the count of visible objects. + Gets the count of visible objects. + + + Gets the which contains this + . + The which contains this + . + + + + Gets the associated with this + . + the associated with this + . + + + Gets the docking state of this . + The docking state of this . + + + Gets or sets the contains this + . + Gets or sets the contains this + . + + + + Gets or sets the contains this + . + Gets or sets the contains this + . + + + + Gets whether this is activated. + True if this is activated, + otherwise, false. + + + Gets whether this is active document pane. + True if this is active document pan, + otherwise, false. + + + Gets whether the docking state is auto hide. + True if the docking state is auto hide, + otherwise, false. + + + Gets whether this is floating. + True if this is floating, + otherwise, false. + + The property is fixed during the construction + class, based on the initial docking state. If this + property returns true, it can only be contained by a + as its ; otherwise it can only be contained + by a as its + . + + + + Gets whether all the contained forms + are invisible in this . + True if all the contained forms + are invisible in this . + + + Gets the nested docking status for this . + A object to represent + the nested docking status for this . + + + Activates the DockPane and gives it focus. + + + + Nested docks this to the specified + . + + + + Nested docks this to the specified + , with default settings. + The for the + nested docking. + If the property conforms to + the container's docking state, the current object + will be returned; otherwise, a new instance of + object will be created and returned. + + + Nested docks this to the specified + , with specified settings. + + + + + + + + Shows all contained forms as floating. + The new floating for the + forms. + + + Gets the visible form at the specified + index. + The zero-based index for the visible form to + retrieve. + The visible form at the specified + index. + + + Tests if the giving docking state conforms to the + property of all the + contained forms. + + True if the giving docking state conforms to the + property of all the + contained forms; otherwise, false. + + + Raises the event. + An that contains the event data. + + + Raises the event. + An that contains the event data. + + + Raises the event. + An that contains the event data. + + + Shows all contained forms as non-floating. + + + Moves the specified form to the + specified position in the tab strip. + The specified form. + The zero-based index represents the new position in the tab strip. + + + Shows all contained forms as specified docking state. + The specified docking state to display. + The for the new docking state. + + + Sets the proportion size of this DockPane for nested docking. + The proportion size to set. Value must between 0 and 1. + + + Occurs when the property changed. + + + Occurs when the property changed. + + + Occurs when the property changed. + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPaneCollection.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPaneCollection.xml new file mode 100644 index 0000000000..ac8e71482c --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPaneCollection.xml @@ -0,0 +1,45 @@ + + + + + Provides methods to manage a collection of objects. + + + + Gets a at the specified index. + In C#, this property is the indexer for the class. + + + + + Determines whether a is in the + . + + + The to locate in + . + + + true if is found in the + ; + otherwise, false. + + + + + Searches for the specified + and returns the zero-based index within the entire + . + + + The + to locate in the + + + The zero-based index of within the entire + , if found; + otherwise, -1. + + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPanel.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPanel.xml new file mode 100644 index 0000000000..8eae48c43f --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockPanel.xml @@ -0,0 +1,238 @@ + + + + + Callback used by + to get a instance of from a + serialized string. + + + The serialized string of the object. + + + The object. + + + + The layout of + can be saved to and loaded from XML data by calling + and + . + When saving, the system will persist the + object to a string by calling its + method; + when loading, the system will call the + call back to get the instance of object. + + + The default implementation of + returns the type name of the class. You can overwrite + this method for your own implementation. + + + You always need to provide a + callback when loading the layout. + + + + + Represents the method that will handle the or + event of . + The source of the event. + A that contains the event data. + + + + Represents a control that acts as container for the docking windows. + The contains 5 : + top, bottom, left, right and document. It also displays tab strip for auto-hide window(s) if there is any. + + + Initializes a new instance of class. + + + Gets or sets the active auto-hide . + The auto-hide is currently active. + + + Gets the active . + The is currently active. + + + Gets the active document . + The document is currently active. + + + Gets the active document . + The document is currently active. + + + Gets the active . + The is currently active. + + + Sets or gets a value indicating whether drag and drop redocking is allowed. + True, if drag and drop redocking is allowed, otherwise, false. + + + Gets the collection of contained forms. + The which contains all the + forms for this . + A object is added to + collection by setting the value of its property. + + + Gets or sets the size of the bottom side . + A value between 0 and 1 to determine the size of the bottom side . + + + Gets or sets the size of the left side . + A value between 0 and 1 to determine the size of the left side . + + + Gets or sets the size of the right side . + A value between 0 and 1 to determine the size of the right side . + + + Gets or sets the size of the top side . + A value between 0 and 1 to determine the size of the top side . + + + Provides class factory to initialize objects. + An object implements to initialize objects. + Override this property can implement your own class derived from . + + + Provides class factory to initialize objects. + An object implements to initialize objects. + Override this property can implement your own class derived from . + + + Gets the collection of contained controls. + The which contains all the + controls for this . + + + Gets the collection of contained forms. + The which contains all the + forms for this . + + + Gets the collection of contained windows. + The which contains all the + windows for this . + + + Gets the document forms. + An array of the document forms. + + + Gets or sets a value indicating whether all the document forms are treated as MDI forms. + True, if all the document forms are treated as MDI forms, otherwise, false. + + + Gets or sets a value indicating whether the tab strip of document will be displayed when there is only one document form. + False, if the tab strip of document will be displayed when there is only one document form, otherwise, true. + + + Raises the event. + An that contains the event data. + + + Raises the event. + An that contains the event data. + + + Raises the event. + An that contains the event data. + + + Raises the event. + An that contains the event data. + + + Raises the event. + An that contains the event data. + + + + Save the layout to XML data. Overloaded. + + + + + + + Save the layout to XML data, using the specified file. + The file name to write to. If the file exsists, it will truncate it and + overwrite it with new content. + + + + + + Save the layout to XML data, using the specified file and encoding. + The file name to write to. If the file exsists, it will truncate it and + overwrite it with new content. + The encoding to generate. + + + + + + Save the layout to XML data, using the specified stream and encoding. + The stream to which you want to write. + The encoding to generate. + + + + + + + Load the layout from XML data. Overloaded + + + + + + + Load the layout from XML file. + The file name to read XML data from. + The callback function to get the + instance from the persistent string. + + + + + + Load the layout from XML stream. + The stream to read XML data from. + The callback function to get the + instance from the persistent string. + + + + + + Moves the specified window to the + specified position in the auto-hide tab strip. + The specified window. + The zero-based index represents the new position in the auto-hide tab strip. + + + Occurs when the property changed. + + + Occurs when the property changed. + + + Occurs when the property changed. + + + Occurs when a form added to collection. + + + Occurs when a form removed from collection. + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindow.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindow.xml new file mode 100644 index 0000000000..62922b12a6 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindow.xml @@ -0,0 +1,48 @@ + + + + + Represents the docking zone of the . + + The is divided into 5 + s: Top, Bottom, Left, Right and Document. + The document is always positioned in the central of the + . Other 4 s’ positions + are determined by the Z-order. The last displayed will be sent to the back of the + Z-order. + The implements , + it can contain a list of nested objects. + + + + Gets the which contains + a list of visible nested docking objects. + The which contains + a list of visible nested docking objects. + + + Gets the rectangle represents the displaying area for nested docking DockPane objects. + A represents the displaying area for nested docking DockPane objects. + + + Gets the which contains + a list of nested docking objects. + The which contains + a list of nested docking objects. + + + Gets the which contains this + . + The which contains this + . + + + Gets the docking state of this . + The docking state of this . + + + Gets to determine if this is floating. + The value of this property is always false. + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindowCollection.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindowCollection.xml new file mode 100644 index 0000000000..e7bfdaea7d --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/DockWindowCollection.xml @@ -0,0 +1,14 @@ + + + + + Provides methods to manage a collection of objects. + + + + Gets a at the specified docking state. + In C#, this property is the indexer for the class. + + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Enums.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Enums.xml new file mode 100644 index 0000000000..79e4f431df --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Enums.xml @@ -0,0 +1,88 @@ + + + + + Specifies the edge for nested docking. + + + The 's left edge is docked to its + containing 's left edge. + + + The 's right edge is docked to its + containing 's right edge. + + + The 's top edge is docked to its + containing 's top edge. + + + The 's bottom edge is docked to its + containing 's bottom edge. + + + + + Specifies all the available docking areas. + + + The floating window docking area. + + + The top docking area of the + + + The left docking area of the . + + + The right docking area of the . + + + The bottom docking area of the . + + + The document area of the . + + + + + Specifies the docking state for docking windows. + + + Unknown docking state. + + + Displayed inside float window. + + + Displayed as auto-hide window, on the top edge. + + + Displayed as auto-hide window, on the left edge. + + + Displayed as auto-hide window, on the bottom edge. + + + Displayed as auto-hide window, on the right edge. + + + Displayed as document window. + + + Docked to the top edge. + + + Docked to the left edge. + + + Docked to the right edge. + + + Docked to the bottom edge. + + + The window is hidden. + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/EventArgs.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/EventArgs.xml new file mode 100644 index 0000000000..d6f92460c1 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/EventArgs.xml @@ -0,0 +1,18 @@ + + + + + + Provides data for and + events. + + + Initializes a new instance of class. + The object. + + + Gets the object. + The object. + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindow.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindow.xml new file mode 100644 index 0000000000..80d086d075 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindow.xml @@ -0,0 +1,66 @@ + + + + + Represents the floating window to contain the nested docking DockPane. + + The implements , + it can contain a list of nested objects. + + + + + Initializes a new instance of . + + + + Initializes a new instance of , + with default size and location. + The which owns this + . + The first in this + . + + + Initializes a new instance of , + with specified size and location. + + + A for the location and size of the window. + + + Gets or sets if the drag and drop re-docking is allowed. + True if drag and drop re-docking is allowed; otherwise, false. + + + Gets the which contains + a list of visible nested docking objects. + The which contains + a list of visible nested docking objects. + + + Gets the rectangle represents the displaying area for nested docking DockPane objects. + A represents the displaying area for nested docking DockPane objects. + + + Gets the which contains + a list of nested docking objects. + The which contains + a list of nested docking objects. + + + Gets the which contains this + . + The which contains this + . + + + Gets the docking state of this . + The value of this property is always . + + + Gets to determine if this is floating. + The value of this property is always true. + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindowCollection.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindowCollection.xml new file mode 100644 index 0000000000..8d08c8e423 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/FloatWindowCollection.xml @@ -0,0 +1,45 @@ + + + + + Provides methods to manage a collection of objects. + + + + Gets a at the specified index. + In C#, this property is the indexer for the class. + + + + + Determines whether a is in the + . + + + The to locate in + . + + + true if is found in the + ; + otherwise, false. + + + + + Searches for the specified + and returns the zero-based index within the entire + . + + + The + to locate in the + + + The zero-based index of within the entire + , if found; + otherwise, -1. + + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Interfaces.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Interfaces.xml new file mode 100644 index 0000000000..bf7f2273c3 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/Interfaces.xml @@ -0,0 +1,89 @@ + + + + + Container for nested docking objects. + + + IDockListContainer contains a list of DockPane objects + for nested docking. It maintans two lists: + and . DockList + contains all DockPane objects, no matter it's visible or not; DisplayingDockList contains only + visible DockPane objects for this container. + + + Internally, IDockListContainer creates DockList, this DockList then creates DisplayingDockList, + and these two lists are always synchronized. + + + + + Gets the which contains + a list of visible nested docking objects. + The which contains + a list of visible nested docking objects. + + + Gets the rectangle represents the displaying area for nested docking DockPane objects. + A represents the displaying area for nested docking DockPane objects. + + + Gets the which contains + a list of nested docking objects. + The which contains + a list of nested docking objects. + + + Gets the docking state of this container. + One of the values. + + + Gets a value indicates the control has been disposed of. + True if the control has been disposed of, otherwise, false. + + + Determines if this container window is floating. + True if is floating; otherwise, false. + + + + + Provides methods to initialize a instance of . + You can derive your own class from , and + override the property to create instance + of the derived class. + + + + + + + + + + + + + + + + + + + + Provides methods to initialize a instance of . + You can derive your own class from , and + override the property to create instance + of the derived class. + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/NestedDockingStatus.xml b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/NestedDockingStatus.xml new file mode 100644 index 0000000000..541f4292a7 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/CodeDoc/NestedDockingStatus.xml @@ -0,0 +1,60 @@ + + + + + + Provides nested docking information for a . + + + Gets the edge of the target to dock. + One of the values. + + + Gets the edge of the target to dock, when displaying. + One of the values. + + + Gets the target to dock, when displaying. + A object that represents the target to dock, when displaying. + + + Gets the size for the nested docking, when displaying. + A value between 0 and 1 to indicate the size for the nested docking. + + + Gets the containing . + The containing . + + + Gets the containing . + The containing . + + + Gets the value to indicate if current is being displayed. + true if current is being displayed, otherwise, false. + + + Gets the logical location and size of the . + The to represent the logical location and size of the + . + + + Gets the actual location and size of the . + The to represent the actual location and size of the + . + + + Gets the target Gets the target to dock. + A object that represents the target to dock. + + + Gets the size for the nested docking. + A value between 0 and 1 to indicate the size for the nested docking. + + + Gets the location and size of the splitter. + The to represent the location and size of the + splitter. + + + diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DisplayingDockList.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DisplayingDockList.cs similarity index 84% rename from src/Libraries/DockPanel_Src/WinFormsUI/DisplayingDockList.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DisplayingDockList.cs index fc2ff6b7ce..b6eb46c06c 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DisplayingDockList.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DisplayingDockList.cs @@ -14,9 +14,7 @@ using System.Windows.Forms; namespace WeifenLuo.WinFormsUI { - /// - /// Implements a list of visible dock panes. Created by DockList object. - /// + /// public class DisplayingDockList : ReadOnlyCollectionBase { private DockList m_dockList; @@ -26,61 +24,43 @@ namespace WeifenLuo.WinFormsUI m_dockList = dockList; } - /// - /// Returns the associated DockList object. - /// + /// public DockList DockList { get { return m_dockList; } } - /// - /// Returns the container which owns the associated DockList object. - /// + /// public IDockListContainer Container { get { return DockList.Container; } } - /// - /// Returns the docking state of the dock panes. - /// + /// public DockState DockState { get { return DockList.DockState; } } - /// - /// Determines if the docking state of the dock panes is floating. - /// + /// public bool IsFloat { get { return DockList.IsFloat; } } - /// - /// Determines if the specified dock pane is contained in the list. - /// - /// Specified dock pane. - /// True or False. + /// public bool Contains(DockPane pane) { return InnerList.Contains(pane); } - /// - /// Returns the index of the specified dock pane in the list. - /// - /// Specified dock pane. - /// True of False. + /// public int IndexOf(DockPane pane) { return InnerList.IndexOf(pane); } - /// - /// Indexer of the list. Returns DockPane object. - /// + /// public DockPane this[int index] { get { return InnerList[index] as DockPane; } diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockAreasEditor.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockAreasEditor.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockAreasEditor.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockAreasEditor.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockContent.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContent.cs similarity index 72% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockContent.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContent.cs index a18017e270..9034110007 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockContent.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContent.cs @@ -16,23 +16,20 @@ using System.Runtime.InteropServices; namespace WeifenLuo.WinFormsUI { - /// - /// Each DockContent instance represents a single dockable unit within the docking window framework. - /// + /// public class DockContent : Form { // Tab width and X position used by DockPane and DockPanel class internal int TabWidth = 0; internal int TabX = 0; - /// - /// Initialize a new DockContent instance. - /// + /// public DockContent() { RefreshMdiIntegration(); } + /// protected override void Dispose(bool disposing) { if (disposing) @@ -50,9 +47,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_allowRedocking = true; - /// - /// This property determines if drag and drop re-docking is allowed. - /// + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.AllowRedocking.Description")] [DefaultValue(true)] @@ -63,9 +58,7 @@ namespace WeifenLuo.WinFormsUI } private DockAreas m_allowedAreas = DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.DockBottom | DockAreas.Document | DockAreas.Float; - /// - /// This property determines the areas this DockContent can be displayed. - /// + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.DockableAreas.Description")] [DefaultValue(DockAreas.DockLeft|DockAreas.DockRight|DockAreas.DockTop|DockAreas.DockBottom|DockAreas.Document|DockAreas.Float)] @@ -88,9 +81,7 @@ namespace WeifenLuo.WinFormsUI } private double m_autoHidePortion = 0.25; - /// - /// This property determines the portion of the screen size when showing in auto-hide mode. - /// + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.AutoHidePortion.Description")] [DefaultValue(0.25)] @@ -116,9 +107,7 @@ namespace WeifenLuo.WinFormsUI } private string m_tabText = null; - /// - /// This property determines the tab text displayed for the dock pane caption. By setting value to this property can display different text for dock pane tab and caption. - /// + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.TabText.Description")] [DefaultValue(null)] @@ -141,9 +130,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_closeButton = true; - /// - /// This property determines whether this DockContent can be closed by clicking the close button of its dock pane. - /// + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.CloseButton.Description")] [DefaultValue(true)] @@ -163,9 +150,7 @@ namespace WeifenLuo.WinFormsUI } private DockPanel m_dockPanel = null; - /// - /// This property determines the dock panel which this dock content attached to. - /// + /// [Browsable(false)] public DockPanel DockPanel { @@ -242,10 +227,8 @@ namespace WeifenLuo.WinFormsUI } } - /// - /// This property retrieves this content’s docking state. This value is identical to Pane.DockState property - /// private DockState m_dockState = DockState.Unknown; + /// [Browsable(false)] public DockState DockState { @@ -262,10 +245,7 @@ namespace WeifenLuo.WinFormsUI } } - /// - /// This property determines the DockPane which contains this DockContent. - /// - [Browsable(false)] + /// public DockPane Pane { get { return IsFloat ? FloatPane : PanelPane; } @@ -284,6 +264,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_isHidden = false; + /// [Browsable(false)] public bool IsHidden { @@ -298,6 +279,7 @@ namespace WeifenLuo.WinFormsUI } private DockState m_visibleState = DockState.Unknown; + /// [Browsable(false)] public DockState VisibleState { @@ -312,6 +294,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_isFloat = false; + /// [Browsable(false)] public bool IsFloat { @@ -342,6 +325,7 @@ namespace WeifenLuo.WinFormsUI } private DockPane m_panelPane = null; + /// [Browsable(false)] public DockPane PanelPane { @@ -374,6 +358,7 @@ namespace WeifenLuo.WinFormsUI } private DockPane m_floatPane = null; + /// [Browsable(false)] public DockPane FloatPane { @@ -497,6 +482,7 @@ namespace WeifenLuo.WinFormsUI { get { return GetPersistString(); } } + /// protected virtual string GetPersistString() { return GetType().ToString(); @@ -509,9 +495,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_hideOnClose = false; - /// - /// HideOnClose Property - /// + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.HideOnClose.Description")] [DefaultValue(false)] @@ -521,6 +505,7 @@ namespace WeifenLuo.WinFormsUI set { m_hideOnClose = value; } } + /// public new MainMenu Menu { get { return HiddenMdiChild == null ? base.Menu : HiddenMdiChild.Menu; } @@ -533,10 +518,8 @@ namespace WeifenLuo.WinFormsUI } } - /// - /// ShowHint Property - /// private DockState m_showHint = DockState.Unknown; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.ShowHint.Description")] [DefaultValue(DockState.Unknown)] @@ -556,6 +539,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_isActivated = false; + /// [Browsable(false)] public bool IsActivated { @@ -569,12 +553,14 @@ namespace WeifenLuo.WinFormsUI m_isActivated = value; } + /// public bool IsDockStateValid(DockState dockState) { return DockHelper.IsDockStateValid(dockState, DockableAreas); } private ContextMenu m_tabPageContextMenu = null; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockContent.TabPageContextMenu.Description")] [DefaultValue(null)] @@ -585,6 +571,7 @@ namespace WeifenLuo.WinFormsUI } private string m_toolTipText = null; + /// [Category("Appearance")] [LocalizedDescription("DockContent.ToolTipText.Description")] [DefaultValue(null)] @@ -594,6 +581,7 @@ namespace WeifenLuo.WinFormsUI set { m_toolTipText = value; } } + /// public new void Activate() { if (DockPanel == null) @@ -608,6 +596,7 @@ namespace WeifenLuo.WinFormsUI } } + /// public new void Hide() { IsHidden = true; @@ -620,17 +609,26 @@ namespace WeifenLuo.WinFormsUI Control oldParent = Parent; - ///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - /// Workaround for .Net Framework bug: removing control from Form may cause form - /// unclosable. Set focus to another dummy control. - ///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - Form form = FindForm(); + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // Workaround for .Net Framework bug: removing control from Form may cause form + // unclosable. Set focus to another dummy control. + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + Form form = null; + if (Parent is DockPane) + form = ((DockPane)Parent).FindForm(); if (ContainsFocus) { if (form is FloatWindow) + { ((FloatWindow)form).DummyControl.Focus(); + form.ActiveControl = ((FloatWindow)form).DummyControl; + } else if (DockPanel != null) + { DockPanel.DummyControl.Focus(); + if (form != null) + form.ActiveControl = DockPanel.DummyControl; + } } //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -638,6 +636,8 @@ namespace WeifenLuo.WinFormsUI Parent = value; } + /// + /// public new void Show() { if (DockPanel == null) @@ -646,6 +646,7 @@ namespace WeifenLuo.WinFormsUI Show(DockPanel); } + /// public void Show(DockPanel dockPanel) { if (dockPanel == null) @@ -657,6 +658,7 @@ namespace WeifenLuo.WinFormsUI Activate(); } + /// public void Show(DockPanel dockPanel, DockState dockState) { if (dockPanel == null) @@ -667,7 +669,9 @@ namespace WeifenLuo.WinFormsUI DockPanel = dockPanel; - if (Pane == null) + if (dockState == DockState.Float && FloatPane == null) + Pane = DockPanel.DockPaneFactory.CreateDockPane(this, DockState.Float, true); + else if (PanelPane == null) { DockPane paneExisting = null; foreach (DockPane pane in DockPanel.Panes) @@ -677,15 +681,78 @@ namespace WeifenLuo.WinFormsUI break; } - if (paneExisting == null || dockState == DockState.Float) + if (paneExisting == null) Pane = DockPanel.DockPaneFactory.CreateDockPane(this, dockState, true); else Pane = paneExisting; } + DockState = dockState; + Activate(); + } + + /// + public void Show(DockPanel dockPanel, Rectangle floatWindowBounds) + { + if (dockPanel == null) + throw(new ArgumentNullException(ResourceHelper.GetString("DockContent.Show.NullDockPanel"))); + + DockPanel = dockPanel; + if (FloatPane == null) + { + IsHidden = true; // to reduce the screen flicker + FloatPane = DockPanel.DockPaneFactory.CreateDockPane(this, DockState.Float, false); + FloatPane.FloatWindow.StartPosition = FormStartPosition.Manual; + } + + FloatPane.FloatWindow.Bounds = floatWindowBounds; + + Show(dockPanel, DockState.Float); Activate(); } + /// + public void Show(DockPane pane, DockContent beforeContent) + { + if (pane == null) + throw(new ArgumentNullException(ResourceHelper.GetString("DockContent.Show.NullPane"))); + + if (beforeContent != null && pane.Contents.IndexOf(beforeContent) == -1) + throw(new ArgumentException(ResourceHelper.GetString("DockContent.Show.InvalidBeforeContent"))); + + DockPanel = pane.DockPanel; + Pane = pane; + pane.SetContentIndex(this, pane.Contents.IndexOf(beforeContent)); + Show(); + } + + /// + public void Show(DockPane prevPane, DockAlignment alignment, double proportion) + { + if (prevPane == null) + throw(new ArgumentException(ResourceHelper.GetString("DockContent.Show.InvalidPrevPane"))); + + if (DockHelper.IsDockStateAutoHide(prevPane.DockState)) + throw(new ArgumentException(ResourceHelper.GetString("DockContent.Show.InvalidPrevPane"))); + + DockPanel = prevPane.DockPanel; + DockPanel.DockPaneFactory.CreateDockPane(this, prevPane, alignment, proportion, true); + Show(); + } + + /// + public new void Close() + { + if (DockPanel != null) + { + DockPanel = null; + Dispose(); + } + else + base.Close(); + } + + /// protected override void OnTextChanged(EventArgs e) { if (m_hiddenMdiChild != null) @@ -748,6 +815,7 @@ namespace WeifenLuo.WinFormsUI #region Events private static readonly object DockStateChangedEvent = new object(); + /// [LocalizedCategory("Category.PropertyChanged")] [LocalizedDescription("Pane.DockStateChanged.Description")] public event EventHandler DockStateChanged @@ -755,6 +823,7 @@ namespace WeifenLuo.WinFormsUI add { Events.AddHandler(DockStateChangedEvent, value); } remove { Events.RemoveHandler(DockStateChangedEvent, value); } } + /// protected virtual void OnDockStateChanged(EventArgs e) { EventHandler handler = (EventHandler)Events[DockStateChangedEvent]; diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockContentCollection.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContentCollection.cs similarity index 76% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockContentCollection.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContentCollection.cs index 9e53f22813..5f8e3fc999 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockContentCollection.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContentCollection.cs @@ -13,12 +13,14 @@ using System.Collections; namespace WeifenLuo.WinFormsUI { + /// > public class DockContentCollection : ReadOnlyCollectionBase { internal DockContentCollection() { } + /// > public DockContent this[int index] { get { return InnerList[index] as DockContent; } @@ -59,11 +61,13 @@ namespace WeifenLuo.WinFormsUI InnerList.Clear(); } + /// public bool Contains(DockContent content) { return InnerList.Contains(content); } + /// public int IndexOf(DockContent content) { if (!Contains(content)) @@ -80,7 +84,7 @@ namespace WeifenLuo.WinFormsUI InnerList.Remove(content); } - public DockContent[] Select(DockAreas stateFilter) + internal DockContent[] Select(DockAreas stateFilter) { int count = 0; foreach (DockContent c in this) diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockHelper.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockHelper.cs similarity index 98% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockHelper.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockHelper.cs index b2b18cb2eb..4698574a46 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockHelper.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockHelper.cs @@ -12,9 +12,6 @@ using System; namespace WeifenLuo.WinFormsUI { - /// - /// Summary description for DockHelper. - /// internal class DockHelper { public static bool IsDockStateAutoHide(DockState dockState) diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockList.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockList.cs similarity index 76% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockList.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockList.cs index 7614d3d92a..1d0be81528 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockList.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockList.cs @@ -13,6 +13,7 @@ using System.Drawing; namespace WeifenLuo.WinFormsUI { + /// public class DockList : ReadOnlyCollectionBase { private IDockListContainer m_container; @@ -24,36 +25,43 @@ namespace WeifenLuo.WinFormsUI m_displayingList = new DisplayingDockList(this); } + /// public IDockListContainer Container { get { return m_container; } } - internal DisplayingDockList DisplayingList + /// + public DisplayingDockList DisplayingList { get { return m_displayingList; } } + /// public DockState DockState { get { return Container.DockState; } } + /// public bool IsFloat { get { return DockState == DockState.Float; } } + /// public bool Contains(DockPane pane) { return InnerList.Contains(pane); } + /// public int IndexOf(DockPane pane) { return InnerList.IndexOf(pane); } + /// public DockPane this[int index] { get { return InnerList[index] as DockPane; } @@ -126,6 +134,7 @@ namespace WeifenLuo.WinFormsUI statusPane.SetDisplayingBounds(Rectangle.Empty, Rectangle.Empty, Rectangle.Empty); } + /// public DockPane GetDefaultPrevPane(DockPane pane) { for (int i=Count-1; i>=0; i--) diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockPane.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPane.cs similarity index 87% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockPane.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPane.cs index 355de8b66c..7d03f4f448 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockPane.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPane.cs @@ -17,15 +17,16 @@ using System.Runtime.InteropServices; namespace WeifenLuo.WinFormsUI { + /// public class DockPane : UserControl { - protected enum DockPaneAppearance + private enum AppearanceStyle { ToolWindow, Document } - protected enum HitTestArea + private enum HitTestArea { Caption, TabStrip, @@ -33,7 +34,7 @@ namespace WeifenLuo.WinFormsUI None } - protected struct HitTestResult + private struct HitTestResult { public HitTestArea HitArea; public int Index; @@ -115,22 +116,34 @@ namespace WeifenLuo.WinFormsUI private int m_offset = 0; private ToolTip m_toolTip; + /// + /// public DockPane(DockContent content, DockState visibleState, bool show) { - InternalConstruct(content, visibleState, null, false, Rectangle.Empty, show); + InternalConstruct(content, visibleState, false, Rectangle.Empty, null, DockAlignment.Right, 0.5, show); } + /// public DockPane(DockContent content, FloatWindow floatWindow, bool show) { - InternalConstruct(content, DockState.Float, floatWindow, false, Rectangle.Empty, show); + InternalConstruct(content, DockState.Float, false, Rectangle.Empty, floatWindow.DockList.GetDefaultPrevPane(this), DockAlignment.Right, 0.5, show); } + /// + public DockPane(DockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show) + { + if (prevPane == null) + throw(new ArgumentNullException()); + InternalConstruct(content, prevPane.DockState, false, Rectangle.Empty, prevPane, alignment, proportion, show); + } + + /// public DockPane(DockContent content, Rectangle floatWindowBounds, bool show) { - InternalConstruct(content, DockState.Float, null, true, floatWindowBounds, show); + InternalConstruct(content, DockState.Float, true, floatWindowBounds, null, DockAlignment.Right, 0.5, show); } - private void InternalConstruct(DockContent content, DockState dockState, FloatWindow floatWindow, bool flagBounds, Rectangle floatWindowBounds, bool show) + private void InternalConstruct(DockContent content, DockState dockState, bool flagBounds, Rectangle floatWindowBounds, DockPane prevPane, DockAlignment alignment, double proportion, bool show) { if (dockState == DockState.Hidden || dockState == DockState.Unknown) throw new ArgumentException(ResourceHelper.GetString("DockPane.DockState.InvalidState")); @@ -196,10 +209,10 @@ namespace WeifenLuo.WinFormsUI Font = SystemInformation.MenuFont; m_isFloat = (dockState == DockState.Float); - if (floatWindow != null) - FloatWindow = floatWindow; - else if (flagBounds) + if (flagBounds) FloatWindow = DockPanel.FloatWindowFactory.CreateFloatWindow(DockPanel, this, floatWindowBounds); + else if (prevPane != null) + AddToDockList(prevPane.DockListContainer, prevPane, alignment, proportion); SetDockState(dockState); if (show) @@ -214,10 +227,11 @@ namespace WeifenLuo.WinFormsUI private void Close_Click(object sender, EventArgs e) { CloseActiveContent(); - if (ActiveContent != null) + if (!DockHelper.IsDockStateAutoHide(DockState) && ActiveContent != null) ActiveContent.Activate(); } + /// protected override void Dispose(bool disposing) { if (disposing) @@ -241,6 +255,7 @@ namespace WeifenLuo.WinFormsUI } private DockContent m_activeContent = null; + /// public virtual DockContent ActiveContent { get { return m_activeContent; } @@ -279,15 +294,16 @@ namespace WeifenLuo.WinFormsUI } private bool m_allowRedocking = true; + /// public virtual bool AllowRedocking { get { return m_allowRedocking; } set { m_allowRedocking = value; } } - protected virtual Rectangle CaptionRectangle + private Rectangle CaptionRectangle { - get { return Appearance == DockPaneAppearance.ToolWindow ? CaptionRectangle_ToolWindow : Rectangle.Empty; } + get { return Appearance == AppearanceStyle.ToolWindow ? CaptionRectangle_ToolWindow : Rectangle.Empty; } } private Rectangle CaptionRectangle_ToolWindow @@ -312,18 +328,20 @@ namespace WeifenLuo.WinFormsUI } } + /// public virtual string CaptionText { get { return ActiveContent == null ? string.Empty : ActiveContent.Text; } } private IContainer m_components; + /// protected IContainer Components { get { return m_components; } } - protected virtual Rectangle ContentRectangle + private Rectangle ContentRectangle { get { @@ -342,11 +360,13 @@ namespace WeifenLuo.WinFormsUI } private DockContentCollection m_contents; + /// public DockContentCollection Contents { get { return m_contents; } } + /// public int CountOfVisibleContents { get @@ -361,18 +381,20 @@ namespace WeifenLuo.WinFormsUI } } + /// protected override Size DefaultSize { get { return Size.Empty; } } private DockPanel m_dockPanel; + /// public DockPanel DockPanel { get { return m_dockPanel; } } - protected bool HasCaption + private bool HasCaption { get { @@ -387,6 +409,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_isActivated = false; + /// public bool IsActivated { get { return m_isActivated; } @@ -403,6 +426,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_isActiveDocumentPane = false; + /// public bool IsActiveDocumentPane { get { return m_isActiveDocumentPane; } @@ -418,6 +442,7 @@ namespace WeifenLuo.WinFormsUI OnIsActiveDocumentPaneChanged(EventArgs.Empty); } + /// public bool IsDockStateValid(DockState dockState) { foreach (DockContent content in Contents) @@ -427,6 +452,7 @@ namespace WeifenLuo.WinFormsUI return true; } + /// public bool IsAutoHide { get { return DockHelper.IsDockStateAutoHide(DockState); } @@ -438,9 +464,9 @@ namespace WeifenLuo.WinFormsUI get { return m_splitter; } } - protected DockPaneAppearance Appearance + private AppearanceStyle Appearance { - get { return (DockState == DockState.Document) ? DockPaneAppearance.Document : DockPaneAppearance.ToolWindow; } + get { return (DockState == DockState.Document) ? AppearanceStyle.Document : AppearanceStyle.ToolWindow; } } private Rectangle TabStripRectangle @@ -448,14 +474,15 @@ namespace WeifenLuo.WinFormsUI get { return GetTabStripRectangle(); } } - protected virtual Rectangle DisplayingRectangle + private Rectangle DisplayingRectangle { get { return ClientRectangle; } } + /// public void Activate() { - if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel.ActiveContent != ActiveContent) + if (DockHelper.IsDockStateAutoHide(DockState) && DockPanel.ActiveAutoHideContent != ActiveContent) DockPanel.ActiveAutoHideContent = ActiveContent; if (!IsActivated) @@ -479,7 +506,7 @@ namespace WeifenLuo.WinFormsUI private void CalculateTabs() { - if (Appearance == DockPaneAppearance.ToolWindow) + if (Appearance == AppearanceStyle.ToolWindow) CalculateTabs_ToolWindow(); else CalculateTabs_Document(); @@ -492,9 +519,7 @@ namespace WeifenLuo.WinFormsUI Rectangle rectTabStrip = GetTabStripRectangle(); - ////////////////////////////////////////////////////////////////////////////// - /// Calculate tab widths - /// ////////////////////////////////////////////////////////////////////////// + // Calculate tab widths int countOfVisibleContents = CountOfVisibleContents; int[] maxWidths = new int[countOfVisibleContents]; bool[] flags = new bool[countOfVisibleContents]; @@ -555,9 +580,7 @@ namespace WeifenLuo.WinFormsUI } } - ////////////////////////////////////////////////////////////////////////////// - /// Set the X position of the tabs - ///////////////////////////////////////////////////////////////////////////// + // Set the X position of the tabs int x = rectTabStrip.X + MeasureToolWindowTab.StripGapLeft; for (int i=0; i public DockContent GetVisibleContent(int index) { int currentIndex = -1; @@ -1112,6 +1136,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_isHidden = true; + /// public bool IsHidden { get { return m_isHidden; } @@ -1122,10 +1147,16 @@ namespace WeifenLuo.WinFormsUI return; m_isHidden = value; - if (DockListContainer != null) + if (DockHelper.IsDockStateAutoHide(DockState)) + { + DockPanel.Invalidate(); + DockPanel.PerformLayout(); + } + else if (DockListContainer != null) ((Control)DockListContainer).PerformLayout(); } + /// protected override void OnLayout(LayoutEventArgs e) { SetIsHidden(CountOfVisibleContents == 0); @@ -1137,7 +1168,7 @@ namespace WeifenLuo.WinFormsUI foreach (DockContent content in Contents) { - if (content.DockState == DockState) + if (content.Pane == this) { content.Bounds = (content == ActiveContent) ? rectContent : Rectangle.Empty; content.Visible = (content == ActiveContent); @@ -1148,6 +1179,7 @@ namespace WeifenLuo.WinFormsUI base.OnLayout(e); } + /// protected override void OnMouseMove(MouseEventArgs e) { HitTestResult hitTestResult = GetHitTest(); @@ -1174,6 +1206,7 @@ namespace WeifenLuo.WinFormsUI } } + /// protected override void OnPaint(PaintEventArgs e) { if (ActiveContent != null) @@ -1187,6 +1220,7 @@ namespace WeifenLuo.WinFormsUI base.OnPaint(e); } + /// public override void Refresh() { base.Refresh(); @@ -1270,7 +1304,7 @@ namespace WeifenLuo.WinFormsUI m_buttonScrollLeft.Visible = m_buttonScrollRight.Visible = m_buttonDocumentWindowClose.Visible = false; } - if (Appearance == DockPaneAppearance.ToolWindow) + if (Appearance == AppearanceStyle.ToolWindow) SetInertButtons_ToolWindow(); else SetInertButtons_DocumentWindow(); @@ -1332,6 +1366,7 @@ namespace WeifenLuo.WinFormsUI m_buttonDocumentWindowClose.BorderColor = m_buttonScrollRight.BorderColor = m_buttonScrollLeft.BorderColor = SystemColors.ControlDarkDark; } + /// public void SetContentIndex(DockContent content, int index) { int oldIndex = Contents.IndexOf(content); @@ -1389,10 +1424,10 @@ namespace WeifenLuo.WinFormsUI Control oldParent = Parent; - ///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - /// Workaround for .Net Framework bug: removing control from Form may cause form - /// unclosable. Set focus to another dummy control. - ///!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // Workaround for .Net Framework bug: removing control from Form may cause form + // unclosable. Set focus to another dummy control. + //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Form form = FindForm(); if (ContainsFocus) { @@ -1414,6 +1449,7 @@ namespace WeifenLuo.WinFormsUI m_splitter.Parent = value; } + /// public new void Show() { Activate(); @@ -1520,6 +1556,7 @@ namespace WeifenLuo.WinFormsUI ActiveContent = null; } + /// protected override void WndProc(ref Message m) { if (m.Msg == (int)Win32.Msgs.WM_MOUSEACTIVATE) @@ -1611,11 +1648,13 @@ namespace WeifenLuo.WinFormsUI } private static readonly object DockStateChangedEvent = new object(); + /// public event EventHandler DockStateChanged { add { Events.AddHandler(DockStateChangedEvent, value); } remove { Events.RemoveHandler(DockStateChangedEvent, value); } } + /// protected virtual void OnDockStateChanged(EventArgs e) { EventHandler handler = (EventHandler)Events[DockStateChangedEvent]; @@ -1624,11 +1663,13 @@ namespace WeifenLuo.WinFormsUI } private static readonly object IsActivatedChangedEvent = new object(); + /// public event EventHandler IsActivatedChanged { add { Events.AddHandler(IsActivatedChangedEvent, value); } remove { Events.RemoveHandler(IsActivatedChangedEvent, value); } } + /// protected virtual void OnIsActivatedChanged(EventArgs e) { EventHandler handler = (EventHandler)Events[IsActivatedChangedEvent]; @@ -1637,11 +1678,13 @@ namespace WeifenLuo.WinFormsUI } private static readonly object IsActiveDocumentPaneChangedEvent = new object(); + /// public event EventHandler IsActiveDocumentPaneChanged { add { Events.AddHandler(IsActiveDocumentPaneChangedEvent, value); } remove { Events.RemoveHandler(IsActiveDocumentPaneChangedEvent, value); } } + /// protected virtual void OnIsActiveDocumentPaneChanged(EventArgs e) { EventHandler handler = (EventHandler)Events[IsActiveDocumentPaneChangedEvent]; @@ -1649,6 +1692,7 @@ namespace WeifenLuo.WinFormsUI handler(this, e); } + /// public DockWindow DockWindow { get { return (m_nestedDockingStatus.DockList == null) ? null : m_nestedDockingStatus.DockList.Container as DockWindow; } @@ -1662,6 +1706,7 @@ namespace WeifenLuo.WinFormsUI } } + /// public FloatWindow FloatWindow { get { return (m_nestedDockingStatus.DockList == null) ? null : m_nestedDockingStatus.DockList.Container as FloatWindow; } @@ -1676,17 +1721,20 @@ namespace WeifenLuo.WinFormsUI } private NestedDockingStatus m_nestedDockingStatus; + /// public NestedDockingStatus NestedDockingStatus { get { return m_nestedDockingStatus; } } private bool m_isFloat; + /// public bool IsFloat { get { return m_isFloat; } } + /// public IDockListContainer DockListContainer { get @@ -1699,6 +1747,7 @@ namespace WeifenLuo.WinFormsUI } private DockState m_dockState = DockState.Unknown; + /// public DockState DockState { get { return m_dockState; } @@ -1708,6 +1757,7 @@ namespace WeifenLuo.WinFormsUI } } + /// public DockPane SetDockState(DockState value) { if (value == DockState.Unknown || value == DockState.Hidden) @@ -1826,6 +1876,8 @@ namespace WeifenLuo.WinFormsUI ResumeRefreshStateChange(); } + /// + /// public DockPane AddToDockList(IDockListContainer container) { if (container == null) @@ -1840,6 +1892,7 @@ namespace WeifenLuo.WinFormsUI return AddToDockList(container, container.DockList.GetDefaultPrevPane(this), alignment, 0.5); } + /// public DockPane AddToDockList(IDockListContainer container, DockPane prevPane, DockAlignment alignment, double proportion) { if (container == null) @@ -1918,6 +1971,7 @@ namespace WeifenLuo.WinFormsUI RefreshStateChange(oldContainer, oldDockState); } + /// public void SetNestedDockingProportion(double proportion) { NestedDockingStatus.SetStatus(NestedDockingStatus.DockList, NestedDockingStatus.PrevPane, NestedDockingStatus.Alignment, proportion); @@ -1925,6 +1979,7 @@ namespace WeifenLuo.WinFormsUI ((Control)DockListContainer).PerformLayout(); } + /// public DockPane Float() { DockContent activeContent = ActiveContent; @@ -1972,6 +2027,7 @@ namespace WeifenLuo.WinFormsUI return null; } + /// public void RestoreToPanel() { DockContent activeContent = DockPanel.ActiveContent; diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockPaneCollection.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneCollection.cs similarity index 76% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockPaneCollection.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneCollection.cs index ba2a6009f8..b83a73cce4 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockPaneCollection.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneCollection.cs @@ -15,12 +15,14 @@ using System.Windows.Forms; namespace WeifenLuo.WinFormsUI { + /// > public class DockPaneCollection : ReadOnlyCollectionBase { internal DockPaneCollection() { } + /// > public DockPane this[int index] { get { return InnerList[index] as DockPane; } @@ -58,6 +60,7 @@ namespace WeifenLuo.WinFormsUI InnerList.Insert(IndexOf(paneBefore), pane); } + /// > public bool Contains(DockPane pane) { return InnerList.Contains(pane); @@ -69,6 +72,7 @@ namespace WeifenLuo.WinFormsUI this[i].Close(); } + /// > public int IndexOf(DockPane pane) { return InnerList.IndexOf(pane); diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockPaneSplitter.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneSplitter.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockPaneSplitter.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneSplitter.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockPanel.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPanel.cs similarity index 86% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockPanel.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPanel.cs index c84d9d55e6..ab5e9643ce 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockPanel.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPanel.cs @@ -19,8 +19,10 @@ using System.Text; namespace WeifenLuo.WinFormsUI { + /// public delegate DockContent DeserializeDockContent(string persistString); + /// [Designer(typeof(System.Windows.Forms.Design.ControlDesigner))] public class DockPanel : Panel { @@ -59,6 +61,7 @@ namespace WeifenLuo.WinFormsUI AutoHideDockStates[3] = DockState.DockBottomAutoHide; } + /// public DockPanel() { m_dragHandler = new DragHandler(this); @@ -115,6 +118,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_disposed = false; + /// protected override void Dispose(bool disposing) { if (!m_disposed) @@ -137,6 +141,7 @@ namespace WeifenLuo.WinFormsUI } } + /// [Browsable(false)] public DockContent ActiveAutoHideContent { @@ -145,6 +150,7 @@ namespace WeifenLuo.WinFormsUI } private DockContent m_activeContent = null; + /// [Browsable(false)] public DockContent ActiveContent { @@ -169,6 +175,7 @@ namespace WeifenLuo.WinFormsUI } private DockPane m_activePane = null; + /// [Browsable(false)] public DockPane ActivePane { @@ -195,19 +202,15 @@ namespace WeifenLuo.WinFormsUI for (; control != null; control = control.Parent) { pane = control as DockPane; - if (pane != null) + if (pane != null && pane.DockPanel == this) break; } - if (pane == null) - return null; - else if (pane.DockPanel != this) - return null; - else - return pane; + return pane; } private DockContent m_activeDocument = null; + /// [Browsable(false)] public DockContent ActiveDocument { @@ -229,6 +232,7 @@ namespace WeifenLuo.WinFormsUI } private DockPane m_activeDocumentPane = null; + /// [Browsable(false)] public DockPane ActiveDocumentPane { @@ -264,6 +268,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_allowRedocking = true; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockPanel.AllowRedocking.Description")] [DefaultValue(true)] @@ -280,12 +285,14 @@ namespace WeifenLuo.WinFormsUI } private DockContentCollection m_contents = new DockContentCollection(); + /// [Browsable(false)] public DockContentCollection Contents { get { return m_contents; } } + /// protected internal virtual IDockPaneFactory DockPaneFactory { get { return DefaultDockPaneFactory; } @@ -298,6 +305,7 @@ namespace WeifenLuo.WinFormsUI } private DockPaneCollection m_panes; + /// [Browsable(false)] public DockPaneCollection Panes { @@ -315,6 +323,7 @@ namespace WeifenLuo.WinFormsUI } private double m_dockBottomPortion = 0.25; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockPanel.DockBottomPortion.Description")] [DefaultValue(0.25)] @@ -339,6 +348,7 @@ namespace WeifenLuo.WinFormsUI } private double m_dockLeftPortion = 0.25; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockPanel.DockLeftPortion.Description")] [DefaultValue(0.25)] @@ -363,6 +373,7 @@ namespace WeifenLuo.WinFormsUI } private double m_dockRightPortion = 0.25; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockPanel.DockRightPortion.Description")] [DefaultValue(0.25)] @@ -387,6 +398,7 @@ namespace WeifenLuo.WinFormsUI } private double m_dockTopPortion = 0.25; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockPanel.DockTopPortion.Description")] [DefaultValue(0.25)] @@ -411,12 +423,14 @@ namespace WeifenLuo.WinFormsUI } private DockWindowCollection m_dockWindows; + /// [Browsable(false)] public DockWindowCollection DockWindows { get { return m_dockWindows; } } + /// [Browsable(false)] public DockContent[] Documents { @@ -459,12 +473,14 @@ namespace WeifenLuo.WinFormsUI get { return m_dummyControl; } } + /// protected internal virtual IFloatWindowFactory FloatWindowFactory { get { return DefaultFloatWindowFactory; } } private FloatWindowCollection m_floatWindows; + /// [Browsable(false)] public FloatWindowCollection FloatWindows { @@ -472,6 +488,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_mdiIntegration = true; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockPanel.MdiIntegration.Description")] [DefaultValue(true)] @@ -489,6 +506,7 @@ namespace WeifenLuo.WinFormsUI } private bool m_sdiDocument = false; + /// [LocalizedCategory("Category.Docking")] [LocalizedDescription("DockPanel.SdiDocument.Description")] [DefaultValue(false)] @@ -505,6 +523,7 @@ namespace WeifenLuo.WinFormsUI } } + /// protected override void OnLayout(LayoutEventArgs levent) { CalculateDockPadding(); @@ -538,6 +557,7 @@ namespace WeifenLuo.WinFormsUI base.OnLayout(levent); } + /// protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); @@ -556,16 +576,14 @@ namespace WeifenLuo.WinFormsUI content.Pane.Activate(); } + /// protected override void OnMouseHover(EventArgs e) { base.OnMouseHover(e); DockContent content = GetHitTest(); if (content != null && ActiveAutoHideContent != content) - { ActiveAutoHideContent = content; - Invalidate(); - } // requires further tracking of mouse hover behavior, // call TrackMouseEvent @@ -573,6 +591,7 @@ namespace WeifenLuo.WinFormsUI User32.TrackMouseEvent(ref tme); } + /// protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); @@ -674,12 +693,15 @@ namespace WeifenLuo.WinFormsUI int x = MeasureAutoHideTab.TabGapLeft + rectTabStrip.X; foreach (DockPane pane in Panes) { - if (pane.DockState != dockState) + if (pane.DockState != dockState || pane.IsHidden) continue; int maxWidth = 0; foreach (DockContent content in pane.Contents) { + if (content.DockState != pane.DockState) + continue; + int width = imageWidth + MeasureAutoHideTab.ImageGapLeft + MeasureAutoHideTab.ImageGapRight + (int)g.MeasureString(content.TabText, Font).Width + 1 + @@ -690,7 +712,7 @@ namespace WeifenLuo.WinFormsUI foreach (DockContent content in pane.Contents) { - if (content.IsHidden) + if (content.DockState != pane.DockState) continue; content.TabX = x; @@ -780,7 +802,7 @@ namespace WeifenLuo.WinFormsUI foreach (DockContent content in pane.Contents) { - if (!content.IsHidden) + if (content.DockState == pane.DockState) DrawTab(g, dockState, pane, content); } } @@ -840,7 +862,7 @@ namespace WeifenLuo.WinFormsUI foreach (DockPane pane in Panes) { - if (pane.DockState == dockState) + if (pane.DockState == dockState && !pane.IsHidden) result ++; } @@ -859,12 +881,12 @@ namespace WeifenLuo.WinFormsUI foreach(DockPane pane in Panes) { - if (pane.DockState != state) + if (pane.DockState != state || pane.IsHidden) continue; foreach(DockContent content in pane.Contents) { - if (content.IsHidden) + if (content.DockState != pane.DockState) continue; Rectangle rectTab = GetTabRectangle(state, content, true); @@ -1004,7 +1026,7 @@ namespace WeifenLuo.WinFormsUI AutoHideWindow.RefreshActivePane(); } - public void RefreshMdiIntegration() + private void RefreshMdiIntegration() { foreach (DockPane pane in Panes) { @@ -1044,6 +1066,7 @@ namespace WeifenLuo.WinFormsUI FloatWindows.Remove(floatWindow); } + /// public void SetPaneIndex(DockPane pane, int index) { int oldIndex = Panes.IndexOf(pane); @@ -1136,6 +1159,7 @@ namespace WeifenLuo.WinFormsUI dragHandler.DragOutline = DrawHelper.CreateDragOutline(rect, dragSize); } + /// protected override void WndProc(ref Message m) { if (m.Msg == WM_REFRESHACTIVEWINDOW) @@ -1145,6 +1169,7 @@ namespace WeifenLuo.WinFormsUI } private static readonly object ActiveDocumentChangedEvent = new object(); + /// [LocalizedCategory("Category.PropertyChanged")] [LocalizedDescription("DockPanel.ActiveDocumentChanged.Description")] public event EventHandler ActiveDocumentChanged @@ -1152,6 +1177,7 @@ namespace WeifenLuo.WinFormsUI add { Events.AddHandler(ActiveDocumentChangedEvent, value); } remove { Events.RemoveHandler(ActiveDocumentChangedEvent, value); } } + /// protected virtual void OnActiveDocumentChanged(EventArgs e) { EventHandler handler = (EventHandler)Events[ActiveDocumentChangedEvent]; @@ -1160,6 +1186,7 @@ namespace WeifenLuo.WinFormsUI } private static readonly object ActiveContentChangedEvent = new object(); + /// [LocalizedCategory("Category.PropertyChanged")] [LocalizedDescription("DockPanel.ActiveContentChanged.Description")] public event EventHandler ActiveContentChanged @@ -1167,6 +1194,7 @@ namespace WeifenLuo.WinFormsUI add { Events.AddHandler(ActiveContentChangedEvent, value); } remove { Events.RemoveHandler(ActiveContentChangedEvent, value); } } + /// protected virtual void OnActiveContentChanged(EventArgs e) { EventHandler handler = (EventHandler)Events[ActiveContentChangedEvent]; @@ -1175,6 +1203,7 @@ namespace WeifenLuo.WinFormsUI } private static readonly object ActivePaneChangedEvent = new object(); + /// [LocalizedCategory("Category.PropertyChanged")] [LocalizedDescription("DockPanel.ActivePaneChanged.Description")] public event EventHandler ActivePaneChanged @@ -1182,6 +1211,7 @@ namespace WeifenLuo.WinFormsUI add { Events.AddHandler(ActivePaneChangedEvent, value); } remove { Events.RemoveHandler(ActivePaneChangedEvent, value); } } + /// protected virtual void OnActivePaneChanged(EventArgs e) { EventHandler handler = (EventHandler)Events[ActivePaneChangedEvent]; @@ -1189,8 +1219,10 @@ namespace WeifenLuo.WinFormsUI handler(this, e); } + /// public delegate void DockContentEventHandler(object sender, DockContentEventArgs e); private static readonly object ContentAddedEvent = new object(); + /// [LocalizedCategory("Category.DockingNotification")] [LocalizedDescription("DockPanel.ContentAdded.Description")] public event DockContentEventHandler ContentAdded @@ -1198,6 +1230,7 @@ namespace WeifenLuo.WinFormsUI add { Events.AddHandler(ContentAddedEvent, value); } remove { Events.RemoveHandler(ContentAddedEvent, value); } } + /// protected virtual void OnContentAdded(DockContentEventArgs e) { DockContentEventHandler handler = (DockContentEventHandler)Events[ContentAddedEvent]; @@ -1206,6 +1239,7 @@ namespace WeifenLuo.WinFormsUI } private static readonly object ContentRemovedEvent = new object(); + /// [LocalizedCategory("Category.DockingNotification")] [LocalizedDescription("DockPanel.ContentRemoved.Description")] public event DockContentEventHandler ContentRemoved @@ -1213,6 +1247,7 @@ namespace WeifenLuo.WinFormsUI add { Events.AddHandler(ContentRemovedEvent, value); } remove { Events.RemoveHandler(ContentRemovedEvent, value); } } + /// protected virtual void OnContentRemoved(DockContentEventArgs e) { DockContentEventHandler handler = (DockContentEventHandler)Events[ContentRemovedEvent]; @@ -1220,26 +1255,33 @@ namespace WeifenLuo.WinFormsUI handler(this, e); } + /// + /// public void SaveAsXml(string filename) { DockPanelPersist.SaveAsXml(this, filename); } + /// public void SaveAsXml(string filename, Encoding encoding) { DockPanelPersist.SaveAsXml(this, filename, encoding); } + /// public void SaveAsXml(Stream stream, Encoding encoding) { DockPanelPersist.SaveAsXml(this, stream, encoding); } + /// + /// public void LoadFromXml(string filename, DeserializeDockContent deserializeContent) { DockPanelPersist.LoadFromXml(this, filename, deserializeContent); } + /// public void LoadFromXml(Stream stream, DeserializeDockContent deserializeContent) { DockPanelPersist.LoadFromXml(this, stream, deserializeContent); diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockPanelPersist.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPanelPersist.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockPanelPersist.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPanelPersist.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockWindow.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindow.cs similarity index 81% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockWindow.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindow.cs index 9375c6c1ca..c27ac94753 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockWindow.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindow.cs @@ -14,6 +14,7 @@ using System.Drawing; namespace WeifenLuo.WinFormsUI { + /// public class DockWindow : Panel, IDockListContainer { private DockPanel m_dockPanel; @@ -63,32 +64,38 @@ namespace WeifenLuo.WinFormsUI ResumeLayout(); } + /// protected override Size DefaultSize { // Set the default size to empty to reduce the screen flicker get { return Size.Empty; } } + /// public DisplayingDockList DisplayingList { get { return DockList.DisplayingList; } } + /// public DockList DockList { get { return m_dockList; } } + /// public DockPanel DockPanel { get { return m_dockPanel; } } + /// public DockState DockState { get { return m_dockState; } } + /// public bool IsFloat { get { return DockState == DockState.Float; } @@ -99,6 +106,7 @@ namespace WeifenLuo.WinFormsUI get { return DisplayingList.Count == 0 ? null : DisplayingList[0]; } } + /// public virtual Rectangle DisplayingRectangle { get @@ -132,6 +140,7 @@ namespace WeifenLuo.WinFormsUI } } + /// protected override void OnPaint(PaintEventArgs e) { // if DockWindow is document, draw the border @@ -141,6 +150,7 @@ namespace WeifenLuo.WinFormsUI base.OnPaint(e); } + /// protected override void OnLayout(LayoutEventArgs levent) { DisplayingList.Refresh(); diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockWindowCollection.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindowCollection.cs similarity index 86% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockWindowCollection.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindowCollection.cs index de0f04e4d7..d97fd4459b 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DockWindowCollection.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindowCollection.cs @@ -13,6 +13,7 @@ using System.Collections; namespace WeifenLuo.WinFormsUI { + /// > public class DockWindowCollection : ReadOnlyCollectionBase { internal DockWindowCollection(DockPanel dockPanel) @@ -24,6 +25,7 @@ namespace WeifenLuo.WinFormsUI InnerList.Add(new DockWindow(dockPanel, DockState.DockBottom)); } + /// > public DockWindow this [DockState dockState] { get diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DockWindowSplitter.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindowSplitter.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/DockWindowSplitter.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockWindowSplitter.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DragHandler.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DragHandler.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/DragHandler.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DragHandler.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DragHandlerBase.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DragHandlerBase.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/DragHandlerBase.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DragHandlerBase.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DummyControl.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/DummyControl.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/DummyControl.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/DummyControl.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/Enums.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/Enums.cs new file mode 100644 index 0000000000..1806cca0e5 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/Enums.cs @@ -0,0 +1,78 @@ +// ***************************************************************************** +// +// Copyright 2004, Weifen Luo +// All rights reserved. The software and associated documentation +// supplied hereunder are the proprietary information of Weifen Luo +// and are supplied subject to licence terms. +// +// WinFormsUI Library Version 1.0 +// ***************************************************************************** + +using System; +using System.ComponentModel; +using System.Windows.Forms; + +namespace WeifenLuo.WinFormsUI +{ + /// + [Flags] + [Serializable] + [Editor(typeof(DockAreasEditor), typeof(System.Drawing.Design.UITypeEditor))] + public enum DockAreas + { + /// + Float = 1, + /// + DockLeft = 2, + /// + DockRight = 4, + /// + DockTop = 8, + /// + DockBottom = 16, + /// + Document = 32 + } + + /// + public enum DockState + { + /// + Unknown = 0, + /// + Float = 1, + /// + DockTopAutoHide = 2, + /// + DockLeftAutoHide = 3, + /// + DockBottomAutoHide = 4, + /// + DockRightAutoHide = 5, + /// + Document = 6, + /// + DockTop = 7, + /// + DockLeft = 8, + /// + DockBottom = 9, + /// + DockRight = 10, + /// + Hidden = 11 + } + + /// + public enum DockAlignment + { + /// + Left, + /// + Right, + /// + Top, + /// + Bottom + } +} diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/EventArgs.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/EventArgs.cs similarity index 62% rename from src/Libraries/DockPanel_Src/WinFormsUI/EventArgs.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/EventArgs.cs index 0af785a30b..d2f4db2d5e 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/EventArgs.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/EventArgs.cs @@ -11,15 +11,18 @@ using System; namespace WeifenLuo.WinFormsUI { + /// public class DockContentEventArgs : EventArgs { - public DockContent m_content; + private DockContent m_content; + /// public DockContentEventArgs(DockContent content) { m_content = content; } + /// public DockContent Content { get { return m_content; } diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/FloatWindow.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/FloatWindow.cs similarity index 78% rename from src/Libraries/DockPanel_Src/WinFormsUI/FloatWindow.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/FloatWindow.cs index d4ec357c91..7e432c14ec 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/FloatWindow.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/FloatWindow.cs @@ -15,20 +15,21 @@ using System.Windows.Forms; namespace WeifenLuo.WinFormsUI { - /// - /// Descripiton of class FloatWindow - /// + /// public class FloatWindow : Form, IDockListContainer { private DockList m_dockList; internal static Size DefaultWindowSize = new Size(300, 300); internal const int WM_CHECKDISPOSE = (int)(Win32.Msgs.WM_USER + 1); + /// + /// public FloatWindow(DockPanel dockPanel, DockPane pane) { InternalConstruct(dockPanel, pane, false, Rectangle.Empty); } + /// public FloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds) { InternalConstruct(dockPanel, pane, true, bounds); @@ -66,6 +67,7 @@ namespace WeifenLuo.WinFormsUI ResumeLayout(); } + /// protected override void Dispose(bool disposing) { if (disposing) @@ -78,38 +80,45 @@ namespace WeifenLuo.WinFormsUI } private bool m_allowRedocking = true; + /// public bool AllowRedocking { get { return m_allowRedocking; } set { m_allowRedocking = value; } } + /// protected override Size DefaultSize { get { return FloatWindow.DefaultWindowSize; } } + /// public DockList DockList { get { return m_dockList; } } + /// public DisplayingDockList DisplayingList { get { return DockList.DisplayingList; } } private DockPanel m_dockPanel; + /// public DockPanel DockPanel { get { return m_dockPanel; } } + /// public DockState DockState { get { return DockState.Float; } } + /// public bool IsFloat { get { return DockState == DockState.Float; } @@ -121,7 +130,7 @@ namespace WeifenLuo.WinFormsUI get { return m_dummyControl; } } - public bool IsDockStateValid(DockState dockState) + internal bool IsDockStateValid(DockState dockState) { foreach (DockPane pane in DockList) foreach (DockContent content in pane.Contents) @@ -131,12 +140,14 @@ namespace WeifenLuo.WinFormsUI return true; } + /// protected override void OnActivated(EventArgs e) { DockPanel.FloatWindows.BringWindowToFront(this); base.OnActivated (e); } + /// protected override void OnLayout(LayoutEventArgs levent) { DisplayingList.Refresh(); @@ -158,6 +169,7 @@ namespace WeifenLuo.WinFormsUI Text = theOnlyPane.ActiveContent.Text; } + /// protected override void WndProc(ref Message m) { if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDOWN) @@ -235,6 +247,7 @@ namespace WeifenLuo.WinFormsUI base.WndProc(ref m); } + /// public virtual Rectangle DisplayingRectangle { get { return ClientRectangle; } diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/FloatWindowCollection.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/FloatWindowCollection.cs similarity index 70% rename from src/Libraries/DockPanel_Src/WinFormsUI/FloatWindowCollection.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/FloatWindowCollection.cs index 6260d0da4f..b4d52d7efd 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/FloatWindowCollection.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/FloatWindowCollection.cs @@ -15,15 +15,14 @@ using System.Windows.Forms; namespace WeifenLuo.WinFormsUI { - /// - /// Summary description for FloatWindowCollection. - /// + /// > public class FloatWindowCollection : ReadOnlyCollectionBase { internal FloatWindowCollection() { } + /// > public FloatWindow this[int index] { get { return InnerList[index] as FloatWindow; } @@ -37,6 +36,7 @@ namespace WeifenLuo.WinFormsUI return InnerList.Add(fw); } + /// > public bool Contains(FloatWindow fw) { return InnerList.Contains(fw); @@ -48,6 +48,7 @@ namespace WeifenLuo.WinFormsUI this[i].Close(); } + /// > public int IndexOf(FloatWindow fw) { return InnerList.IndexOf(fw); diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/HiddenMdiChild.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/HiddenMdiChild.cs similarity index 95% rename from src/Libraries/DockPanel_Src/WinFormsUI/HiddenMdiChild.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/HiddenMdiChild.cs index 58a2e5c957..077ca5cd5d 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/HiddenMdiChild.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/HiddenMdiChild.cs @@ -14,9 +14,6 @@ using System.Windows.Forms; namespace WeifenLuo.WinFormsUI { - /// - /// Summary description for HiddenMdiChild. - /// internal class HiddenMdiChild : Form { private DockContent m_content = null; diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Docking/Interfaces.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/Interfaces.cs new file mode 100644 index 0000000000..323634fed1 --- /dev/null +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/Interfaces.cs @@ -0,0 +1,92 @@ +// ***************************************************************************** +// +// Copyright 2004, Weifen Luo +// All rights reserved. The software and associated documentation +// supplied hereunder are the proprietary information of Weifen Luo +// and are supplied subject to licence terms. +// +// WinFormsUI Library Version 1.0 +// ***************************************************************************** + +using System; +using System.Drawing; + +namespace WeifenLuo.WinFormsUI +{ + /// + public interface IDockListContainer + { + /// + DockState DockState { get; } + /// + Rectangle DisplayingRectangle { get; } + /// + DockList DockList { get; } + /// + DisplayingDockList DisplayingList { get; } + /// + bool IsDisposed { get; } + /// + bool IsFloat { get; } + } + + /// + public interface IDockPaneFactory + { + /// + /// + DockPane CreateDockPane(DockContent content, DockState visibleState, bool show); + /// + DockPane CreateDockPane(DockContent content, FloatWindow floatWindow, bool show); + /// + DockPane CreateDockPane(DockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show); + /// + DockPane CreateDockPane(DockContent content, Rectangle floatWindowBounds, bool show); + } + + internal class DefaultDockPaneFactory : IDockPaneFactory + { + public DockPane CreateDockPane(DockContent content, DockState visibleState, bool show) + { + return new DockPane(content, visibleState, show); + } + + public DockPane CreateDockPane(DockContent content, FloatWindow floatWindow, bool show) + { + return new DockPane(content, floatWindow, show); + } + + public DockPane CreateDockPane(DockContent content, DockPane prevPane, DockAlignment alignment, double proportion, bool show) + { + return new DockPane(content, prevPane, alignment, proportion, show); + } + + public DockPane CreateDockPane(DockContent content, Rectangle floatWindowBounds, bool show) + { + return new DockPane(content, floatWindowBounds, show); + } + } + + /// + public interface IFloatWindowFactory + { + /// + /// + FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane); + /// + FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds); + } + + internal class DefaultFloatWindowFactory : IFloatWindowFactory + { + public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane) + { + return new FloatWindow(dockPanel, pane); + } + + public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds) + { + return new FloatWindow(dockPanel, pane, bounds); + } + } +} diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Measures.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/Measures.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/Measures.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/Measures.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/NestedDockingStatus.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/NestedDockingStatus.cs similarity index 61% rename from src/Libraries/DockPanel_Src/WinFormsUI/NestedDockingStatus.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/NestedDockingStatus.cs index 3f4836ad9d..9dd7a58e2d 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/NestedDockingStatus.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/NestedDockingStatus.cs @@ -13,6 +13,7 @@ using System.Drawing; namespace WeifenLuo.WinFormsUI { + /// public class NestedDockingStatus { internal NestedDockingStatus(DockPane pane) @@ -21,72 +22,84 @@ namespace WeifenLuo.WinFormsUI } private DockPane m_dockPane = null; + /// public DockPane DockPane { get { return m_dockPane; } } private DockList m_dockList = null; + /// public DockList DockList { get { return m_dockList; } } private DockPane m_prevPane = null; + /// public DockPane PrevPane { get { return m_prevPane; } } private DockAlignment m_alignment = DockAlignment.Left; + /// public DockAlignment Alignment { get { return m_alignment; } } private double m_proportion = 0.5; + /// public double Proportion { get { return m_proportion; } } private bool m_isDisplaying = false; + /// public bool IsDisplaying { get { return m_isDisplaying; } } private DockPane m_displayingPrevPane = null; + /// public DockPane DisplayingPrevPane { get { return m_displayingPrevPane; } } private DockAlignment m_displayingAlignment = DockAlignment.Left; + /// public DockAlignment DisplayingAlignment { get { return m_displayingAlignment; } } private double m_displayingProportion = 0.5; + /// public double DisplayingProportion { get { return m_displayingProportion; } } private Rectangle m_logicalBounds = Rectangle.Empty; + /// public Rectangle LogicalBounds { get { return m_logicalBounds; } } private Rectangle m_paneBounds = Rectangle.Empty; + /// public Rectangle PaneBounds { get { return m_paneBounds; } } private Rectangle m_splitterBounds = Rectangle.Empty; + /// public Rectangle SplitterBounds { get { return m_splitterBounds; } diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/SplitterBase.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Docking/SplitterBase.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/SplitterBase.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Docking/SplitterBase.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Enums.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Enums.cs deleted file mode 100644 index 14dd210bad..0000000000 --- a/src/Libraries/DockPanel_Src/WinFormsUI/Enums.cs +++ /dev/null @@ -1,60 +0,0 @@ -// ***************************************************************************** -// -// Copyright 2004, Weifen Luo -// All rights reserved. The software and associated documentation -// supplied hereunder are the proprietary information of Weifen Luo -// and are supplied subject to licence terms. -// -// WinFormsUI Library Version 1.0 -// ***************************************************************************** - -using System; -using System.ComponentModel; -using System.Windows.Forms; - -namespace WeifenLuo.WinFormsUI -{ - [Flags] - [Serializable] - [Editor(typeof(DockAreasEditor), typeof(System.Drawing.Design.UITypeEditor))] - public enum DockAreas - { - Float = 1, - DockLeft = 2, - DockRight = 4, - DockTop = 8, - DockBottom = 16, - Document = 32 - } - - public enum DockState - { - Unknown = 0, - Float = 1, - DockTopAutoHide = 2, - DockLeftAutoHide = 3, - DockBottomAutoHide = 4, - DockRightAutoHide = 5, - Document = 6, - DockTop = 7, - DockLeft = 8, - DockBottom = 9, - DockRight = 10, - Hidden = 11 - } - - public enum DockPaneType - { - AutoHide, - Dock, - Float - } - - public enum DockAlignment - { - Left, - Right, - Top, - Bottom - } -} diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/DrawHelper.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Helpers/DrawHelper.cs similarity index 98% rename from src/Libraries/DockPanel_Src/WinFormsUI/DrawHelper.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Helpers/DrawHelper.cs index bf77982a6e..585e6a6477 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/DrawHelper.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Helpers/DrawHelper.cs @@ -15,9 +15,6 @@ using System.Windows.Forms; namespace WeifenLuo.WinFormsUI { - /// - /// Summary description for DrawHelper. - /// internal class DrawHelper { private static IntPtr m_halfToneBrush = IntPtr.Zero; diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/LocalWindowsHook.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Helpers/LocalWindowsHook.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/LocalWindowsHook.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Helpers/LocalWindowsHook.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Localization.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Helpers/Localization.cs similarity index 100% rename from src/Libraries/DockPanel_Src/WinFormsUI/Localization.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Helpers/Localization.cs diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/ResourceHelper.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Helpers/ResourceHelper.cs similarity index 93% rename from src/Libraries/DockPanel_Src/WinFormsUI/ResourceHelper.cs rename to src/Libraries/DockPanel_Src/WinFormsUI/Helpers/ResourceHelper.cs index 4d2c62648e..287efa7c52 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/ResourceHelper.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Helpers/ResourceHelper.cs @@ -12,14 +12,10 @@ using System; using System.Drawing; using System.Reflection; using System.Resources; - using System.Windows.Forms; namespace WeifenLuo.WinFormsUI { - /// - /// Summary description for ResourceHelper. - /// internal class ResourceHelper { private static ResourceManager m_resourceManager; diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Interfaces.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Interfaces.cs deleted file mode 100644 index 47786933ac..0000000000 --- a/src/Libraries/DockPanel_Src/WinFormsUI/Interfaces.cs +++ /dev/null @@ -1,69 +0,0 @@ -// ***************************************************************************** -// -// Copyright 2004, Weifen Luo -// All rights reserved. The software and associated documentation -// supplied hereunder are the proprietary information of Weifen Luo -// and are supplied subject to licence terms. -// -// WinFormsUI Library Version 1.0 -// ***************************************************************************** - -using System; -using System.Drawing; - -namespace WeifenLuo.WinFormsUI -{ - public interface IDockListContainer - { - DockState DockState { get; } - Rectangle DisplayingRectangle { get; } - DockList DockList { get; } - DisplayingDockList DisplayingList { get; } - bool IsDisposed { get; } - bool IsFloat { get; } - } - - public interface IDockPaneFactory - { - DockPane CreateDockPane(DockContent content, DockState visibleState, bool show); - DockPane CreateDockPane(DockContent content, FloatWindow floatWindow, bool show); - DockPane CreateDockPane(DockContent content, Rectangle floatWindowBounds, bool show); - } - - internal class DefaultDockPaneFactory : IDockPaneFactory - { - public DockPane CreateDockPane(DockContent content, DockState visibleState, bool show) - { - return new DockPane(content, visibleState, show); - } - - public DockPane CreateDockPane(DockContent content, FloatWindow floatWindow, bool show) - { - return new DockPane(content, floatWindow, show); - } - - public DockPane CreateDockPane(DockContent content, Rectangle floatWindowBounds, bool show) - { - return new DockPane(content, floatWindowBounds, show); - } - } - - public interface IFloatWindowFactory - { - FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane); - FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds); - } - - internal class DefaultFloatWindowFactory : IFloatWindowFactory - { - public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane) - { - return new FloatWindow(dockPanel, pane); - } - - public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds) - { - return new FloatWindow(dockPanel, pane, bounds); - } - } -} diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Strings.ResX b/src/Libraries/DockPanel_Src/WinFormsUI/Strings.ResX index 3e646e29e8..1b9c2dd821 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/Strings.ResX +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Strings.ResX @@ -313,4 +313,13 @@ Determines if the documents are integrated as MDI child forms. + + The Pane can not be null. + + + Invalid beforeContent, it must be contained by the pane. + + + The prevPane is invalid. It can not be null, and its docking state must not be auto-hide. + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/Win32/User32.cs b/src/Libraries/DockPanel_Src/WinFormsUI/Win32/User32.cs index 43206af74e..6c0a2aec1c 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/Win32/User32.cs +++ b/src/Libraries/DockPanel_Src/WinFormsUI/Win32/User32.cs @@ -15,7 +15,6 @@ using WeifenLuo.WinFormsUI.Win32; namespace WeifenLuo.WinFormsUI { - internal class User32 { [DllImport("User32.dll", CharSet=CharSet.Auto)] diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj b/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj index 643e4d08c2..1fd2b419f7 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj +++ b/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj @@ -1,4 +1,4 @@ - + Local 8.0.41115 @@ -6,7 +6,11 @@ {D3C782BA-178E-4235-A3BA-8C11DEBB6BEE} Debug AnyCPU - WeifenLuo.WinFormsUI + + + + + WeifenLuo.WinFormsUI.Docking ..\..\..\Main\Core\Project\Resources\ICSharpCode.Core.snk JScript Grid @@ -15,6 +19,10 @@ Library WeifenLuo.WinFormsUI OnBuildSuccess + + + + true @@ -22,10 +30,15 @@ false 285212672 false + + DEBUG;TRACE + bin\Debug\CodeDoc.xml true 4096 false + + false false false @@ -37,10 +50,16 @@ false 285212672 false + + TRACE + + false 4096 false + + true false false @@ -48,97 +67,119 @@ 4 - - - - - + + System + + + System.Data + + + System.Design + + + System.Drawing + + + System.Windows.Forms + + + System.XML + Code - - - + + + + + + + Code - + Code - + Form - + Code - + Code - + Code - + UserControl - + Code - - - Code + - - - + Code - - + + + + + Code - + + + Code - + Code - - + + + Code - + Code - + Form - + Code - + Form - - + Code - + Code - + Code - + + + + Code + + Code - + Code - + Code - Code @@ -162,6 +203,24 @@ + + + + + + + + + + + + + + + + + + ICSharpCode.Core.snk @@ -170,4 +229,10 @@ + + + + + + \ No newline at end of file diff --git a/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj.user b/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj.user index 910657fe3b..d8115b8f30 100644 --- a/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj.user +++ b/src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj.user @@ -1,8 +1,14 @@ - + 8.0.41115 Debug AnyCPU + + + + + + 0 ProjectFiles 0 @@ -13,7 +19,19 @@ false false false + + Project + + + + + + + + + + true @@ -22,7 +40,19 @@ false false false + + Project + + + + + + + + + + false \ No newline at end of file diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/BookmarkActions.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/BookmarkActions.cs index a40f825762..75427d0d5d 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/BookmarkActions.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/BookmarkActions.cs @@ -1,7 +1,7 @@ -// +// // // -// +// // // diff --git a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs index 68ff4cf5c9..81b6eee617 100644 --- a/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs +++ b/src/Libraries/ICSharpCode.TextEditor/Project/Src/Actions/MiscActions.cs @@ -1,7 +1,7 @@ -// +// // // -// +// // //