aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/DockStack.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-30 21:47:39 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-11-30 21:47:39 +0100
commita64627699d4919d389522d92032ce4f05704d313 (patch)
treefbcd945cfebc6d802f3bed004cb06eb641f6fb46 /src/GraphicObjects/DockStack.cs
parent1e6d9bbb33f98f85e89cd3321ff9c29ffa4fccb0 (diff)
various fixes
Diffstat (limited to 'src/GraphicObjects/DockStack.cs')
-rw-r--r--src/GraphicObjects/DockStack.cs21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/GraphicObjects/DockStack.cs b/src/GraphicObjects/DockStack.cs
index ae8b9c89..f2174024 100644
--- a/src/GraphicObjects/DockStack.cs
+++ b/src/GraphicObjects/DockStack.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
using Crow.IML;
+using System.Linq;
namespace Crow
{
@@ -36,6 +37,13 @@ namespace Crow
public DockStack (Interface iface) : base (iface) {}
#endregion
+ /*static int color = 10;
+
+ protected override void onInitialized (object sender, EventArgs e)
+ {
+ base.onInitialized (sender, e);
+ Background = Color.ColorDic.Values.ToList()[color++];
+ }*/
public override void AddChild (GraphicObject g)
{
base.AddChild (g);
@@ -68,8 +76,9 @@ namespace Crow
return false;
}
}
+ childrenRWLock.ExitReadLock ();
}
- childrenRWLock.ExitReadLock ();
+
return Slot.ContainsOrIsEqual(m);
}
@@ -172,8 +181,8 @@ namespace Crow
protected override void onDragLeave (object sender, DragDropEventArgs e)
{
DockWindow dw = e.DragSource as DockWindow;
- if (dw != null)
- dw.DockingPosition = Alignment.Undefined;
+ //if (dw != null)
+ // dw.DockingPosition = Alignment.Undefined;
base.onDragLeave (sender, e);
RegisterForGraphicUpdate ();
}
@@ -307,14 +316,16 @@ namespace Crow
break;
}
}
- public void Undock (DockWindow dw){
+ public void Undock (DockWindow dw){
int idx = Children.IndexOf(dw);
+ Console.WriteLine ("undocking child index: {0} ; name={1}; pos:{2} ; childcount:{3}",idx, dw.Name, dw.DockingPosition, Children.Count);
+
RemoveChild(dw);
if (Children.Count == 0)
return;
-
+
if (dw.DockingPosition == Alignment.Left || dw.DockingPosition == Alignment.Top) {
RemoveChild (idx);
if (stretchedChild == dw) {