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. 2
      src/Libraries/DockPanel_Src/WinFormsUI/Controls/InertButton.cs
  3. 2
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/AutoHideStripVS2003.cs
  4. 2
      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. 4
      src/Libraries/DockPanel_Src/WinFormsUI/Docking/DockPaneStripVS2003.cs
  9. 2
      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;
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("0.99.0.3")] [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("")]

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

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

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

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

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

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

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

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

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

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

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

@ -112,6 +112,16 @@ namespace WeifenLuo.WinFormsUI
base.WndProc(ref m); base.WndProc(ref m);
return; 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) else if (m.Msg == (int)Win32.Msgs.WM_RBUTTONDOWN)
{ {
int index = GetHitTest(); int index = GetHitTest();

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

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

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

@ -41,7 +41,7 @@ namespace WeifenLuo.WinFormsUI
SetStyle(ControlStyles.ResizeRedraw | SetStyle(ControlStyles.ResizeRedraw |
ControlStyles.UserPaint | ControlStyles.UserPaint |
ControlStyles.AllPaintingInWmPaint | ControlStyles.AllPaintingInWmPaint |
ControlStyles.DoubleBuffer, true); ControlStyles.OptimizedDoubleBuffer, true);
SuspendLayout(); SuspendLayout();
Font = SystemInformation.MenuFont; Font = SystemInformation.MenuFont;

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

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

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

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

Loading…
Cancel
Save