<Compile Include="src\ObservableList.cs" />
<Compile Include="src\GraphicObjects\IMLContainer.cs" />
<Compile Include="src\DragDropEventArgs.cs" />
- <Compile Include="src\GraphicObjects\Docker.cs" />
<Compile Include="src\GraphicObjects\DockWindow.cs" />
<Compile Include="src\ParsingException.cs" />
<Compile Include="src\IMLAttributes.cs" />
Background = "Onyx";
Focusable = "true";
AllowDrag = "true";
+ AlwaysOnTop = "true";
Margin="0";
Width="200";
Height="200";
</Border>
<GraphicObject Width="5"/>
</HorizontalStack>
- <Container Name="Content" MinimumSize="50,50" Background="DimGray">
+ <Container Name="Content" MinimumSize="50,50" Background="Jet">
<VerticalStack Margin="1">
<HorizontalStack Height="Fit">
<Button Fit="true" Caption="Up" MouseClick="./goUpDirClick">
SelectedItemChanged="./onSelectedItemChanged">
<Template>
<HorizontalStack>
- <Scroller ScrollX="{../scrollbar1.Value}" Name="scroller1">
+ <Scroller Name="scroller1">
<VerticalStack Height="Fit" VerticalAlignment="Top"
Name="ItemsContainer" Margin="0" Spacing="1"/>
</Scroller>
- <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
- LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
+ <ScrollBar Name="scrollbar1" Orientation="Vertical"
+ Value="{²../scroller1.ScrollY}" Maximum="{../scroller1.MaxScrollY}"
CursorSize="{../scroller1.ChildHeightRatio}"
- Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
+ LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
Width="14" />
</HorizontalStack>
</Template>
this.KeyDown += KeyboardKeyDown1;
- testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+ testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" };
+ //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
//testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
//testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Experimental", "*.crow")).ToArray ();
Load(testFiles[idx]).DataSource = this;
+
+ LoadIMLFragment (@"<DockWindow Width=""150"" Height=""150"" Background=""DarkRed"" />", 0);
+ LoadIMLFragment (@"<DockWindow Width=""200"" Height=""150"" Background=""DarkGreen"" />", 0);
+ LoadIMLFragment (@"<DockWindow Width=""250"" Height=""150"" Background=""Brown"" />", 0);
+ LoadIMLFragment (@"<DockWindow Width=""300"" Height=""150"" Background=""DarkBlue"" />", 0);
+
+
}
void KeyboardKeyDown1 (object sender, OpenTK.Input.KeyboardKeyEventArgs e)
{
<?xml version="1.0"?>
-<VerticalStack>
- <Docker>
- <DockStack Background="DimGray"/>
- <DockWindow Width="150" Height="150" Background="DarkRed" />
- <DockWindow Width="150" Height="150" Background="DarkGreen"/>
- <DockWindow Width="150" Height="150" Background="Blue"/>
- <DockWindow Width="150" Height="150" Background="DarkYellow"/>
- <DockWindow Width="150" Height="150" Background="Yellow"/>
- <DockWindow Width="150" Height="150" Background="BrownWeb"/>
- </Docker>
+<Window Height="50%" Width="60%">
+ <DockStack Background="#60101050" Margin="10"/>
+</Window>
<!--- <DockWindow Left="400" Top="400" Width="150" Height="150" Background="MediumSeaGreen"/>
<DockWindow Left="450" Top="450" Width="150" Height="150" Background="Maize"/>-->
-</VerticalStack>
+
<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
<Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
<Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
{
[DesignIgnore]
public class DockStack : GenericStack
- {
- Docker rootDock { get { return LogicalParent as Docker; }}
-
+ {
#region CTor
public DockStack () {}
public DockStack (Interface iface) : base (iface) {}
public override void AddChild (GraphicObject g)
{
base.AddChild (g);
- g.LogicalParent = this.LogicalParent;
+ if (localLogicalParentIsNull)
+ g.LogicalParent = this;
+ else
+ g.LogicalParent = this.LogicalParent;
}
public override void InsertChild (int idx, GraphicObject g)
{
Rectangle savedSlot; //last undocked slot recalled when view is undocked
bool wasResizable;
- public Docker RootDock { get { return LogicalParent as Docker; }}
-
public bool IsDocked {
get { return isDocked; }
set {
DockStack ds = Parent as DockStack;
ds.Undock (this);
- RootDock.AddChild (this);
+ IFace.AddWidget (this);
this.Left = savedSlot.Left;
this.Top = savedSlot.Top;
LastSlots = LastPaintedSlot = Slot = default(Rectangle);
Left = Top = 0;
- Group g = Parent as Group;
- g.RemoveChild (this);
+ IFace.RemoveWidget (this);
target.Dock (this);
}
+++ /dev/null
-//
-// DocksView.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-using System;
-using System.Xml.Serialization;
-using System.ComponentModel;
-using Crow.IML;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-namespace Crow
-{
- public class Docker : Group
- {
- #region CTOR
- static Docker () {
- }
- public Docker () : base ()
- {
- }
- #endregion
-
- int dockingThreshold;
-
-
- [XmlAttributeAttribute][DefaultValue(10)]
- public virtual int DockingThreshold {
- get { return dockingThreshold; }
- set {
- if (dockingThreshold == value)
- return;
- dockingThreshold = value;
- NotifyValueChanged ("DockingThreshold", dockingThreshold);
- }
- }
-
- public override void AddChild (GraphicObject g)
- {
- base.AddChild (g);
- g.LogicalParent = this;
- }
-
- public override void onMouseMove (object sender, MouseMoveEventArgs e)
- {
- if (IFace.DragAndDropOperation?.DragSource as DockWindow != null) {
- DockWindow dw = IFace.DragAndDropOperation.DragSource as DockWindow;
- if (!dw.IsDocked) {
- Rectangle r = dw.ScreenCoordinates (dw.Slot);
- Point p = ScreenPointToLocal (e.Position);
- dw.Left = p.X - r.Width / 2;
- dw.Top = p.Y - r.Height / 2;
- }
- }
- base.onMouseMove (sender, e);
- }
-
- public string ExportWinConfigs () {
- return "";
- }
- }
-}
-
if (string.IsNullOrEmpty(value))
Picture = null;
else {
- lock(IFace.LayoutMutex){
+ //lock(IFace.LayoutMutex){
LoadImage (value);
- }
+ //}
}
} catch (Exception ex) {
Debug.WriteLine (ex.Message);