[Monodevelop-patches-list] r2357 - trunk/MonoDevelop/Core/src/MonoDevelop.Dock
John Luke <jluke@cfl.rr.com>
jluke at mono-cvs.ximian.com
Tue Mar 15 18:15:34 EST 2005
Author: jluke
Date: 2005-03-15 18:15:34 -0500 (Tue, 15 Mar 2005)
New Revision: 2357
Modified:
trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItem.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockPaned.cs
Log:
implement OnChildPlacement for DockPaned
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog 2005-03-15 19:52:46 UTC (rev 2356)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Dock/ChangeLog 2005-03-15 23:15:34 UTC (rev 2357)
@@ -1,3 +1,8 @@
+2005-03-15 John Luke <john.luke at gmail.com>
+
+ * DockItem.cs: add comment about saving position
+ * DockPaned.cs: override OnChildPlacement
+
2005-03-15 Lluis Sanchez Gual <lluis at novell.com>
* DockItemGrip.cs: Redraw the grip if the title or the icon changes.
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItem.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItem.cs 2005-03-15 19:52:46 UTC (rev 2356)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockItem.cs 2005-03-15 23:15:34 UTC (rev 2357)
@@ -799,6 +799,8 @@
Console.WriteLine ("Attempting to bind an unbound item");
return;
}
+
+ // FIXME: save previous docking position for later re-docking?
dragoffX = dragoffY = 0;
((Dock)Master.Controller).AddFloatingItem (this, 0, 0, -1, -1);
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockPaned.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockPaned.cs 2005-03-15 19:52:46 UTC (rev 2356)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Dock/DockPaned.cs 2005-03-15 23:15:34 UTC (rev 2357)
@@ -93,6 +93,25 @@
stored_invoker.Invoke (widget);
}
+ public override bool OnChildPlacement (DockObject child, ref DockPlacement placement)
+ {
+ DockPlacement pos = DockPlacement.None;
+ if (this.Child != null) {
+ Paned paned = this.Child as Paned;
+ if (child == paned.Child1)
+ pos = this.Orientation == Orientation.Horizontal ? DockPlacement.Left : DockPlacement.Top;
+ else if (child == paned.Child2)
+ pos = this.Orientation == Orientation.Horizontal ? DockPlacement.Right : DockPlacement.Bottom;
+ }
+
+ if (pos != DockPlacement.None) {
+ placement = pos;
+ return true;
+ }
+
+ return base.OnChildPlacement (child, ref pos);
+ }
+
protected override void OnDestroyed ()
{
// this first
More information about the Monodevelop-patches-list
mailing list