]> O.S.I.I.S - jp/crow.git/commitdiff
:book: , renames, move some controls to other project file
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 7 Feb 2018 06:43:48 +0000 (07:43 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 7 Feb 2018 06:43:48 +0000 (07:43 +0100)
105 files changed:
Crow.ControlsLib/AnalogMeter.cs [new file with mode: 0644]
Crow.ControlsLib/Crow.ControlsLib.csproj [new file with mode: 0644]
Crow.ControlsLib/Default.style [new file with mode: 0644]
Crow.ControlsLib/DockingView.cs [new file with mode: 0644]
Crow.ControlsLib/DocksView.cs [new file with mode: 0644]
Crow.ControlsLib/Templates/AnalogMeter0.goml [new file with mode: 0755]
Crow.ControlsLib/Templates/Checkbox2.goml [new file with mode: 0755]
Crow.ControlsLib/Templates/DockingView.template [new file with mode: 0755]
Crow.ControlsLib/Templates/ListBox.template [new file with mode: 0755]
Crow.ControlsLib/Templates/Menu.template [new file with mode: 0644]
Crow.ControlsLib/Templates/MenuItem.template [new file with mode: 0644]
Crow.ControlsLib/Templates/MessageBox.template [new file with mode: 0644]
Crow.ControlsLib/Templates/Popper.template [new file with mode: 0755]
Crow.ControlsLib/Templates/RadioButton.template [new file with mode: 0755]
Crow.ControlsLib/Templates/ScrollBar.template [new file with mode: 0755]
Crow.ControlsLib/Templates/ScrollingListBox.goml [new file with mode: 0644]
Crow.ControlsLib/Templates/Slider.template [new file with mode: 0755]
Crow.ControlsLib/Templates/Spinner (copier).goml [new file with mode: 0755]
Crow.ControlsLib/Templates/Spinner.template [new file with mode: 0755]
Crow.ControlsLib/Templates/TabItem.template [new file with mode: 0644]
Crow.ControlsLib/Templates/ToolWindow.template [new file with mode: 0755]
Crow.ControlsLib/Templates/TreeView.template [new file with mode: 0644]
Crow.ControlsLib/Templates/Window.template [new file with mode: 0755]
Crow.ControlsLib/Templates/imgItemTemplate.goml [new file with mode: 0755]
Crow.ControlsLib/Templates/tmpDirItem.goml [new file with mode: 0755]
Crow.ControlsLib/Templates/treeList.crow [new file with mode: 0755]
Crow.OpenTK.nuspec
Crow.csproj
Crow.sln
README.md
Templates/AnalogMeter0.goml [deleted file]
Templates/ArrowBut.template [new file with mode: 0755]
Templates/ArrowButTemplate.crow [deleted file]
Templates/Checkbox2.goml [deleted file]
Templates/ComboBox.template
Templates/DirectoryView.template
Templates/DockingView.template [deleted file]
Templates/Dummy.goml [deleted file]
Templates/FileDialog2.template [deleted file]
Templates/MessageBox.template
Templates/ScrollBar.template
Templates/ScrollingListBox.goml [deleted file]
Templates/ScrollingListBox.template [new file with mode: 0644]
Templates/Spinner (copier).goml [deleted file]
Templates/Spinner.template
Templates/imgItem.template [new file with mode: 0755]
Templates/imgItemTemplate.goml [deleted file]
Templates/tmpDirItem.goml [deleted file]
Templates/treeList.crow [deleted file]
Templates/treeList.template [new file with mode: 0755]
Tests/GraphicObjects/HexaContainer.cs [new file with mode: 0644]
Tests/Interfaces/Divers/0.crow
Tests/Tests.csproj
Tests/packages.config [new file with mode: 0644]
src/GraphicObjects/AnalogMeter.cs [deleted file]
src/GraphicObjects/Border.cs
src/GraphicObjects/Button.cs
src/GraphicObjects/CheckBox.cs
src/GraphicObjects/ColorPicker.cs
src/GraphicObjects/ColorSelector.cs
src/GraphicObjects/ComboBox.cs
src/GraphicObjects/Container.cs
src/GraphicObjects/DirectoryView.cs
src/GraphicObjects/DockingView.cs [deleted file]
src/GraphicObjects/DocksView.cs [deleted file]
src/GraphicObjects/Expandable.cs
src/GraphicObjects/FileDialog.cs
src/GraphicObjects/GenericStack.cs
src/GraphicObjects/GraduatedSlider.cs
src/GraphicObjects/Grid.cs
src/GraphicObjects/Group.cs
src/GraphicObjects/GroupBox.cs
src/GraphicObjects/HorizontalStack.cs
src/GraphicObjects/HueSelector.cs
src/GraphicObjects/Image.cs
src/GraphicObjects/Label.cs
src/GraphicObjects/ListBox.cs
src/GraphicObjects/Menu.cs
src/GraphicObjects/MenuItem.cs
src/GraphicObjects/MessageBox.cs
src/GraphicObjects/NumericControl.cs
src/GraphicObjects/Popper.cs
src/GraphicObjects/PrivateContainer.cs
src/GraphicObjects/ProgressBar.cs
src/GraphicObjects/RadioButton.cs
src/GraphicObjects/ScrollBar.cs
src/GraphicObjects/Scroller.cs
src/GraphicObjects/ScrollingObject.cs
src/GraphicObjects/ScrollingTextBox.cs
src/GraphicObjects/Slider.cs
src/GraphicObjects/Spinner.cs
src/GraphicObjects/Splitter.cs
src/GraphicObjects/TabItem.cs
src/GraphicObjects/TabView.cs
src/GraphicObjects/TemplatedContainer.cs
src/GraphicObjects/TemplatedControl.cs
src/GraphicObjects/TemplatedGroup.cs
src/GraphicObjects/TextBox.cs
src/GraphicObjects/TextRun.cs
src/GraphicObjects/TreeView.cs
src/GraphicObjects/Trend.cs
src/GraphicObjects/VerticalStack.cs
src/GraphicObjects/Window.cs
src/GraphicObjects/Wrapper.cs
src/Interface.cs

diff --git a/Crow.ControlsLib/AnalogMeter.cs b/Crow.ControlsLib/AnalogMeter.cs
new file mode 100644 (file)
index 0000000..ff23bd6
--- /dev/null
@@ -0,0 +1,68 @@
+//
+// AnalogMeter.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 Cairo;
+
+namespace Crow
+{
+       public class AnalogMeter : NumericControl
+       {
+               #region CTOR
+               protected AnalogMeter () : base(){}
+               public AnalogMeter (Interface iface) : base(iface){}
+               #endregion
+
+               #region GraphicObject Overrides
+               protected override void onDraw (Context gr)
+               {                       
+                       base.onDraw (gr);
+
+                       Rectangle r = ClientRectangle;
+                       Point m = r.Center;
+
+                       gr.Save ();
+
+
+                       double aUnit = Math.PI*2.0 / (Maximum - Minimum);
+                       gr.Translate (m.X, r.Height *1.1);
+                       gr.Rotate (Value/4.0 * aUnit - Math.PI/4.0);
+                       gr.Translate (-m.X, -m.Y);
+
+                       gr.LineWidth = 2;
+                       Foreground.SetAsSource (gr);
+                       gr.MoveTo (m.X,0.0);
+                       gr.LineTo (m.X, -m.Y*0.5);
+                       gr.Stroke ();
+
+                       gr.Restore ();
+               }
+               #endregion
+       }
+}
+
diff --git a/Crow.ControlsLib/Crow.ControlsLib.csproj b/Crow.ControlsLib/Crow.ControlsLib.csproj
new file mode 100644 (file)
index 0000000..6309f88
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{6E48BD3D-7B33-4368-AA8A-D878427DAC83}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>Crow.ControlsLib</RootNamespace>
+    <AssemblyName>Crow.ControlsLib</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <EmbeddedResource Include="Default.style" />
+    <EmbeddedResource Include="Templates\AnalogMeter0.goml" />
+    <EmbeddedResource Include="Templates\Checkbox2.goml" />
+    <EmbeddedResource Include="Templates\DockingView.template">
+      <LogicalName>Crow.DockingView.template</LogicalName>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Templates\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AnalogMeter.cs" />
+    <Compile Include="DockingView.cs" />
+    <Compile Include="DocksView.cs" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/Crow.ControlsLib/Default.style b/Crow.ControlsLib/Default.style
new file mode 100644 (file)
index 0000000..07689b5
--- /dev/null
@@ -0,0 +1,139 @@
+Button, CheckBox, RadioButton, ComboBox, Expandable,
+MessageBox, Popper, Slider, Spinner, TextBox {
+       Focusable = true;
+       Height = Fit;
+}
+Border {
+       Foreground = Gray;
+}
+CheckBox { Caption = CheckBox; }
+RadioButton { Caption = RadioButton; }
+Expandable { Caption = Expandable; }
+Popper { Caption = Popper; }
+GroupBox { Caption = Group Box; }
+Wrapper {
+       Orientation = Vertical;
+}
+Button {
+       Caption = Button;
+       Width = Fit;
+}
+Label {
+       Height = Fit;
+       Width = Fit;
+       Margin = 0;
+}
+Menu {
+       Margin = 1;
+       Background = vgradient|0:DimGray|1:Onyx;
+       Height = Fit;
+       Width = Stretched;
+       VerticalAlignment = Top;
+}
+MenuItem {
+       Caption = MenuItem;
+       Width = Stretched;
+       Height = Fit;
+       Background = Transparent;
+       Foreground = LightGray;
+       MouseEnter = {Background = vgradient|0:UnitedNationsBlue|1:Onyx;Foreground=White;}
+       MouseLeave = {Foreground=LightGray;Background=Transparent;}
+}
+MessageBox {
+       Background = 0.3,0.3,0.3,0.3;
+       Width = Fit;
+       Title=MessageBox;
+       Font = serif, 12;
+       MinimumSize = 200,120;
+}
+Slider {
+       Background = vgradient|0:Black|0.1:Gray|0.9:Gray|1:LightGray;
+       Foreground = Gray;
+       Width = Fit;
+}
+Splitter {
+       Focusable = true;
+       Background = DimGray;
+}
+Spinner {
+       Foreground = DimGray;
+}
+TabView {
+       CacheEnabled = false;
+}
+TabItem {
+       Caption = TabItem;
+       Focusable = true;
+       CacheEnabled = false;
+}
+TextBox {
+       Background = White;
+       Foreground = Black;
+       Selectable = True;
+       Text = TextBox;
+       Margin = 1;
+}
+Window {
+       Caption = Window;
+       Focusable = true;
+       MinimumSize=5,5;
+       Width = 150;
+       Height = 150;
+}
+ToolWindow {
+       Caption = Window;
+       Template = #Crow.ToolWindow.template;
+       Focusable = true;
+       MinimumSize=50,50;
+       Width = 150;
+       Height = 150;
+}
+DocksView {
+       AllowDrop = true;
+}
+DockingView {
+       Focusable = true;
+       AllowDrag = true;
+}
+FileDialog {
+       Template = #Crow.FileDialog.template;
+       Focusable = true;
+       MinimumSize=50,50;
+       Width = 500;
+       Height = 300;
+}
+ProgressBar {
+       Foreground = vgradient|0:BlueCrayola|0.5:SkyBlue|1:BlueCrayola;
+}
+ScrollBar {
+       Maximum = 0;
+       Value = 0;
+}
+Scroller {
+       CacheEnabled = false;
+}
+Icon {
+       Margin=1;
+       Width=12;
+       Height=12;
+}
+Control {
+       Margin=0;
+       Spacing=3;
+}
+SaturationValueSelector {
+       Foreground=Red;
+}
+HueSelector {
+       ClipToClientRect=False;
+}
+ColorSpinner {
+       Minimum = 0;
+       Maximum = 255;
+       SmallIncrement = 1;
+}
+HSVSpinner {
+       Minimum = 0;
+       Maximum = 1;
+       SmallIncrement = 0.01;
+}
\ No newline at end of file
diff --git a/Crow.ControlsLib/DockingView.cs b/Crow.ControlsLib/DockingView.cs
new file mode 100644 (file)
index 0000000..8d76d45
--- /dev/null
@@ -0,0 +1,166 @@
+//
+// DockingView.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;
+
+namespace Crow
+{
+       public class DockingView : Window
+       {
+               #region CTOR
+               protected DockingView() : base ()
+               {
+               }
+               #endregion
+
+               bool isDocked = false;
+               Alignment docking = Alignment.Center;
+
+               Point lastMousePos;     //last known mouse pos in this control
+               Point undockingMousePosOrig; //mouse pos when docking was donne, use for undocking on mouse move
+               Rectangle savedSlot;    //last undocked slot recalled when view is undocked
+               bool wasResizable;
+
+               public DocksView docker;
+
+               public override void OnLayoutChanges (LayoutingType layoutType)
+               {
+                       base.OnLayoutChanges (layoutType);
+
+                       if (isDocked)
+                               return;
+                       
+                       if (docker == null)
+                               return;
+
+                       Rectangle dvCliRect = docker.ClientRectangle;
+
+                       if (layoutType == LayoutingType.X) {
+                               if (Slot.X < docker.DockingThreshold)
+                                       dock (Alignment.Left);
+                               else if (Slot.Right > dvCliRect.Width - docker.DockingThreshold)
+                                       dock (Alignment.Right);
+                       }else if (layoutType == LayoutingType.Y) {
+                               if (Slot.Y < docker.DockingThreshold)
+                                       dock (Alignment.Top);
+                               else if (Slot.Bottom > dvCliRect.Height - docker.DockingThreshold)
+                                       dock (Alignment.Bottom);
+                       }
+               }
+
+               public override void onMouseMove (object sender, MouseMoveEventArgs e)
+               {
+                       lastMousePos = e.Position;
+
+                       if (this.HasFocus && e.Mouse.IsButtonDown (MouseButton.Left) && isDocked) {                             
+                               if (docking == Alignment.Left) {
+                                       if (lastMousePos.X - undockingMousePosOrig.X > docker.DockingThreshold)
+                                               undock ();
+                               } else if (docking == Alignment.Right) {
+                                       if (undockingMousePosOrig.X - lastMousePos.X > docker.DockingThreshold)
+                                               undock ();
+                               } else if (docking == Alignment.Top) {
+                                       if (lastMousePos.Y - undockingMousePosOrig.Y > docker.DockingThreshold)
+                                               undock ();
+                               } else if (docking == Alignment.Bottom) {
+                                       if (undockingMousePosOrig.Y - lastMousePos.Y > docker.DockingThreshold)
+                                               undock ();
+                               }
+                               return;
+                       }
+
+                       base.onMouseMove (sender, e);
+               }
+               public override void onMouseDown (object sender, MouseButtonEventArgs e)
+               {
+                       base.onMouseDown (sender, e);
+
+                       if (this.HasFocus && isDocked && e.Button == MouseButton.Left)
+                               undockingMousePosOrig = lastMousePos;
+               }
+
+//             protected override void onBorderMouseEnter (object sender, MouseMoveEventArgs e)
+//             {
+//                     base.onBorderMouseEnter (sender, e);
+//
+//                     if (isDocked) {
+//                             switch (docking) {
+//                             case Alignment.Top:
+//                                     if (this.currentDirection != Window.Direction.S)
+//                                             onBorderMouseLeave (this, null);
+//                                     break;
+//                             case Alignment.Left:
+//                                     if (this.currentDirection != Window.Direction.E)
+//                                             onBorderMouseLeave (this, null);
+//                                     break;
+//                             case Alignment.TopLeft:
+//                                     break;
+//                             case Alignment.Right:
+//                                     if (this.currentDirection != Window.Direction.W)
+//                                             onBorderMouseLeave (this, null);
+//                                     break;
+//                             case Alignment.TopRight:
+//                                     break;
+//                             case Alignment.Bottom:
+//                                     if (this.currentDirection != Window.Direction.N)
+//                                             onBorderMouseLeave (this, null);                                        
+//                                     break;
+//                             case Alignment.BottomLeft:
+//                                     break;
+//                             case Alignment.BottomRight:
+//                                     break;
+//                             case Alignment.Center:
+//                                     break;
+//                             default:
+//                                     break;
+//                             }
+//                     }
+//             }
+
+               void undock () {
+                       docker.Undock(this);
+
+                       this.Left = savedSlot.Left;
+                       this.Top = savedSlot.Top;
+                       this.Width = savedSlot.Width;
+                       this.Height = savedSlot.Height;
+
+                       isDocked = false;
+                       Resizable = wasResizable;
+               }
+               void dock (Alignment align){
+                       this.Left = this.Top = 0;
+                       isDocked = true;
+                       docking = align;
+                       undockingMousePosOrig = lastMousePos;
+                       savedSlot = this.LastPaintedSlot;
+                       wasResizable = Resizable;
+                       Resizable = false;
+
+                       docker.Dock (this, align);
+               }
+       }
+}
+
diff --git a/Crow.ControlsLib/DocksView.cs b/Crow.ControlsLib/DocksView.cs
new file mode 100644 (file)
index 0000000..a93bdc7
--- /dev/null
@@ -0,0 +1,91 @@
+//
+// 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 System.Collections.Generic;
+
+namespace Crow
+{
+       public class DocksView : Group
+       {
+               List<DockingView> childViews = new List<DockingView>();
+               GenericStack rootStack = null;
+
+               public override void AddChild (GraphicObject g)
+               {
+                       DockingView dv = g as DockingView;
+                       if (g == null)
+                               throw new Exception ("DocksView accept only DockingView as child");
+                       base.AddChild (g);
+                       childViews.Add (dv);
+                       dv.docker = this;
+               }
+               public override void RemoveChild (GraphicObject child)
+               {
+                       DockingView dv = child as DockingView;
+                       if (child == null)
+                               throw new Exception ("DocksView accept only DockingView as child");
+                       base.RemoveChild (child);
+                       childViews.Remove (dv);
+                       dv.docker = this;
+               }
+               public void Dock (DockingView dv, Alignment pos){
+                       switch (pos) {
+                       case Alignment.Top:
+                               if (rootStack?.Orientation != Orientation.Vertical)
+                               this.Width = Measure.Stretched;
+                               break;
+                       case Alignment.Bottom:
+                               this.Width = Measure.Stretched;
+                               break;
+                       case Alignment.Left:
+                               this.Height = Measure.Stretched;
+                               break;
+                       case Alignment.Right:
+                               this.Height = Measure.Stretched;
+                               break;
+                       }
+               }
+               public void Undock (DockingView dv){
+               }
+
+               int dockingThreshold;
+
+               [XmlAttributeAttribute][DefaultValue(10)]
+               public virtual int DockingThreshold {
+                       get { return dockingThreshold; }
+                       set {
+                               if (dockingThreshold == value)
+                                       return;
+                               dockingThreshold = value; 
+                               NotifyValueChanged ("DockingThreshold", dockingThreshold);
+
+                       }
+               } 
+       }
+}
+
diff --git a/Crow.ControlsLib/Templates/AnalogMeter0.goml b/Crow.ControlsLib/Templates/AnalogMeter0.goml
new file mode 100755 (executable)
index 0000000..8187aac
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<Group Margin="0" Width="-1" Height="-1" Focusable="false">
+       <Image Name="Image"  Path="#go.Images.meter.svg" SvgSub="background"/>
+<!--   <Image Name="Image"  Path="#go.Images.meter.svg" SvgSub="gauge"/>-->
+</Group>
\ No newline at end of file
diff --git a/Crow.ControlsLib/Templates/Checkbox2.goml b/Crow.ControlsLib/Templates/Checkbox2.goml
new file mode 100755 (executable)
index 0000000..0a67fce
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<HorizontalStack Margin="0" Spacing="1" Focusable="false">
+       <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>
+       <Label Name="Caption" Background="Red"/>
+</HorizontalStack>
\ No newline at end of file
diff --git a/Crow.ControlsLib/Templates/DockingView.template b/Crow.ControlsLib/Templates/DockingView.template
new file mode 100755 (executable)
index 0000000..0a3b4e0
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
+                               Background="{./Background}"
+                               MouseEnter="./onBorderMouseEnter"
+                               MouseLeave="./onBorderMouseLeave">
+       <VerticalStack Spacing="0">
+<!--           <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
+                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">-->
+                       <HorizontalStack Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7"
+                                       Name="hs" Margin="2" Spacing="0" Height="Fit">
+                               <GraphicObject Width="5"/>
+                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                               <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
+                               <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+                                                MouseClick="./butQuitPress"/>
+                               </Border>
+                               <GraphicObject Width="5"/>
+                       </HorizontalStack>
+<!--           </Border>-->
+               <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
+       </VerticalStack>
+</Border>
diff --git a/Crow.ControlsLib/Templates/ListBox.template b/Crow.ControlsLib/Templates/ListBox.template
new file mode 100755 (executable)
index 0000000..f6d6214
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Margin="1" MinimumSize="10,10">
+       <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true">
+               <VerticalStack
+                       Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+       </Scroller>
+</Border>
diff --git a/Crow.ControlsLib/Templates/Menu.template b/Crow.ControlsLib/Templates/Menu.template
new file mode 100644 (file)
index 0000000..c560043
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<HorizontalStack Name="ItemsContainer" Margin="0" Background="{./Background}"/>
diff --git a/Crow.ControlsLib/Templates/MenuItem.template b/Crow.ControlsLib/Templates/MenuItem.template
new file mode 100644 (file)
index 0000000..0f93b20
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Popper Font="{./Font}" Caption="{./Caption}"  Background="{./Background}" PopDirection="{./PopDirection}"
+       Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseClick="./onMI_Click"
+       IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}">
+       <Template>
+               <Border Name="border1"
+                               MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                               MouseLeave="{Foreground=Transparent}"
+                               MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
+                               MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                               MinimumSize = "60,0"
+                               Foreground="Transparent"
+                               Background="{./Background}">
+                               <Label Text="{./Caption}"
+                                       Foreground="{./Foreground}"
+                                       Margin="1" HorizontalAlignment="Left"
+                                       Font="{./Font}" />
+               </Border>
+       </Template>
+       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
+               <VerticalStack Name="ItemsContainer"/>
+       </Border>
+</Popper>
diff --git a/Crow.ControlsLib/Templates/MessageBox.template b/Crow.ControlsLib/Templates/MessageBox.template
new file mode 100644 (file)
index 0000000..c33eb86
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<Border        CornerRadius="0"
+                               MouseEnter="./onBorderMouseEnter"
+                               MouseLeave="./onBorderMouseLeave">
+       <VerticalStack Background="{./Background}">
+               <Border BorderWidth="0" Foreground="White" Height="Fit" Width="Stretched" MinimumSize="200,0"
+                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
+                       <HorizontalStack Name="hs" Margin="2" Spacing="1" Height="Fit" >
+                               <GraphicObject Width="5" Height="5"/>
+                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                               <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
+                               <Border CornerRadius="3" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
+                                                MouseClick="./butQuitPress"/>
+                               </Border>
+                               <GraphicObject Width="5" Height="5"/>
+                       </HorizontalStack>
+               </Border>
+               <HorizontalStack Margin="5">
+                       <Image Name="Image" Width="20%" Height="30" Path="{./MsgIcon}" />
+                       <Label Margin="5" Font="{./Font}" Width="Fit" Text="{./Message}"
+                               TextAlignment="Left"
+                               Multiline="true" />             
+               </HorizontalStack>
+               <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
+                       <Button Width="50%" Caption="{./OkMessage}" MouseClick="./onOkButtonClick" />
+                       <Button Width="50%" Caption="{./CancelMessage}" MouseClick="./onCancelButtonClick" />
+               </HorizontalStack>
+       </VerticalStack>
+</Border>
diff --git a/Crow.ControlsLib/Templates/Popper.template b/Crow.ControlsLib/Templates/Popper.template
new file mode 100755 (executable)
index 0000000..0bc7c74
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit">
+       <HorizontalStack Spacing="1" Height="Fit">
+               <Image Style="Icon" Margin="1" Width="9" Height="9"
+                               Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
+               <Label Text="{./Caption}" />
+       </HorizontalStack>
+</Border>
\ No newline at end of file
diff --git a/Crow.ControlsLib/Templates/RadioButton.template b/Crow.ControlsLib/Templates/RadioButton.template
new file mode 100755 (executable)
index 0000000..b96eec2
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<HorizontalStack Style="Control" Background="{./Background}">
+       <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
+               SvgSub="{./IsChecked}"/>
+       <Label Text="{./Caption}"/>
+</HorizontalStack>
\ No newline at end of file
diff --git a/Crow.ControlsLib/Templates/ScrollBar.template b/Crow.ControlsLib/Templates/ScrollBar.template
new file mode 100755 (executable)
index 0000000..70dce93
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="LightGray">
+       <GenericStack Orientation="{./Orientation}" Spacing="0">
+               <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
+               </Button>
+               <Slider Name="Slider"
+                       Orientation="{./Orientation}"
+                       Value="{²./Value}"
+                       Maximum="{./Maximum}"
+                       Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+                       LargeIncrement="{./LargeIncrement}"
+                       SmallIncrement="{./SmallIncrement}"
+                       Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
+               <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
+               </Button>
+       </GenericStack>
+</Border>
\ No newline at end of file
diff --git a/Crow.ControlsLib/Templates/ScrollingListBox.goml b/Crow.ControlsLib/Templates/ScrollingListBox.goml
new file mode 100644 (file)
index 0000000..f294aea
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Background="{./Background}">
+       <HorizontalStack Margin="1">
+               <Scroller Name="scroller1" 
+                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}">
+                       <VerticalStack Height="Fit" MinimumSize="10,10"
+                               Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+               </Scroller>
+               <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}" 
+                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" 
+                       Width="14" />
+       </HorizontalStack>
+</Border>
diff --git a/Crow.ControlsLib/Templates/Slider.template b/Crow.ControlsLib/Templates/Slider.template
new file mode 100755 (executable)
index 0000000..9c7bb70
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0"?>
diff --git a/Crow.ControlsLib/Templates/Spinner (copier).goml b/Crow.ControlsLib/Templates/Spinner (copier).goml
new file mode 100755 (executable)
index 0000000..fcb849c
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
+       <HorizontalStack Name="hstack" Margin="0" Spacing="5">
+               <Label Name="labCpt" Text="55"/>
+               <VerticalStack Spacing="1" Name="vstack">
+                       <Button Width="10" Height="8" MouseClick="onUp">
+                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
+                       </Button>
+                       <Button Width="10" Height="8"  MouseClick="onDown">
+                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
+                       </Button>
+               </VerticalStack>
+       </HorizontalStack>
+</Border>
\ No newline at end of file
diff --git a/Crow.ControlsLib/Templates/Spinner.template b/Crow.ControlsLib/Templates/Spinner.template
new file mode 100755 (executable)
index 0000000..4d3569b
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0">
+       <Border BorderWidth="1" Width="80%"  Background="White" 
+               Foreground="{./Foreground}" Margin="0">
+               <TextBox Foreground="{./Foreground}" Font="{./Font}" Width="Stretched"
+                       Text="{²./Value}" TextAlignment="Right" Margin="0"/>
+       </Border>
+       <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
+               <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
+               </Button>                               
+               <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown" 
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
+               </Button>
+       </VerticalStack>
+</HorizontalStack>
diff --git a/Crow.ControlsLib/Templates/TabItem.template b/Crow.ControlsLib/Templates/TabItem.template
new file mode 100644 (file)
index 0000000..f82b79c
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<GenericStack Orientation="Vertical" Spacing="0"
+               Background="Onyx"
+               MouseEnter="{caption.Foreground=White}"
+               MouseLeave="{caption.Foreground=Gray}">
+       <HorizontalStack Margin="2" Left="{./TabOffset}"
+               Name="TabTitle"
+               HorizontalAlignment="Left"
+               Height="{./TabThickness}"
+               Width="Fit">
+               <Label Name="caption" Text="{./Caption}" Foreground="Gray"/>
+               <Border CornerRadius="5" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+                                MouseClick="./butCloseTabClick"/>
+               </Border>
+       </HorizontalStack>
+       <Container Name="Content"/>
+</GenericStack>
+
diff --git a/Crow.ControlsLib/Templates/ToolWindow.template b/Crow.ControlsLib/Templates/ToolWindow.template
new file mode 100755 (executable)
index 0000000..f021f6e
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
+                               Background="{./Background}"
+                               MouseEnter="./onBorderMouseEnter"
+                               MouseLeave="./onBorderMouseLeave">
+       <VerticalStack Spacing="0">
+<!--           <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
+                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">-->
+                       <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
+                                       Name="hs" Margin="2" Spacing="0" Height="Fit">
+                               <GraphicObject Width="5"/>
+                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                               <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
+                               <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+                                                MouseClick="./butQuitPress"/>
+                               </Border>
+                               <GraphicObject Width="5"/>
+                       </HorizontalStack>
+<!--           </Border>-->
+               <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
+       </VerticalStack>
+</Border>
diff --git a/Crow.ControlsLib/Templates/TreeView.template b/Crow.ControlsLib/Templates/TreeView.template
new file mode 100644 (file)
index 0000000..c29e34c
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<HorizontalStack>
+       <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true"
+               Background="{./Background}"
+               ScrollY="{../scrollbar1.Value}">
+               <VerticalStack
+                       Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+       </Scroller>
+       <ScrollBar
+               Name="scrollbar1"
+               Value="{../scroller1.ScrollY}"
+               Maximum="{../scroller1.MaximumScroll}"
+               Width="14" Orientation="Vertical"/>
+</HorizontalStack>
diff --git a/Crow.ControlsLib/Templates/Window.template b/Crow.ControlsLib/Templates/Window.template
new file mode 100755 (executable)
index 0000000..20b2314
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
+                               Background="{./Background}"
+                               MouseEnter="./onBorderMouseEnter"
+                               MouseLeave="./onBorderMouseLeave">
+       <VerticalStack Spacing="0">
+<!--           <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
+                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">-->
+                       <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
+                                       Name="hs" Margin="2" Spacing="0" Height="Fit">
+                               <GraphicObject Width="5"/>
+                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                               <Label Width="Stretched" Foreground="White" Margin="2" TextAlignment="Center" Text="{./Caption}" />
+                               <Border Visible="{./ShowMinimize}" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Path="#Crow.Images.Icons.minimize.svg"
+                                                MouseClick="./onMinimized"/>
+                               </Border>
+                               <Border Visible="{./ShowNormal}" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Path="#Crow.Images.Icons.normalize.svg"
+                                                MouseClick="./onUnmaximized"/>
+                               </Border>
+                               <Border Visible="{./ShowMaximize}" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Path="#Crow.Images.Icons.maximize.svg"
+                                                MouseClick="./onMaximized"/>
+                               </Border>
+                               <Border BorderWidth="1" Foreground="Transparent"  Height="14" Width="14"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Path="#Crow.Images.Icons.exit2.svg"
+                                                MouseClick="./butQuitPress"/>
+                               </Border>
+                               <GraphicObject Width="5"/>
+                       </HorizontalStack>
+<!--           </Border>-->
+               <Container Name="Content" MinimumSize="0,0" Background="0.5,0.5,0.5,0.5"/>
+       </VerticalStack>
+</Border>
diff --git a/Crow.ControlsLib/Templates/imgItemTemplate.goml b/Crow.ControlsLib/Templates/imgItemTemplate.goml
new file mode 100755 (executable)
index 0000000..c08f390
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+       <VerticalStack Width="0" Height="-1" Focusable="true"                   
+                       MouseEnter="{Background=BlueCrayola}"
+                       MouseLeave="{Background=Transparent}">
+               <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/>
+               <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/>
+       </VerticalStack>
+
diff --git a/Crow.ControlsLib/Templates/tmpDirItem.goml b/Crow.ControlsLib/Templates/tmpDirItem.goml
new file mode 100755 (executable)
index 0000000..01aef1e
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+       <HorizontalStack Width="-1" Height="-1" Focusable="true"
+                       HorizontalAlignment="Left"
+                       MouseEnter="{Background=BlueCrayola}"
+                       MouseLeave="{Background=Transparent}">
+               <Image Width="16" Height="16" Path="#Tests.image.folder1.svg" SvgSub="{Attributes}"/>
+               <Label Text="{Name}" Width="-1" Height="-1" Margin="0"/>
+<!--           <Label Text="{Attributes}" Width="-1" Height="-1" Margin="0"/>
+               <Label Text="{Extension}" Width="-1" Height="-1" Margin="0"/>-->
+       </HorizontalStack>
+
diff --git a/Crow.ControlsLib/Templates/treeList.crow b/Crow.ControlsLib/Templates/treeList.crow
new file mode 100755 (executable)
index 0000000..d47621a
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<VerticalStack
+       Height="Fit" Name="ItemsContainer"/>
index 8d8359131995f31333cf9aab37d0d297b4580224..e336b178238308e02d73f8ac70ccdd134b37dd88 100644 (file)
@@ -2,40 +2,32 @@
 <package >
        <metadata>
                <id>Crow.OpenTK</id>
-               <version>0.5.6</version>
+               <version>0.6.0-pre1</version>
                <title>C# Rapid Open Widget Toolkit</title>
                <authors>JP Bruyere</authors>
                <owners>Grand Tetras Software</owners>
                <licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
-               <projectUrl>https://jpbruyere.github.io/Crow/</projectUrl>
+               <projectUrl>https://github.com/jpbruyere/Crow/wiki</projectUrl>
                <iconUrl>https://jpbruyere.github.io/Crow/images/crow.png</iconUrl>
                <requireLicenseAcceptance>false</requireLicenseAcceptance>
                <description>
-CROW is a pure C# widget toolkit with templates, styles, compositing, and bindings.
+C.R.O.W. is a widget toolkit and rendering engine entirely developed in C# with templates, styles, compositing, and bindings.
 Crow.OpenTK is the OpenTK ready version.
                </description>
                <summary>
-CROW is a pure C# widget toolkit with templates, styles, compositing, and bindings.
-Crow.OpenTK is the OpenTK ready version.
-
-Native libraries dependencies:
-       - cairo
-       - librsvg (and its dependencies (glib2, libxml, fontconfig, etc)
-
-Precompiled binaries of those libs are available at http://ftp.gnome.org/pub/GNOME/binaries/
 
-For more information, please visit https://jpbruyere.github.io/Crow/.
                </summary>
                <releaseNotes>
-                       - Bug fix (#35) of 0.5.4
-                       - embed Cairo bindings in Crow.
-                       - use of CairoRegion to handle clipping
-                       - IDisposable for GraphicObject
-                       - Border style Raised/Sunken
+                       - Bug fix #36
+                       - group item templates in single file
+                       - instantiation from code clarification
+                       - Only run on mono >= 5.0
+                       - Cairo mesh patterns support.
+                       - Image resources sharing among controls.            
                </releaseNotes>
                <copyright>Copyright 2013-2017</copyright>
                <dependencies>
-                       <dependency id="OpenTK" version="2.0" />
+                       <dependency id="OpenTK" version="3.0.0-git00041" />
                </dependencies>
         <tags>Crow OpenTK OpenGL Widget Interface GUI C# .Net Mono</tags>
         <references>
index 38f19b9e6a1cfa86a2c45fe7e6292e1bc312b835..13cab16df4eda742ff79b83c811e646f8448b105 100644 (file)
@@ -63,7 +63,6 @@
     <Compile Include="src\Enums.cs" />
     <Compile Include="src\GraphicObjects\GenericStack.cs" />
     <Compile Include="src\CompilerServices\CompilerServices.cs" />
-    <Compile Include="src\GraphicObjects\AnalogMeter.cs" />
     <Compile Include="src\GraphicObjects\Border.cs" />
     <Compile Include="src\Font.cs" />
     <Compile Include="src\GraphicObjects\Window.cs" />
     <Compile Include="src\Mono.Cairo\Win32Surface.cs" />
     <Compile Include="src\Mono.Cairo\XcbSurface.cs" />
     <Compile Include="src\Mono.Cairo\XlibSurface.cs" />
-    <Compile Include="src\GraphicObjects\DocksView.cs" />
-    <Compile Include="src\GraphicObjects\DockingView.cs" />
     <Compile Include="src\IML\IMLContext.cs" />
     <Compile Include="src\Mono.Cairo\MeshPattern.cs" />
   </ItemGroup>
     <EmbeddedResource Include="Images\Icons\buttonB.svg" />
     <EmbeddedResource Include="Images\Icons\checkbox.svg" />
     <EmbeddedResource Include="Images\Icons\radiobutton.svg" />
-    <EmbeddedResource Include="Templates\Spinner %28copier%29.goml" />
     <EmbeddedResource Include="Images\Icons\expandable.svg" />
-    <EmbeddedResource Include="Templates\Checkbox2.goml" />
     <EmbeddedResource Include="Images\Icons\tetra.png" />
     <EmbeddedResource Include="Images\Icons\exit.svg" />
-    <EmbeddedResource Include="Templates\AnalogMeter0.goml" />
     <EmbeddedResource Include="Images\meter.svg" />
     <EmbeddedResource Include="Images\Icons\member.svg" />
     <EmbeddedResource Include="Images\Icons\exit2.svg" />
     <EmbeddedResource Include="Images\Icons\iconInfo.svg">
       <LogicalName>Crow.Images.Icons.Informations.svg</LogicalName>
     </EmbeddedResource>
-    <EmbeddedResource Include="Templates\tmpDirItem.goml" />
-    <EmbeddedResource Include="Templates\ScrollingListBox.goml" />
-    <EmbeddedResource Include="Templates\imgItemTemplate.goml" />
     <EmbeddedResource Include="Images\Icons\Cursors\cross" />
     <EmbeddedResource Include="Images\Icons\Cursors\bottom_left_corner" />
     <EmbeddedResource Include="Images\Icons\Cursors\bottom_right_corner" />
     <EmbeddedResource Include="Images\Icons\Cursors\hand" />
     <EmbeddedResource Include="Images\Icons\Cursors\help" />
     <EmbeddedResource Include="Images\Icons\Cursors\move" />
-    <EmbeddedResource Include="Templates\ArrowButTemplate.crow" />
     <EmbeddedResource Include="Images\crow0.svg" />
-    <EmbeddedResource Include="Templates\Dummy.goml" />
     <EmbeddedResource Include="Images\Icons\crow.png" />
     <EmbeddedResource Include="Images\Icons\crow.svg" />
     <EmbeddedResource Include="Default.style" />
       <LogicalName>Crow.Window.template</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="Images\Icons\Cursors\ibeam" />
-    <EmbeddedResource Include="Templates\treeList.crow" />
     <EmbeddedResource Include="Templates\MenuItem.template">
       <LogicalName>Crow.MenuItem.template</LogicalName>
     </EmbeddedResource>
     <EmbeddedResource Include="Icons\exit-symbol.svg" />
     <EmbeddedResource Include="Icons\paste-on-document.svg" />
     <EmbeddedResource Include="Icons\question.svg" />
-    <EmbeddedResource Include="Templates\FileDialog2.template">
-      <LogicalName>Crow.FileDialog2.template</LogicalName>
-    </EmbeddedResource>
     <EmbeddedResource Include="Icons\folder.svg" />
     <EmbeddedResource Include="Icons\file.svg" />
     <EmbeddedResource Include="Icons\level-up.svg" />
-    <EmbeddedResource Include="Templates\DockingView.template">
-      <LogicalName>Crow.DockingView.template</LogicalName>
-    </EmbeddedResource>
     <EmbeddedResource Include="Templates\FileItems.template" />
     <EmbeddedResource Include="Templates\DefaultItem.template">
       <LogicalName>Crow.DefaultItem.template</LogicalName>
     </EmbeddedResource>
+    <EmbeddedResource Include="Templates\ScrollingListBox.template" />
+    <EmbeddedResource Include="Templates\imgItem.template" />
+    <EmbeddedResource Include="Templates\ArrowBut.template" />
+    <EmbeddedResource Include="Templates\treeList.template" />
   </ItemGroup>
   <ItemGroup>
     <None Include="Crow.dll.config">
index 21c870816006e28f83fbd0b78053f75b4172d199..9874dbe3e2f72819911e9ac958a470457cb6fb43 100644 (file)
--- a/Crow.sln
+++ b/Crow.sln
@@ -7,12 +7,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Test", "Crow.Test\Crow.Test.csproj", "{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.ControlsLib", "Crow.ControlsLib\Crow.ControlsLib.csproj", "{6E48BD3D-7B33-4368-AA8A-D878427DAC83}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
                Release|Any CPU = Release|Any CPU
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.Build.0 = Release|Any CPU
+               {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Release|Any CPU.Build.0 = Release|Any CPU
                {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -21,45 +31,35 @@ Global
                {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.Build.0 = Release|Any CPU
-               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(MonoDevelopProperties) = preSolution
                Policies = $0
                $0.StandardHeader = $1
                $1.Text = @\n${FileName}\n \nAuthor:\n      ${AuthorName} <${AuthorEmail}>\n\nCopyright (c) 2013-2017 Jean-Philippe Bruyère\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.
+               $1.IncludeInNewFiles = True
                $0.DotNetNamingPolicy = $2
+               $2.DirectoryNamespaceAssociation = None
+               $2.ResourceNamePolicy = FileFormatDefault
                $0.TextStylePolicy = $3
+               $3.FileWidth = 120
+               $3.TabsToSpaces = False
                $3.EolMarker = Unix
+               $3.inheritsSet = VisualStudio
+               $3.inheritsScope = text/plain
                $3.scope = text/x-csharp
                $0.CSharpFormattingPolicy = $4
                $4.AfterDelegateDeclarationParameterComma = True
+               $4.inheritsSet = Mono
+               $4.inheritsScope = text/x-csharp
                $4.scope = text/x-csharp
-               $4.IndentSwitchSection = False
-               $4.NewLinesForBracesInProperties = False
-               $4.NewLinesForBracesInAccessors = False
-               $4.NewLinesForBracesInAnonymousMethods = False
-               $4.NewLinesForBracesInControlBlocks = False
-               $4.NewLinesForBracesInAnonymousTypes = False
-               $4.NewLinesForBracesInObjectCollectionArrayInitializers = False
-               $4.NewLinesForBracesInLambdaExpressionBody = False
-               $4.NewLineForElse = False
-               $4.NewLineForCatch = False
-               $4.NewLineForFinally = False
-               $4.NewLineForMembersInObjectInit = False
-               $4.NewLineForMembersInAnonymousTypes = False
-               $4.NewLineForClausesInQuery = False
-               $4.SpacingAfterMethodDeclarationName = True
-               $4.SpaceAfterMethodCallName = True
-               $4.SpaceBeforeOpenSquareBracket = True
                $0.VersionControlPolicy = $5
                $5.CommitMessageStyle = $6
                $6.Indent = @\t
                $6.FileSeparator = ", "
                $6.LastFilePostfix = "@:\n  "
+               $6.LineAlign = 0
                $6.Wrap = False
+               $5.inheritsSet = Mono
                description = @C.R.O.W. c# Rapid Open Widgets\n\nCrow is a pure c# widget toolkit with XML definition of interface, bindings, styling...\n
                version = 0.5
        EndGlobalSection
index 5339b80d652ec3afa0c7cb1b8b7027e9549a7081..8018981e99b5d26e6374c13a886d5ee2b9619075 100644 (file)
--- a/README.md
+++ b/README.md
@@ -8,6 +8,9 @@
   C# Rapid Open Widgets
   <br>  
 <p align="center">
+  <a href="https://gitter.im/CSharpRapidOpenWidgets?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
+    <img src="https://badges.gitter.im/CSharpRapidOpenWidgets.svg">
+  </a>
   <a href="https://www.paypal.me/GrandTetraSoftware">
     <img src="https://img.shields.io/badge/Donate-PayPal-green.svg">
   </a>
 </h1>
 
 ## Presentation
-**C.R.O.W.** is a [widget toolkit](https://en.wikipedia.org/wiki/Widget_toolkit) and
-rendering engine entirely developed in **C#**, offering a nice trade-off between
-complexity of language and performances. Crow provides a declarative interface language
-with styling and templates
-called [IML](interface-markup-language) for **Interface Markup Language** similar to
-[XAML](https://en.wikipedia.org/wiki/Extensible_Application_Markup_Language) and a binding system
-for easy c# code linking.
+**C.R.O.W.** is a [widget toolkit](https://en.wikipedia.org/wiki/Widget_toolkit) and rendering engine entirely developed in **C#**, offering a nice trade-off between complexity of language and performances. Crow provides a declarative interface language with styling and templates called [IML](interface-markup-language) for **Interface Markup Language** similar to [XAML](https://en.wikipedia.org/wiki/Extensible_Application_Markup_Language) and a binding system for easy c# code linking.
 <p align="center">
   <a href="https://github.com/jpbruyere/Crow/blob/master/Images/screenshot.png">
     <img src="https://github.com/jpbruyere/Crow/blob/master/Images/screenshot.png" width="400">
@@ -45,7 +42,7 @@ for easy c# code linking.
 - SVG rendering (with [rsvg library](https://developer.gnome.org/rsvg/))
 
 #### Documentation
-* [Introduction](https://github.com/jpbruyere/Crow/wiki/Global-architecture)
+* [Introduction](https://github.com/jpbruyere/Crow/wiki)
 * [Classes documentation autogenerated from doxygen](https://github.com/jpbruyere/Crow/wiki/index)
 * [Tutorials](https://github.com/jpbruyere/Crow/wiki/Tutorials)
 
diff --git a/Templates/AnalogMeter0.goml b/Templates/AnalogMeter0.goml
deleted file mode 100755 (executable)
index 8187aac..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<Group Margin="0" Width="-1" Height="-1" Focusable="false">
-       <Image Name="Image"  Path="#go.Images.meter.svg" SvgSub="background"/>
-<!--   <Image Name="Image"  Path="#go.Images.meter.svg" SvgSub="gauge"/>-->
-</Group>
\ No newline at end of file
diff --git a/Templates/ArrowBut.template b/Templates/ArrowBut.template
new file mode 100755 (executable)
index 0000000..aa17d2f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<Border Name="Content"
+       Background="vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black" Foreground="DarkGray" 
+       MouseEnter="{Foreground=White}"
+       MouseLeave="{Foreground=DarkGray}"
+       MouseDown="{Background=vgradient|0:Black|0.1:LightGray|0.9:LightGray|1:White}"
+       MouseUp="{Background=vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black}"
+       >
+</Border>
diff --git a/Templates/ArrowButTemplate.crow b/Templates/ArrowButTemplate.crow
deleted file mode 100755 (executable)
index aa17d2f..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<Border Name="Content"
-       Background="vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black" Foreground="DarkGray" 
-       MouseEnter="{Foreground=White}"
-       MouseLeave="{Foreground=DarkGray}"
-       MouseDown="{Background=vgradient|0:Black|0.1:LightGray|0.9:LightGray|1:White}"
-       MouseUp="{Background=vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black}"
-       >
-</Border>
diff --git a/Templates/Checkbox2.goml b/Templates/Checkbox2.goml
deleted file mode 100755 (executable)
index 0a67fce..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<HorizontalStack Margin="0" Spacing="1" Focusable="false">
-       <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/>
-       <Label Name="Caption" Background="Red"/>
-</HorizontalStack>
\ No newline at end of file
index 314613b23109fd5c184949bbe8bdda4dcd5982d3..4a209023d8892da8e0e46f8c468e747d752ccd28 100755 (executable)
@@ -6,7 +6,7 @@
                                <TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
                                        Text="{../../../../SelectedItem}"/>
                                <Button Width="14" Height="14" Focusable="false"
-                                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                                       Template="#Crow.Templates.ArrowBut.template">
                                        <Image Margin="0"  Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
                                </Button>
                        </HorizontalStack>
index 148a7570d3417979ae2111a780b632fe414ec9df..42e9020ff8cca2ca3ca73dc13a0c7b94d163b9d5 100755 (executable)
@@ -38,7 +38,7 @@
                        <HorizontalStack Height="Fit">
                                <GraphicObject Width="12" Height="10"/>
                                <TreeView Name="List" Height="Fit"
-                                       Template="#Crow.Templates.treeList.crow" />
+                                       Template="#Crow.Templates.treeList.template" />
                        </HorizontalStack>
                </Expandable>
        </ItemTemplate>
diff --git a/Templates/DockingView.template b/Templates/DockingView.template
deleted file mode 100755 (executable)
index 0a3b4e0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
-                               Background="{./Background}"
-                               MouseEnter="./onBorderMouseEnter"
-                               MouseLeave="./onBorderMouseLeave">
-       <VerticalStack Spacing="0">
-<!--           <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
-                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">-->
-                       <HorizontalStack Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7"
-                                       Name="hs" Margin="2" Spacing="0" Height="Fit">
-                               <GraphicObject Width="5"/>
-                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
-                               <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
-                               <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
-                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
-                                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
-                                                MouseClick="./butQuitPress"/>
-                               </Border>
-                               <GraphicObject Width="5"/>
-                       </HorizontalStack>
-<!--           </Border>-->
-               <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/>
-       </VerticalStack>
-</Border>
diff --git a/Templates/Dummy.goml b/Templates/Dummy.goml
deleted file mode 100755 (executable)
index cfd8286..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<!--<Group Margin="5" Background="Red" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
-<Label Margin="0" Text="DUMMY2" Background="Green" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"/>
-</Group>-->
-<HorizontalStack Margin="5" Background="Red" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
-       <Label Margin="0" Text="DUMMY" Background="Blue" Height="{../../HeightPolicy}" Width="20"/>
-       <Label Margin="0" Text="DUMMY2" Background="Green" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"/>
-</HorizontalStack>
diff --git a/Templates/FileDialog2.template b/Templates/FileDialog2.template
deleted file mode 100644 (file)
index 389e11f..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
-                               Background="{./Background}"
-                               MouseEnter="./onBorderMouseEnter"
-                               MouseLeave="./onBorderMouseLeave">
-       <VerticalStack Spacing="0">
-               <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"
-                               Name="hs" Margin="2" Spacing="0" Height="Fit">
-                       <GraphicObject Width="5"/>
-                       <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
-                       <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
-                       <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
-                               MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
-                               <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
-                                        MouseClick="./butQuitPress"/>
-                       </Border>
-                       <GraphicObject Width="5"/>
-               </HorizontalStack>
-               <Container Name="Content" MinimumSize="50,50" Background="Onyx">
-                       <VerticalStack Margin="1">
-                               <HorizontalStack Height="Fit">
-                                       <Button Caption="Up" MouseClick="./goUpDirClick"/>
-                                       <TextBox Text="{²./CurrentDirectory}"/>
-                               </HorizontalStack>
-                               <HorizontalStack Spacing="1">
-                                       <DirectoryView ShowFiles="false" Name="dv" CurrentDirectory="{²./CurrentDirectory}"    Width="50%" Margin="0"
-                                               SelectedItemChanged="./onFVSelectedItemChanged">
-                                               <Template>
-                                                       <TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}"
-                                                                       SelectedItemChanged="./onSelectedItemChanged">
-                                                               <ItemTemplate DataType="System.IO.FileInfo">
-                                                                       <HorizontalStack Focusable="true"  Height="Fit" Width="Stretched" Background="{../Background}" >
-                                                                               <Image Margin="2" Width="14" Height="14"
-                                                                                       Path="#Crow.Icons.file.svg"/>
-                                                                               <Label Text="{Name}" Width="Stretched"
-                                                                                       MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
-                                                                                       MouseLeave="{Background=Transparent}"/>
-                                                                       </HorizontalStack>
-                                                               </ItemTemplate>
-                                                               <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetDirectories">
-                                                                       <Expandable Caption="{Name}" >
-                                                                               <Template>
-                                                                                       <VerticalStack>
-                                                                                               <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand"
-                                                                                                               MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
-                                                                                                               MouseLeave="{Background=Transparent}">
-                                                                                                       <Container Margin="1" Width="10" Height="10" Focusable="true" MouseClick="./onClickForExpand"
-                                                                                                               MouseEnter="{Background=LightGray}"
-                                                                                                               MouseLeave="{Background=Transparent}">
-                                                                                                               <Image
-                                                                                                                       Path="{./Image}"
-                                                                                                                       Visible="{./IsExpandable}"
-                                                                                                                       SvgSub="{./IsExpanded}"/>
-                                                                                                       </Container>
-                                                                                                       <Image Margin="2" Width="14" Height="14"
-                                                                                                               Path="#Crow.Icons.folder.svg"/>
-                                                                                                       <Label Text="{./Caption}"/>
-                                                                                               </HorizontalStack>
-                                                                                               <Container Name="Content" Visible="false"/>
-                                                                                       </VerticalStack>
-                                                                               </Template>
-                                                                               <HorizontalStack Height="Fit">
-                                                                                       <GraphicObject Width="12" Height="10"/>
-                                                                                       <TreeView Name="List" Height="Fit"
-                                                                                               Template="#Crow.Templates.treeList.crow" />
-                                                                               </HorizontalStack>
-                                                                       </Expandable>
-                                                               </ItemTemplate>
-                                                       </TreeView>
-                                               </Template>
-                                       </DirectoryView>
-                                       <Splitter/>
-                                       <DirectoryView ShowFiles="true" Name="fv" CurrentDirectory="{./SelectedDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
-                                               Width="100%" Margin="0" MouseDoubleClick="./onFileSelect">
-                                               <Template>
-                                                       <ListBox Name="fileView" Data="{./FileSystemEntries}" SelectedItemChanged="./onSelectedItemChanged">
-                                                               <Template>
-                                                                       <VerticalStack>
-                                                                               <Scroller ScrollX="{../scrollbar1.Value}"  Name="scroller1"
-                                                                                       VerticalScrolling="False" HorizontalScrolling="true">
-                                                                                       <Wrapper Orientation="Horizontal" Width="Fit" HorizontalAlignment="Left"
-                                                                                               Name="ItemsContainer" Margin="0" Spacing="1"/>
-                                                                               </Scroller>
-                                                                               <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollX}"
-                                                                                       Maximum="{../scroller1.MaximumScroll}" Orientation="Horizontal"
-                                                                                       Height="14" />
-                                                                       </VerticalStack>
-                                                               </Template>
-                                                               <ItemTemplate DataType="System.IO.FileInfo">
-                                                                       <HorizontalStack Focusable="true"  Height="Fit"   >
-                                                                               <Image Margin="2" Width="14" Height="14"
-                                                                                       Path="#Crow.Icons.file.svg"/>
-                                                                               <Label Text="{Name}"
-                                                                                       MouseEnter="{Background=BlueCrayola}"
-                                                                                       MouseLeave="{Background=Transparent}"/>
-                                                                       </HorizontalStack>
-                                                               </ItemTemplate>
-                                                               <ItemTemplate DataType="System.IO.DirectoryInfo">
-                                                                       <HorizontalStack Focusable="true"  Height="Fit" >
-                                                                               <Image Margin="2" Width="14" Height="14"
-                                                                                       Path="#Crow.Icons.folder.svg"/>
-                                                                               <Label Text="{Name}"
-                                                                                       MouseEnter="{Background=BlueCrayola}"
-                                                                                       MouseLeave="{Background=Transparent}"/>
-                                                                       </HorizontalStack>
-                                                               </ItemTemplate>
-                                                       </ListBox>
-                                               </Template>
-                                       </DirectoryView>
-                               </HorizontalStack>
-                               <TextBox Text="{./SelectedDirectory}"/>
-                               <TextBox Text="{²./SelectedFile}"/>
-                               <HorizontalStack Fit="true" HorizontalAlignment="Right">
-                                       <Button Caption="Ok" MouseClick="./onFileSelect"/>
-                                       <Button Caption="Cancel" MouseClick="./onCancel"/>
-                               </HorizontalStack>
-                       </VerticalStack>
-               </Container>
-       </VerticalStack>
-</Border>
index c33eb869970eecf811ff08189c67b210835aa078..b601f43c047c4c9176376bda9705d2e7d92fe154 100644 (file)
                        </HorizontalStack>
                </Border>
                <HorizontalStack Margin="5">
-                       <Image Name="Image" Width="20%" Height="30" Path="{./MsgIcon}" />
+                       <Image Name="Image" Width="50" Height="30" Path="{./MsgIcon}" />
                        <Label Margin="5" Font="{./Font}" Width="Fit" Text="{./Message}"
                                TextAlignment="Left"
                                Multiline="true" />             
                </HorizontalStack>
-               <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
-                       <Button Width="50%" Caption="{./OkMessage}" MouseClick="./onOkButtonClick" />
-                       <Button Width="50%" Caption="{./CancelMessage}" MouseClick="./onCancelButtonClick" />
+               <HorizontalStack Margin="1" Spacing="0" Width="Fit" Height="Fit" HorizontalAlignment="Right">
+                       <Button Width="Fit" Caption="{./OkMessage}" MouseClick="./onOkButtonClick" />
+                       <Button Width="Fit" Caption="{./CancelMessage}" MouseClick="./onCancelButtonClick" />
                </HorizontalStack>
        </VerticalStack>
 </Border>
index 70dce93ef9ed12c580f42e8b96106b8aab8e8090..f64b6c8e4f4cf1d44b397eb5bb9a84611dacba66 100755 (executable)
@@ -2,7 +2,7 @@
 <Border BorderWidth="1" Foreground="LightGray">
        <GenericStack Orientation="{./Orientation}" Spacing="0">
                <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       Template="#Crow.Templates.ArrowBut.template">
                        <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
                </Button>
                <Slider Name="Slider"
@@ -14,7 +14,7 @@
                        SmallIncrement="{./SmallIncrement}"
                        Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
                <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       Template="#Crow.Templates.ArrowBut.template">
                        <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
                </Button>
        </GenericStack>
diff --git a/Templates/ScrollingListBox.goml b/Templates/ScrollingListBox.goml
deleted file mode 100644 (file)
index f294aea..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Background="{./Background}">
-       <HorizontalStack Margin="1">
-               <Scroller Name="scroller1" 
-                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}">
-                       <VerticalStack Height="Fit" MinimumSize="10,10"
-                               Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
-               </Scroller>
-               <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}" 
-                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" 
-                       Width="14" />
-       </HorizontalStack>
-</Border>
diff --git a/Templates/ScrollingListBox.template b/Templates/ScrollingListBox.template
new file mode 100644 (file)
index 0000000..f294aea
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Background="{./Background}">
+       <HorizontalStack Margin="1">
+               <Scroller Name="scroller1" 
+                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}">
+                       <VerticalStack Height="Fit" MinimumSize="10,10"
+                               Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+               </Scroller>
+               <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}" 
+                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" 
+                       Width="14" />
+       </HorizontalStack>
+</Border>
diff --git a/Templates/Spinner (copier).goml b/Templates/Spinner (copier).goml
deleted file mode 100755 (executable)
index fcb849c..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0"?>
-<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue">
-       <HorizontalStack Name="hstack" Margin="0" Spacing="5">
-               <Label Name="labCpt" Text="55"/>
-               <VerticalStack Spacing="1" Name="vstack">
-                       <Button Width="10" Height="8" MouseClick="onUp">
-                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
-                       </Button>
-                       <Button Width="10" Height="8"  MouseClick="onDown">
-                               <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
-                       </Button>
-               </VerticalStack>
-       </HorizontalStack>
-</Border>
\ No newline at end of file
index 4d3569bf0b0ce80e975493b3f294ff239d092932..de1a4d824f6689657b211be92bf11ff9f1fa1c48 100755 (executable)
@@ -7,11 +7,11 @@
        </Border>
        <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
                <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       Template="#Crow.Templates.ArrowBut.template">
                        <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
                </Button>                               
                <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown" 
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       Template="#Crow.Templates.ArrowBut.template">
                        <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
                </Button>
        </VerticalStack>
diff --git a/Templates/imgItem.template b/Templates/imgItem.template
new file mode 100755 (executable)
index 0000000..c08f390
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+       <VerticalStack Width="0" Height="-1" Focusable="true"                   
+                       MouseEnter="{Background=BlueCrayola}"
+                       MouseLeave="{Background=Transparent}">
+               <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/>
+               <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/>
+       </VerticalStack>
+
diff --git a/Templates/imgItemTemplate.goml b/Templates/imgItemTemplate.goml
deleted file mode 100755 (executable)
index c08f390..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-       <VerticalStack Width="0" Height="-1" Focusable="true"                   
-                       MouseEnter="{Background=BlueCrayola}"
-                       MouseLeave="{Background=Transparent}">
-               <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/>
-               <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/>
-       </VerticalStack>
-
diff --git a/Templates/tmpDirItem.goml b/Templates/tmpDirItem.goml
deleted file mode 100755 (executable)
index 01aef1e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-       <HorizontalStack Width="-1" Height="-1" Focusable="true"
-                       HorizontalAlignment="Left"
-                       MouseEnter="{Background=BlueCrayola}"
-                       MouseLeave="{Background=Transparent}">
-               <Image Width="16" Height="16" Path="#Tests.image.folder1.svg" SvgSub="{Attributes}"/>
-               <Label Text="{Name}" Width="-1" Height="-1" Margin="0"/>
-<!--           <Label Text="{Attributes}" Width="-1" Height="-1" Margin="0"/>
-               <Label Text="{Extension}" Width="-1" Height="-1" Margin="0"/>-->
-       </HorizontalStack>
-
diff --git a/Templates/treeList.crow b/Templates/treeList.crow
deleted file mode 100755 (executable)
index d47621a..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack
-       Height="Fit" Name="ItemsContainer"/>
diff --git a/Templates/treeList.template b/Templates/treeList.template
new file mode 100755 (executable)
index 0000000..d47621a
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<VerticalStack
+       Height="Fit" Name="ItemsContainer"/>
diff --git a/Tests/GraphicObjects/HexaContainer.cs b/Tests/GraphicObjects/HexaContainer.cs
new file mode 100644 (file)
index 0000000..23964e9
--- /dev/null
@@ -0,0 +1,89 @@
+//
+// SimpleGauge.cs
+//
+// Author:
+//       jp <>
+//
+// 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 Crow;
+using Cairo;
+
+namespace Tutorials2
+{      
+       /// <summary>
+       /// Hexa container.
+       /// </summary>
+       /// <remarks>
+       /// </remarks>
+       public class HexaContainer : Container
+       {
+               const double pi3 = Math.PI / 3.0;
+
+               public HexaContainer () : base() {}
+               public HexaContainer (Interface iface): base (iface){}
+
+               protected override void onDraw (Context gr)
+               {
+                       gr.Save ();
+
+                       if (ClipToClientRect) {
+                               //clip to client zone
+                               CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
+                               gr.Clip ();
+                       }
+
+                       Rectangle r = ClientRectangle;
+                       double radius = 0,
+                       cx = r.Width / 2.0 + r.X,
+                       cy = r.Height / 2.0 + r.Y;
+
+                       if (r.Width > r.Height)
+                               radius = r.Height / 2.0;
+                       else
+                               radius = r.Width / 2.0;
+
+                       double dx = Math.Sin (pi3) * radius;
+                       double dy = Math.Cos (pi3) * radius;
+
+                       gr.MoveTo (cx - radius, cy);
+                       gr.LineTo (cx - dy, cy - dx);
+                       gr.LineTo (cx + dy, cy - dx);
+                       gr.LineTo (cx + radius, cy);
+                       gr.LineTo (cx + dy, cy + dx);
+                       gr.LineTo (cx - dy, cy + dx);
+                       gr.ClosePath ();
+
+                       gr.LineWidth = 1;
+                       Background.SetAsSource (gr);
+                       gr.FillPreserve ();
+                       Foreground.SetAsSource (gr);
+                       gr.Stroke ();
+
+                       if (child != null) {
+                               if (child.Visible)
+                                       child.Paint (ref gr);
+                       }
+                       gr.Restore ();
+               }
+       }
+}
+
index 15ab65f44aec531c950c56163ed8a7aff23cf4af..330e3bd8e59d910f85f7fc9d51f568b24001335b 100755 (executable)
                        <Splitter/>-->
                        <ListBox Name="colorList" Data="{TestList}" Margin="5"
                                         ItemTemplate="#Tests.Interfaces.colorItem.crow"
-                                        Template="#Crow.Templates.ScrollingListBox.goml"
+                                        Template="#Crow.Templates.ScrollingListBox.templat"
                                         />
                </VerticalStack>
        </HorizontalStack>
index f1ee0708f32f4148dbe8fcfc2c2aacf6e1cc88a5..ef4500a1e4b6006690bf099c90cbe15558237f4d 100644 (file)
     <WarningLevel>4</WarningLevel>
     <ConsolePause>false</ConsolePause>
     <DefineConstants>DEBUG;TRACE;MEASURE_TIME</DefineConstants>
+    <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
+    <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>none</DebugType>
     <Optimize>true</Optimize>
     <WarningLevel>0</WarningLevel>
     <ConsolePause>false</ConsolePause>
+    <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
+    <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
     <StartAction>Program</StartAction>
     <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
+  <PropertyGroup Condition=" '$(RunConfiguration)' == 'Custom Command' ">
+    <StartAction>Program</StartAction>
+    <StartProgram>%24{TargetName}</StartProgram>
+    <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
     <Reference Include="System.Drawing" />
     <Reference Include="OpenTK">
-      <HintPath>$(SolutionDir)libs\OpenTK.dll</HintPath>
+      <HintPath>..\packages\OpenTK.3.0.0-git00041\lib\net20\OpenTK.dll</HintPath>
     </Reference>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
@@ -74,6 +84,7 @@
     <Compile Include="Tutorials\T3_OpenGLCube.cs" />
     <Compile Include="Tutorials\T4_Gauge.cs" />
     <Compile Include="Tutorials\T2_IML.cs" />
+    <Compile Include="GraphicObjects\HexaContainer.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="image\u.svg">
     <None Include="Interfaces\Wrapper\2.2.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="OpenTK.dll.config" />
+    <None Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Interfaces\" />
diff --git a/Tests/packages.config b/Tests/packages.config
new file mode 100644 (file)
index 0000000..f4e36ff
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="OpenTK" version="3.0.0-git00041" targetFramework="net45" />
+</packages>
\ No newline at end of file
diff --git a/src/GraphicObjects/AnalogMeter.cs b/src/GraphicObjects/AnalogMeter.cs
deleted file mode 100644 (file)
index fba58d9..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// AnalogMeter.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 Cairo;
-
-namespace Crow
-{
-       public class AnalogMeter : NumericControl
-       {
-               #region CTOR
-               public AnalogMeter () : base(){}
-               public AnalogMeter (Interface iface) : base(iface){}
-               #endregion
-
-               #region GraphicObject Overrides
-               protected override void onDraw (Context gr)
-               {                       
-                       base.onDraw (gr);
-
-                       Rectangle r = ClientRectangle;
-                       Point m = r.Center;
-
-                       gr.Save ();
-
-
-                       double aUnit = Math.PI*2.0 / (Maximum - Minimum);
-                       gr.Translate (m.X, r.Height *1.1);
-                       gr.Rotate (Value/4.0 * aUnit - Math.PI/4.0);
-                       gr.Translate (-m.X, -m.Y);
-
-                       gr.LineWidth = 2;
-                       Foreground.SetAsSource (gr);
-                       gr.MoveTo (m.X,0.0);
-                       gr.LineTo (m.X, -m.Y*0.5);
-                       gr.Stroke ();
-
-                       gr.Restore ();
-               }
-               #endregion
-       }
-}
-
index 569315cc0bee394fda2293dfdad5aa5b43ac3f6f..f2be5993c50a765fdeff1671f2ee7bb77fbe3b76 100644 (file)
@@ -47,7 +47,7 @@ namespace Crow
        public class Border : Container
        {
                #region CTOR
-               public Border () : base(){}
+               protected Border () : base(){}
                public Border (Interface iface) : base(iface){}
                #endregion
 
index d4b954570b6e1bc9204e06c16d81b5ed9d928395..8b60dcb9269bd85fa005172cffb69d109f7c6467 100644 (file)
@@ -44,7 +44,7 @@ namespace Crow
     public class Button : TemplatedContainer
     {
                #region CTOR
-               public Button() : base() {}
+               protected Button() : base() {}
                public Button (Interface iface) : base(iface){}
                #endregion
 
index 8ff06a30145e425e78943a32fee87e816622b628..3a6b2b6ad102dc738bf6abd0dc344d180c3fdd0a 100644 (file)
@@ -36,7 +36,7 @@ namespace Crow
        public class CheckBox : TemplatedControl
        {
                #region CTOR
-               public CheckBox () : base(){}
+               protected CheckBox() : base(){}
                public CheckBox (Interface iface) : base(iface){}
                #endregion
 
index b6165c05ef5a5a6e756e50aac63fd0cf83348b4b..3a5ec23f4769eea17fd4d7ae46e2b0726a07c0ad 100644 (file)
@@ -36,7 +36,7 @@ namespace Crow
        public class ColorPicker : TemplatedControl
        {
                #region CTOR
-               public ColorPicker () : base(){}
+               protected ColorPicker() : base(){}
                public ColorPicker (Interface iface) : base(iface){}
                #endregion
 
index cb33d5024a1022a2067573737959e31c50327389..5b32fc95414761923ec9bf338c78010da80aecb8 100644 (file)
@@ -36,7 +36,7 @@ namespace Crow
        public class ColorSelector : GraphicObject
        {
                #region CTOR
-               public ColorSelector () : base(){}
+               protected ColorSelector() : base(){}
                public ColorSelector (Interface iface) : base(iface){}
                #endregion
 
index fbb4b953d8f58f19ade8d5ba06661a9baa93ae7b..61227055c6c1866f2e1fb90b437a178132edb59b 100644 (file)
@@ -35,7 +35,7 @@ namespace Crow
        public class ComboBox : ListBox
     {
                #region CTOR
-               public ComboBox () : base(){}
+               protected ComboBox() : base(){}
                public ComboBox (Interface iface) : base(iface){}
                #endregion
 
index 05d63012d6ef70cc88904de96cd5d2f3e6f4f0e5..fedee0af8d232dd475e90a8dfe2d7f8bfb3f50a7 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
     public class Container : PrivateContainer
     {
                #region CTOR
-               public Container () : base(){}
+               protected Container() : base(){}
                public Container (Interface iface) : base(iface){}
                #endregion
 
index 9b876d91b4985a094f0224777cf69ebbf530aafe..0aa44267ef16395d48556683f1647eb9c96c814b 100644 (file)
@@ -37,7 +37,7 @@ namespace Crow
        public class DirectoryView : TemplatedControl
        {
                #region CTOR
-               public DirectoryView () : base(){}
+               protected DirectoryView() : base(){}
                public DirectoryView (Interface iface) : base(iface){}
                #endregion
 
diff --git a/src/GraphicObjects/DockingView.cs b/src/GraphicObjects/DockingView.cs
deleted file mode 100644 (file)
index db11c08..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-//
-// DockingView.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;
-
-namespace Crow
-{
-       public class DockingView : Window
-       {
-               #region CTOR
-               public DockingView () : base ()
-               {
-               }
-               #endregion
-
-               bool isDocked = false;
-               Alignment docking = Alignment.Center;
-
-               Point lastMousePos;     //last known mouse pos in this control
-               Point undockingMousePosOrig; //mouse pos when docking was donne, use for undocking on mouse move
-               Rectangle savedSlot;    //last undocked slot recalled when view is undocked
-               bool wasResizable;
-
-               public DocksView docker;
-
-               public override void OnLayoutChanges (LayoutingType layoutType)
-               {
-                       base.OnLayoutChanges (layoutType);
-
-                       if (isDocked)
-                               return;
-                       
-                       if (docker == null)
-                               return;
-
-                       Rectangle dvCliRect = docker.ClientRectangle;
-
-                       if (layoutType == LayoutingType.X) {
-                               if (Slot.X < docker.DockingThreshold)
-                                       dock (Alignment.Left);
-                               else if (Slot.Right > dvCliRect.Width - docker.DockingThreshold)
-                                       dock (Alignment.Right);
-                       }else if (layoutType == LayoutingType.Y) {
-                               if (Slot.Y < docker.DockingThreshold)
-                                       dock (Alignment.Top);
-                               else if (Slot.Bottom > dvCliRect.Height - docker.DockingThreshold)
-                                       dock (Alignment.Bottom);
-                       }
-               }
-
-               public override void onMouseMove (object sender, MouseMoveEventArgs e)
-               {
-                       lastMousePos = e.Position;
-
-                       if (this.HasFocus && e.Mouse.IsButtonDown (MouseButton.Left) && isDocked) {                             
-                               if (docking == Alignment.Left) {
-                                       if (lastMousePos.X - undockingMousePosOrig.X > docker.DockingThreshold)
-                                               undock ();
-                               } else if (docking == Alignment.Right) {
-                                       if (undockingMousePosOrig.X - lastMousePos.X > docker.DockingThreshold)
-                                               undock ();
-                               } else if (docking == Alignment.Top) {
-                                       if (lastMousePos.Y - undockingMousePosOrig.Y > docker.DockingThreshold)
-                                               undock ();
-                               } else if (docking == Alignment.Bottom) {
-                                       if (undockingMousePosOrig.Y - lastMousePos.Y > docker.DockingThreshold)
-                                               undock ();
-                               }
-                               return;
-                       }
-
-                       base.onMouseMove (sender, e);
-               }
-               public override void onMouseDown (object sender, MouseButtonEventArgs e)
-               {
-                       base.onMouseDown (sender, e);
-
-                       if (this.HasFocus && isDocked && e.Button == MouseButton.Left)
-                               undockingMousePosOrig = lastMousePos;
-               }
-
-//             protected override void onBorderMouseEnter (object sender, MouseMoveEventArgs e)
-//             {
-//                     base.onBorderMouseEnter (sender, e);
-//
-//                     if (isDocked) {
-//                             switch (docking) {
-//                             case Alignment.Top:
-//                                     if (this.currentDirection != Window.Direction.S)
-//                                             onBorderMouseLeave (this, null);
-//                                     break;
-//                             case Alignment.Left:
-//                                     if (this.currentDirection != Window.Direction.E)
-//                                             onBorderMouseLeave (this, null);
-//                                     break;
-//                             case Alignment.TopLeft:
-//                                     break;
-//                             case Alignment.Right:
-//                                     if (this.currentDirection != Window.Direction.W)
-//                                             onBorderMouseLeave (this, null);
-//                                     break;
-//                             case Alignment.TopRight:
-//                                     break;
-//                             case Alignment.Bottom:
-//                                     if (this.currentDirection != Window.Direction.N)
-//                                             onBorderMouseLeave (this, null);                                        
-//                                     break;
-//                             case Alignment.BottomLeft:
-//                                     break;
-//                             case Alignment.BottomRight:
-//                                     break;
-//                             case Alignment.Center:
-//                                     break;
-//                             default:
-//                                     break;
-//                             }
-//                     }
-//             }
-
-               void undock () {
-                       docker.Undock(this);
-
-                       this.Left = savedSlot.Left;
-                       this.Top = savedSlot.Top;
-                       this.Width = savedSlot.Width;
-                       this.Height = savedSlot.Height;
-
-                       isDocked = false;
-                       Resizable = wasResizable;
-               }
-               void dock (Alignment align){
-                       this.Left = this.Top = 0;
-                       isDocked = true;
-                       docking = align;
-                       undockingMousePosOrig = lastMousePos;
-                       savedSlot = this.LastPaintedSlot;
-                       wasResizable = Resizable;
-                       Resizable = false;
-
-                       docker.Dock (this, align);
-               }
-       }
-}
-
diff --git a/src/GraphicObjects/DocksView.cs b/src/GraphicObjects/DocksView.cs
deleted file mode 100644 (file)
index a93bdc7..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// 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 System.Collections.Generic;
-
-namespace Crow
-{
-       public class DocksView : Group
-       {
-               List<DockingView> childViews = new List<DockingView>();
-               GenericStack rootStack = null;
-
-               public override void AddChild (GraphicObject g)
-               {
-                       DockingView dv = g as DockingView;
-                       if (g == null)
-                               throw new Exception ("DocksView accept only DockingView as child");
-                       base.AddChild (g);
-                       childViews.Add (dv);
-                       dv.docker = this;
-               }
-               public override void RemoveChild (GraphicObject child)
-               {
-                       DockingView dv = child as DockingView;
-                       if (child == null)
-                               throw new Exception ("DocksView accept only DockingView as child");
-                       base.RemoveChild (child);
-                       childViews.Remove (dv);
-                       dv.docker = this;
-               }
-               public void Dock (DockingView dv, Alignment pos){
-                       switch (pos) {
-                       case Alignment.Top:
-                               if (rootStack?.Orientation != Orientation.Vertical)
-                               this.Width = Measure.Stretched;
-                               break;
-                       case Alignment.Bottom:
-                               this.Width = Measure.Stretched;
-                               break;
-                       case Alignment.Left:
-                               this.Height = Measure.Stretched;
-                               break;
-                       case Alignment.Right:
-                               this.Height = Measure.Stretched;
-                               break;
-                       }
-               }
-               public void Undock (DockingView dv){
-               }
-
-               int dockingThreshold;
-
-               [XmlAttributeAttribute][DefaultValue(10)]
-               public virtual int DockingThreshold {
-                       get { return dockingThreshold; }
-                       set {
-                               if (dockingThreshold == value)
-                                       return;
-                               dockingThreshold = value; 
-                               NotifyValueChanged ("DockingThreshold", dockingThreshold);
-
-                       }
-               } 
-       }
-}
-
index 43f44a93facf0c5e355c3fe7788240e526fbb141..aff804f8e16b9e54f1b1782e9fd4942a34c4de11 100644 (file)
@@ -36,7 +36,7 @@ namespace Crow
     public class Expandable : TemplatedContainer
     {
                #region CTOR
-               public Expandable () : base(){}
+               protected Expandable() : base(){}
                public Expandable (Interface iface) : base(iface){}
                #endregion
 
index 76a5a9ee2645575e820fa48eeaae7ab3f01b4eb1..f2fb3b894031157cdb5e6c8d066d7fa177d02975 100644 (file)
@@ -41,7 +41,7 @@ namespace Crow
        public class FileDialog: Window
        {
                #region CTOR
-               public FileDialog () : base(){}
+               protected FileDialog() : base(){}
                public FileDialog (Interface iface) : base(iface){}
                #endregion
 
index f65447b13353c7af33f948e2acae1d324908a8d3..7976f837fbb0f0db1a2bf35948a7fd28c294f59c 100644 (file)
@@ -37,7 +37,7 @@ namespace Crow
        public class GenericStack : Group
     {
                #region CTOR
-               public GenericStack () : base(){}
+               protected GenericStack() : base(){}
                public GenericStack(Interface iface) : base(iface){}
                #endregion
 
index b8d7d581dc3d3ad9f9caf1bdef6ee624d4b7fd99..52ba296080231c0369fc2fcaa7f5f47ccb9e7cf7 100644 (file)
@@ -36,7 +36,7 @@ namespace Crow
        public class GraduatedSlider : Slider
     {     
                #region CTOR
-               public GraduatedSlider () : base(){}
+               protected GraduatedSlider() : base(){}
                public GraduatedSlider(Interface iface) : base(iface)
                {}
 //             public GraduatedSlider(double minimum, double maximum, double step)
index 5756525e74ad40ff0cceed4a48cf2a96e9ebb947..f8a50264ebb67eb7e4029bb537882d1ca21e152c 100644 (file)
@@ -43,7 +43,7 @@ namespace Crow
     public class Grid : Group
     {
                #region CTOR
-               public Grid () : base(){}
+               protected Grid () : base(){}
                public Grid(Interface iface) : base(iface)
                {            
                }
@@ -55,17 +55,6 @@ namespace Crow
                int _rowCount;
                #endregion
 
-               public override void AddChild (GraphicObject child)
-               {
-                       base.AddChild (child);
-                       this.RegisterForLayouting (LayoutingType.ArrangeChildren);
-               }
-               public override void RemoveChild (GraphicObject child)
-               {
-                       base.RemoveChild (child);
-                       this.RegisterForLayouting (LayoutingType.ArrangeChildren);
-               }
-
                #region Public Properties
         [XmlAttributeAttribute()][DefaultValue(2)]
         public int Spacing
@@ -73,7 +62,7 @@ namespace Crow
                        get { return _spacing; }
             set { _spacing = value; }
         }
-        [XmlAttributeAttribute()][DefaultValue(1)]
+        [XmlAttributeAttribute()][DefaultValue(2)]
         public virtual int ColumnCount
         {
             get { return _columnCount; }
@@ -87,7 +76,7 @@ namespace Crow
                                this.RegisterForLayouting (LayoutingType.ArrangeChildren);
                        }
         }
-               [XmlAttributeAttribute()][DefaultValue(1)]
+               [XmlAttributeAttribute()][DefaultValue(2)]
                public virtual int RowCount
                {
                        get { return _rowCount; }
@@ -127,6 +116,12 @@ namespace Crow
 //
 //                     return tmp;
 //             }
+               public override void ChildrenLayoutingConstraints (ref LayoutingType layoutType)
+               {
+                       //Prevent child repositionning
+                       layoutType &= (~LayoutingType.Positioning);
+               }
+               public override bool ArrangeChildren { get { return true; } }
                public virtual void ComputeChildrenPositions()
                {
                        int slotWidth = CaseWidth;
@@ -139,17 +134,18 @@ namespace Crow
                                        GraphicObject c = Children [idx];
                                        if (!c.Visible)
                                                continue;
-                                       //ensure Item are not realigned
-                                       c.HorizontalAlignment = HorizontalAlignment.Left;
-                                       c.VerticalAlignment = VerticalAlignment.Top;
-                                       c.Left = curX * (slotWidth + Spacing);
-                                       c.Top = curY * (slotHeight + Spacing);
-                                       c.Width = slotWidth;
-                                       c.Height = slotHeight;
+                                       c.Slot.X = curX * (slotWidth + Spacing);
+                                       c.Slot.Y = curY * (slotHeight + Spacing);
+                                       //c.Slot.Width = slotWidth;
+                                       //c.Slot.Height = slotHeight;
                                }
                        }
+                       IsDirty = true;
+               }
+               public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg)
+               {
+                       //base.OnChildLayoutChanges (sender, arg);
                }
-
 
                public override bool UpdateLayout (LayoutingType layoutType)
                {
index 2cfa377486b953153b5a377aeef459910a04ae55..a940ee7e7cd034d4ceb1c82e278e6cc22b1752bf 100644 (file)
@@ -38,7 +38,7 @@ namespace Crow
        public class Group : GraphicObject
     {
                #region CTOR
-               public Group () : base(){}
+               protected Group () : base(){}
                public Group(Interface iface) : base(iface){}
                #endregion
 
@@ -67,8 +67,8 @@ namespace Crow
                                Children.Add (g);
                        }
                        g.RegisteredLayoutings = LayoutingType.None;
-                       g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren);
                        g.LayoutChanged += OnChildLayoutChanges;
+                       g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren);
                }
         public virtual void RemoveChild(GraphicObject child)
                {
index 61e7f2af99cbfcfc8d35c1ed0634b842b171271d..2e32ddd5bb1648fa17a14f28f270629830fa46ea 100644 (file)
@@ -36,7 +36,7 @@ namespace Crow
     public class GroupBox : TemplatedContainer
     {          
                #region CTOR
-               public GroupBox () : base(){}
+               protected GroupBox () : base(){}
                public GroupBox(Interface iface) : base(iface){}
                #endregion
        }
index 74e46e9c529e9450e2f4929e1c16bc14b6410acb..64d7cae5756b65ca49aa016223ca4fa564ea220f 100644 (file)
@@ -38,7 +38,7 @@ namespace Crow
     public class HorizontalStack : GenericStack
     {
                #region CTOR
-               public HorizontalStack () : base(){}
+               protected HorizontalStack () : base(){}
                public HorizontalStack(Interface iface) : base(iface)
         {            
         }
index 08c84deb22f5c5bb3709e6c74b6c13759fb49140..518ee6c4c04d7c00550599b2d76cbef3cd33c9f6 100644 (file)
@@ -34,7 +34,7 @@ namespace Crow
        public class HueSelector : ColorSelector
        {
                #region CTOR
-               public HueSelector () : base(){}
+               protected HueSelector () : base(){}
                public HueSelector (Interface iface) : base(iface)
                {
                }
index 622fa714223ae915a0f1d9a7f88009bb58998bbd..75c59f4af63ef7d33b6a37001d0f7014dba5257c 100644 (file)
@@ -33,6 +33,11 @@ using System.Diagnostics;
 
 namespace Crow
 {
+       /// <summary>
+       /// Base widget to display an image. Accepts bitmaps and SVGs.
+       /// </summary>
+       /// <remarks>
+       /// </remarks>
        public class Image : GraphicObject
        {
                Picture _pic;
@@ -41,6 +46,9 @@ namespace Crow
                double opacity;
 
                #region Public properties
+               /// <summary>
+               /// If false, original size will be kept in any case.
+               /// </summary>
                [XmlAttributeAttribute][DefaultValue(true)]
                public virtual bool Scaled {
                        get { return scaled; }
@@ -55,6 +63,9 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
+               /// <summary>
+               /// If image is scaled, proportions will be preserved.
+               /// </summary>
                [XmlAttributeAttribute][DefaultValue(true)]
                public virtual bool KeepProportions {
                        get { return keepProps; }
@@ -69,6 +80,9 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
+               /// <summary>
+               /// Image file path, may be on disk or embedded. Accepts bitmaps or SVG drawings.
+               /// </summary>
         [XmlAttributeAttribute]
                public string Path {
                        get { return _pic == null ? "" : _pic.Path; }
@@ -90,6 +104,10 @@ namespace Crow
                                NotifyValueChanged ("Path", Path);
                        }
                }
+               /// <summary>
+               /// Used only for svg images, repaint only node named referenced in SvgSub.
+               /// If null, all the svg is rendered
+               /// </summary>
                [XmlAttributeAttribute]
                public string SvgSub {
                        get { return _svgSub; }
@@ -100,6 +118,10 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
+               /// <summary>
+               /// Object holding the image data once loaded, may be used directely to pupulate this control without 
+               /// specifying a path.
+               /// </summary>
                [XmlAttributeAttribute]
                public Picture Picture {
                        get { return _pic; }
@@ -111,6 +133,10 @@ namespace Crow
                                RegisterForGraphicUpdate ();
                        }
                }
+               /// <summary>
+               /// Opacity parameter for the image
+               /// </summary>
+               // TODO:could be moved in GraphicObject
                [XmlAttributeAttribute()][DefaultValue(1.0)]
                public virtual double Opacity {
                        get { return opacity; }
@@ -125,7 +151,14 @@ namespace Crow
                #endregion
 
                #region CTOR
-               public Image () : base(){}
+               /// <summary>
+               /// Initializes a new instance of the <see cref="Crow.Image"/> class.
+               /// </summary>
+               protected Image () : base(){}
+               /// <summary>
+               /// Initializes a new instance of the <see cref="Crow.Image"/> class from code
+               /// </summary>
+               /// <param name="iface">interface to bound to</param>
                public Image (Interface iface) : base(iface)
                {
                }
index 7c7c584c1203a9e21176271f58e6e78a3f147d55..de7b7f510a5e2ab26366e93ffd4ba1ca78be6a26 100644 (file)
@@ -38,7 +38,7 @@ namespace Crow
     public class Label : GraphicObject
     {
                #region CTOR
-               public Label () : base(){}
+               protected Label () : base(){}
 
                public Label(Interface iface) : base(iface)
                {
index 67e4b58379b15f763099d27ff73f98060731dffd..438e8d605eaea418370ed6a71ff51f0d46ac3ae9 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
        public class ListBox : TemplatedGroup
        {
                #region CTOR
-               public ListBox () : base(){}
+               protected ListBox () : base(){}
                public ListBox (Interface iface) : base(iface) {}
                #endregion
 
index d7a7f5a64c3b56c1f71e473628fd0b6d32cbb365..dbc1d6369012c0d2244a710e9584679893a754a4 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
        public class Menu : TemplatedGroup
        {
                #region CTOR
-               public Menu () : base(){}
+               protected Menu () : base(){}
                public Menu (Interface iface) : base(iface) {}
                #endregion
 
index cd2a54a8aebb730014779025bce8c6ff9a320c40..ae27b0136dc9447157f79f9d60e48e1d1454d961 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
        public class MenuItem : Menu
        {
                #region CTOR
-               public MenuItem () : base(){}
+               protected MenuItem () : base(){}
                public MenuItem (Interface iface) : base(iface) {}
                #endregion
 
index 0e308bf947346db25c3583070050ac98cc6210d2..277a7e11113efb68d641c103991111680f24dbbe 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
        public class MessageBox : Window
        {
                #region CTOR
-               public MessageBox () : base(){}
+               protected MessageBox () : base(){}
                public MessageBox (Interface iface) : base(iface){}
                #endregion
 
index 21cb19616b607a1cfb8fb361a25c8b68ad8d7d13..f0eda90f550e58b7e5ef0de576a00fdf4d3990ff 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
        public abstract class NumericControl : TemplatedControl
        {
                #region CTOR
-               public NumericControl () : base(){}
+               protected NumericControl () : base(){}
                public NumericControl (Interface iface) : base(iface)
                {
                }
index 9f60aa4022f26b84d0a1cf7a3c50a8c78e64ed43..5316a5a7f5f5fae42ae319ca34e7cd3174ad571e 100644 (file)
@@ -33,7 +33,7 @@ namespace Crow
     public class Popper : TemplatedContainer
     {
                #region CTOR
-               public Popper () : base(){}
+               protected Popper () : base(){}
                public Popper (Interface iface) : base(iface){}
                #endregion
 
index 6eb5e95e787760444ae448eb5ae9cfbf243da666..5ee29e9498c3be9b0c1eafd3ab2273e2503e5411 100644 (file)
@@ -41,7 +41,7 @@ namespace Crow
        public class PrivateContainer : GraphicObject
        {
                #region CTOR
-               public PrivateContainer () : base(){}
+               protected PrivateContainer () : base(){}
                public PrivateContainer (Interface iface) : base(iface){}
                #endregion
 
index 2995272bd3dae05ee259e50af059327ad15d8fd2..e8165fd2e19f239400529df671a9164a2615e5d4 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
        public class ProgressBar : NumericControl
     {
                #region CTOR
-               public ProgressBar () : base(){}
+               protected ProgressBar () : base(){}
                public ProgressBar(Interface iface) : base(iface){}
                #endregion
 
index bf31a42cbab60e273703d3f4cba2cbc6387cbf94..ead332ea9bffdb86c877189c90ab998f579762c0 100644 (file)
@@ -35,7 +35,7 @@ namespace Crow
                bool isChecked;
 
                #region CTOR
-               public RadioButton () : base(){}
+               protected RadioButton () : base(){}
                public RadioButton(Interface iface) : base(iface){}     
                #endregion
 
index 586ebbbeb4786c7e4623be833ab84357dc0b8c0d..31ff7acfe8af8cac52f9219a588329bd2c25090f 100644 (file)
@@ -40,7 +40,7 @@ namespace Crow
                Orientation _orientation;
 
                #region CTOR
-               public ScrollBar () : base(){}
+               protected ScrollBar () : base(){}
                public ScrollBar(Interface iface) : base(iface) {}
                #endregion
 
index b68335f6154289eb7928781e4e977a37e953be9d..8dfed1ebb87327897fef2a498251c0c91d44e1cb 100644 (file)
@@ -38,7 +38,7 @@ namespace Crow
        public class Scroller : Container
        {
                #region CTOR
-               public Scroller () : base(){}
+               protected Scroller () : base(){}
                public Scroller (Interface iface) : base(iface){}
                #endregion
 
index 7e61c392b3208c965ebd546a829ec99652a09333..9059d8eda8ff722f50a0eb39467ac9c243b847ff 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
        public class ScrollingObject : GraphicObject
        {
                #region CTOR
-               public ScrollingObject ():base(){}
+               protected ScrollingObject ():base(){}
                public ScrollingObject (Interface iface):base(iface){}
                #endregion
 
index 0fb9a7b445a3c82d55642f4148d01b27080d0614..c84594dfccb727ff5c10f7e4dc6ddea8b3ec3ab1 100644 (file)
@@ -42,11 +42,11 @@ namespace Crow
        public class ScrollingTextBox : ScrollingObject
        {
                #region CTOR
-               public ScrollingTextBox (Interface iface):base(iface){
+               protected ScrollingTextBox ():base()
+               {
                        KeyEventsOverrides = true;
                }
-               public ScrollingTextBox ():base()
-               {
+               public ScrollingTextBox (Interface iface):base(iface){
                        KeyEventsOverrides = true;
                }
                #endregion
index bc879a9682832b4441844fa4dbeec74480a95eb1..a664f4e74174b0338fcd9359ed38412c3f06a1fb 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
        public class Slider : NumericControl
     {
                #region CTOR
-               public Slider() : base(){}
+               protected Slider() : base(){}
                public Slider(Interface iface) : base(iface)
                {}
 //             public Slider(double minimum, double maximum, double step)
index 69924a039123ad24e5106b78a02bf2b1977f00ca..7c5fdb26f0b146e527a8b98fa04e3a74cab1edc0 100644 (file)
@@ -35,7 +35,7 @@ namespace Crow
        public class Spinner : NumericControl
        {
                #region CTOR
-               public Spinner() : base(){}
+               protected Spinner() : base(){}
                public Spinner (Interface iface) : base(iface)
                {
                }
index 1258012eb642d8b88cb351c57789d7b49576276b..c688f773f404d4ff3f74deb669ce7a8298bcdb07 100644 (file)
@@ -37,7 +37,7 @@ namespace Crow
        public class Splitter : GraphicObject
        {
                #region CTOR
-               public Splitter() : base(){}
+               protected Splitter() : base(){}
                public Splitter (Interface iface) : base(iface){}
                #endregion
 
index b19d14e8717f946ea213944ece4f8fb7eac13595..b35c544c101dafb2a5381287e88235d72aad7985 100644 (file)
@@ -35,7 +35,7 @@ namespace Crow
        public class TabItem : TemplatedContainer
        {
                #region CTOR
-               public TabItem() : base(){}
+               protected TabItem() : base(){}
                public TabItem (Interface iface) : base(iface){}
                #endregion
 
index 62ada31218cd527d076f9868d8f9d6a9a29a72ff..7bf93abdb1e0a376b962f3b95b334d5ad94d56c0 100644 (file)
@@ -35,7 +35,7 @@ namespace Crow
        public class TabView : Group
        {
                #region CTOR
-               public TabView() : base(){}
+               protected TabView() : base(){}
                public TabView (Interface iface) : base(iface){}
                #endregion
 
index a2e35eabd28a1f3f11e79d70669df585522bfcfa..31bbc4368d41ce77694b5a1c9eef481afd403151 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
        public class TemplatedContainer : TemplatedControl
        {
                #region CTOR
-               public TemplatedContainer() : base(){}
+               protected TemplatedContainer() : base(){}
                public TemplatedContainer (Interface iface) : base(iface){}
                #endregion
 
index a3a6b1422e134f3ffae08b4655aae414e1fa2a55..34e4ce07d3cd40b7a60e4a84c0951808e05c00ee 100644 (file)
@@ -44,7 +44,7 @@ namespace Crow
        public abstract class TemplatedControl : PrivateContainer
        {
                #region CTOR
-               public TemplatedControl() : base(){}
+               protected TemplatedControl() : base(){}
                public TemplatedControl (Interface iface) : base(iface){}
                #endregion
 
index 55726b509fb705f8c99e90ee34ec6403a108780b..c32b2c44f4a7651e97b80e3e4956b55e7e906334 100644 (file)
@@ -40,7 +40,7 @@ namespace Crow
        public abstract class TemplatedGroup : TemplatedControl
        {
                #region CTOR
-               public TemplatedGroup() : base(){}
+               protected TemplatedGroup() : base(){}
                public TemplatedGroup (Interface iface) : base(iface){}
                #endregion
 
index 2438c65ab748c4fae2595599a2a0425be5e1f312..a14aea6ad1b2a7c59fb949b6bf16594163b12de7 100644 (file)
@@ -34,7 +34,7 @@ namespace Crow
     public class TextBox : Label
     {
                #region CTOR
-               public TextBox() : base(){}
+               protected TextBox() : base(){}
                public TextBox(Interface iface) : base(iface)
                { }
 //             public TextBox(string _initialValue)
index 55ac7f33e58f851ad565487d244ea6ccc566cc74..69495647416fd0bc0576b1912c571b2353a3edd4 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
        public class TextRun : GraphicObject
        {
                #region CTOR
-               public TextRun () : base(){}
+               protected TextRun () : base(){}
                public TextRun (Interface iface) : base (iface){}
                #endregion
 
index 80c3385fa42d965f507b598438140c8cb229458c..4125e582c7d274cc01f98900005afc17c391cac9 100644 (file)
@@ -39,7 +39,7 @@ namespace Crow
                bool isRoot;
 
                #region CTOR
-               public TreeView() : base(){}
+               protected TreeView() : base(){}
                public TreeView (Interface iface) : base(iface)
                {
                }
index 055c870dcd2154bf443dc7d928b434fdb1aee28a..e9d3c2d3d08a84631abe51b958417388308c317e 100644 (file)
@@ -50,10 +50,11 @@ namespace Crow
                                values.RemoveAt (0);
                        RegisterForRedraw ();
                }
-
-               public Trend ()
+               #region CTOR
+               protected Trend () : base()
                {
                }
+               #endregion
                [XmlIgnore]public virtual int NewValue {
                        set {
                                AddValue (value);
index d0122373966347cf2ebe3ff91bc6285d6e0d371f..9650e6858d58d985e2fb1db00bd70d6ccb824c5b 100644 (file)
@@ -36,10 +36,12 @@ namespace Crow
        /// </summary>
     public class VerticalStack : GenericStack
     {
-               public VerticalStack() : base(){}
+               #region CTOR
+               protected VerticalStack() : base(){}
                public VerticalStack(Interface iface) : base(iface)
         {
         }
+               #endregion
 
         [System.Xml.Serialization.XmlIgnore]
         public override Orientation Orientation
index efc8f4e390df12085a7f4baee292de2fb7906e2e..5025b3fb22fc5460d2b449dfa3aa4e97cf764803 100644 (file)
@@ -65,7 +65,7 @@ namespace Crow
                #endregion
 
                #region CTOR
-               public Window() : base(){}
+               protected Window() : base(){}
                public Window (Interface iface) : base(iface){}
                #endregion
 
index cfa1736f928ead74e396cecc7afdf4cd1e8ccb2f..e56d9332a37b28a51dda6ade02d6f6376507af88 100644 (file)
@@ -35,7 +35,7 @@ namespace Crow
        public class Wrapper : GenericStack
        {
                #region CTOR
-               public Wrapper() : base(){}
+               protected Wrapper() : base(){}
                public Wrapper (Interface iface) : base(iface){}
                #endregion
 
index b16acc072bb0de5f0a6bb663d6bd80aee96bdb3e..7ea6128797b1a6aad2ef32d2d83c1fb6a786f80a 100644 (file)
@@ -43,7 +43,8 @@ namespace Crow
        /// The Interface Class is the root of crow graphic trees. It is thread safe allowing
        /// application to run multiple interfaces in different threads.
        /// It provides the Dirty bitmap and zone of the interface to be drawn on screen.
-       ///
+       /// </summary>
+       /// <remarks>
        /// The Interface contains :
        ///     - rendering and layouting queues and logic.
        ///     - helpers to load XML interfaces files directely bound to this interface
@@ -61,7 +62,7 @@ namespace Crow
        /// 
        /// The resulting surface (a byte array in the OpenTK renderer) is made available and protected with the
        /// RenderMutex of the interface.
-       /// </summary>
+       /// </remarks>
        public class Interface : ILayoutable
        {
                #region CTOR