Browse Source

Patched docking suite. Take care on docking library updates:

Fixed warnings in docking suite. Tabs can be closed with middle mouse button.
Included bug fixes from docking suite's bug tracker on SF.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@365 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 21 years ago
parent
commit
13ef4c0826
  1. 28
      src/Libraries/DockPanel_Src/WinFormsUI/AssemblyInfo.cs
  2. 4
      src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs
  3. 2
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripVS2003.cs
  4. 4
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContent.cs
  5. 5
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPane.cs
  6. 2
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneCaptionBase.cs
  7. 10
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs
  8. 6
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripVS2003.cs
  9. 4
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPanel.cs
  10. 2
      src/Libraries/DockPanel_Src/WinFormsUI/Helpers/LocalWindowsHook.cs
  11. 5
      src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj

28
src/Libraries/DockPanel_Src/WinFormsUI/AssemblyInfo.cs

@ -27,31 +27,3 @@ using System.Runtime.CompilerServices; @@ -27,31 +27,3 @@ using System.Runtime.CompilerServices;
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.99.0.3")]
// 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.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

4
src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs

@ -64,7 +64,7 @@ namespace WeifenLuo.WinFormsUI @@ -64,7 +64,7 @@ namespace WeifenLuo.WinFormsUI
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
// Prevent base class from trying to generate double click events and
// so testing clicks against the double click time and rectangle. Getting
@ -606,4 +606,4 @@ namespace WeifenLuo.WinFormsUI @@ -606,4 +606,4 @@ namespace WeifenLuo.WinFormsUI
Invalidate();
}
}
}
}

2
src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripVS2003.cs

@ -179,7 +179,7 @@ namespace WeifenLuo.WinFormsUI @@ -179,7 +179,7 @@ namespace WeifenLuo.WinFormsUI
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
BackColor = Color.WhiteSmoke;
}

4
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockContent.cs

@ -667,9 +667,9 @@ namespace WeifenLuo.WinFormsUI @@ -667,9 +667,9 @@ namespace WeifenLuo.WinFormsUI
if (dockPanel == null)
throw(new ArgumentNullException(ResourceHelper.GetString("DockContent.Show.NullDockPanel")));
if (DockState == DockState.Unknown)
if (DockState == DockState.Unknown || Pane == null)
Show(dockPanel, DefaultShowState);
else
else
Activate();
}

5
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPane.cs

@ -109,7 +109,7 @@ namespace WeifenLuo.WinFormsUI @@ -109,7 +109,7 @@ namespace WeifenLuo.WinFormsUI
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.Selectable, true);
m_isFloat = (dockState == DockState.Float);
@ -597,8 +597,9 @@ namespace WeifenLuo.WinFormsUI @@ -597,8 +597,9 @@ namespace WeifenLuo.WinFormsUI
// Need to set the visible content first, otherwise keyboard focus will be lost
if (ActiveContent != null)
{
ActiveContent.Visible = true;
ActiveContent.Bounds = rectContent;
ActiveContent.BringToFront();
ActiveContent.Visible = true;
}
// Hide all inactive contents

2
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneCaptionBase.cs

@ -24,7 +24,7 @@ namespace WeifenLuo.WinFormsUI @@ -24,7 +24,7 @@ namespace WeifenLuo.WinFormsUI
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SetStyle(ControlStyles.Selectable, false);
}

10
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripBase.cs

@ -112,6 +112,16 @@ namespace WeifenLuo.WinFormsUI @@ -112,6 +112,16 @@ namespace WeifenLuo.WinFormsUI
base.WndProc(ref m);
return;
}
else if (m.Msg == (int)Win32.Msgs.WM_MBUTTONUP)
{
base.WndProc(ref m);
int index = GetHitTest();
if (index != -1)
{
DockPane.CloseContent(Tabs[index].Content);
}
return;
}
else if (m.Msg == (int)Win32.Msgs.WM_RBUTTONDOWN)
{
int index = GetHitTest();

6
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripVS2003.cs

@ -383,7 +383,7 @@ namespace WeifenLuo.WinFormsUI @@ -383,7 +383,7 @@ namespace WeifenLuo.WinFormsUI
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
SuspendLayout();
@ -838,10 +838,10 @@ namespace WeifenLuo.WinFormsUI @@ -838,10 +838,10 @@ namespace WeifenLuo.WinFormsUI
Rectangle rectTabStrip = TabsRectangle;
int index;
for (index=0; index<Tabs.Count; index++)
for (index=0; index<Tabs.Count - 1; index++)
if (GetTabRectangle(index).IntersectsWith(rectTabStrip))
break;
Rectangle rectTab = GetTabRectangle(index);
if (rectTab.Left < rectTabStrip.Left)
OffsetX += rectTabStrip.Left - rectTab.Left;

4
src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPanel.cs

@ -41,7 +41,7 @@ namespace WeifenLuo.WinFormsUI @@ -41,7 +41,7 @@ namespace WeifenLuo.WinFormsUI
SetStyle(ControlStyles.ResizeRedraw |
ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.DoubleBuffer, true);
ControlStyles.OptimizedDoubleBuffer, true);
SuspendLayout();
Font = SystemInformation.MenuFont;
@ -984,4 +984,4 @@ namespace WeifenLuo.WinFormsUI @@ -984,4 +984,4 @@ namespace WeifenLuo.WinFormsUI
DockPanelPersist.LoadFromXml(this, stream, deserializeContent);
}
}
}
}

2
src/Libraries/DockPanel_Src/WinFormsUI/Helpers/LocalWindowsHook.cs

@ -103,7 +103,9 @@ namespace WeifenLuo.WinFormsUI @@ -103,7 +103,9 @@ namespace WeifenLuo.WinFormsUI
// Install the hook
public void Install()
{
#pragma warning disable 618
m_hhook = SetWindowsHookEx(m_hookType, m_filterFunc, IntPtr.Zero, (int)AppDomain.GetCurrentThreadId());
#pragma warning restore 618
}
// Uninstall the hook

5
src/Libraries/DockPanel_Src/WinFormsUI/WinFormsUI.csproj

@ -19,18 +19,13 @@ @@ -19,18 +19,13 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>bin\Debug\</OutputPath>
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\Debug\CodeDoc.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<NoStdLib>false</NoStdLib>
<Optimize>false</Optimize>
<RegisterForComInterop>false</RegisterForComInterop>
<RemoveIntegerChecks>false</RemoveIntegerChecks>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

Loading…
Cancel
Save