]> O.S.I.I.S - jp/crow.git/commitdiff
clean using, TreeView and TabView empty c# file creation
authorjpbruyere <jp.bruyere@hotmail.com>
Sat, 13 Feb 2016 15:25:57 +0000 (16:25 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Sat, 13 Feb 2016 15:25:57 +0000 (16:25 +0100)
21 files changed:
Crow.csproj
Templates/ListBox.goml
Templates/TreeView.crow [new file with mode: 0644]
Templates/TreeViewItem.crow [new file with mode: 0644]
Tests/GOLIBTests.cs
Tests/Interfaces/1.crow
Tests/Interfaces/testOutOfClipUpdate.crow [new file with mode: 0755]
Tests/Interfaces/testTreeView.crow [new file with mode: 0755]
Tests/Tests.csproj
src/GraphicObjects/CheckBox.cs
src/GraphicObjects/Expandable.cs
src/GraphicObjects/GraphicObject.cs
src/GraphicObjects/Group.cs
src/GraphicObjects/GroupBox.cs
src/GraphicObjects/Popper.cs
src/GraphicObjects/RadioButton.cs
src/GraphicObjects/ScrollBar.cs
src/GraphicObjects/Scroller.cs
src/GraphicObjects/TabView.cs [new file with mode: 0644]
src/GraphicObjects/TreeView.cs [new file with mode: 0644]
src/OpenTKGameWindow.cs

index 19aee4318e05c0fb5e8732b5c8955f8ddf4043a2..9490cde5f43fb7f65b92f782bff42823b3a1f804 100644 (file)
     <Compile Include="src\ScrollingEventArgs.cs" />
     <Compile Include="src\GraphicObjects\Trend.cs" />
     <Compile Include="src\GraphicObjects\Splitter.cs" />
+    <Compile Include="src\GraphicObjects\TreeView.cs" />
+    <Compile Include="src\GraphicObjects\TabView.cs" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Data" />
-    <Reference Include="System.Drawing" />
     <Reference Include="System.Xml" />
     <Reference Include="glib-sharp, Version=3.0.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
       <Package>glib-sharp-3.0</Package>
     </Reference>
     <Reference Include="Mono.Cairo" />
     <Reference Include="rsvg2-sharp, Version=2.18.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="System.Drawing" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
     <EmbeddedResource Include="Images\crow0.svg">
       <LogicalName>Crow.image.crow0.svg</LogicalName>
     </EmbeddedResource>
+    <EmbeddedResource Include="Templates\TreeView.crow" />
+    <EmbeddedResource Include="Templates\TreeViewItem.crow" />
   </ItemGroup>
   <ItemGroup>
     <None Include="README.md" />
index 0a21be0f940b5e8265640fa1420bac8ff0061d9a..5d8122e06eefab9460cb859d94eb6bf33b07a16d 100755 (executable)
@@ -1,7 +1,4 @@
 <?xml version="1.0"?>
-<!--<Border BorderWidth="1" Margin="1" MinimumSize="0;100" Height="{TemplatedHeight}" Width="{TemplatedWidth}" Background="Gray">
-       <VerticalStack Name="List" Margin="1" Height="{TemplatedHeight}" Width="{TemplatedWidth}"/>
-</Border>-->
 <Border BorderWidth="1" Margin="1" MinimumSize="20;20" Height="{../TemplatedHeight}" Width="{../TemplatedWidth}" >
        <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true"
                Height="{../../TemplatedHeight}" Width="{../../TemplatedWidth}">
diff --git a/Templates/TreeView.crow b/Templates/TreeView.crow
new file mode 100644 (file)
index 0000000..132c7eb
--- /dev/null
@@ -0,0 +1,7 @@
+<Border Background="DimGray" BorderWidth="1" Margin="1" MinimumSize="100;100"
+               Width="{../TemplatedWidth}" Height="{../TemplatedHeight}">
+       <VerticalStack
+                       Height="0" Width="0" Name="List" Margin="0" VerticalAlignment="Top"/>
+
+</Border>
+
diff --git a/Templates/TreeViewItem.crow b/Templates/TreeViewItem.crow
new file mode 100644 (file)
index 0000000..0cb4417
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--<Container Fit="true" Margin="0" Focusable="true" Background="Gray"
+               MouseEnter="{Background=SteelBlue}"
+               MouseLeave="{Background=Gray}">
+       <Label Text="{}"/>
+</Container>-->
+<Expandable Caption="{}">
+       <Template>
+               <Border BorderWidth="1" Foreground="LightGray" Height="{../TemplatedHeight}" Width="{../TemplatedWidth}" 
+                       MouseClick="../onMouseClick">
+                       <VerticalStack Height="{../../TemplatedHeight}" Width="{../../TemplatedWidth}">
+                               <HorizontalStack Spacing="1" Height="-1" Width="{../../../TemplatedWidth}">
+                                       <Image Margin="2" Width="12" Height="12" Path="{../../../../Image}" SvgSub="{../../../../SvgSub}"/>
+                                       <Label Text="{../../../../Caption}" Width="{../../../../TemplatedWidth}"/>
+                               </HorizontalStack>
+                               <Container Name="Content" Visible="false" Height="{../../../TemplatedHeight}" Width="{../../../TemplatedWidth}"/>
+                       </VerticalStack>
+               </Border>
+       </Template>
+</Expandable>
+<!--           <VerticalStack
+                       Height="{../TemplatedHeight}" Width="{../TemplatedWidth}"
+                       MouseClick="../onMouseClick">
+                       <HorizontalStack Spacing="1" Height="-1" Width="{../../TemplatedWidth}">
+                               <Image Margin="2" Width="12" Height="12" Path="{../../../Image}" SvgSub="{../../../SvgSub}"/>
+                               <Label Text="{../../../Caption}" Width="{../../../TemplatedWidth}"/>
+                       </HorizontalStack>
+                       <ListBox Name="Content" Visible="false"
+                               Height="-1" Width="{../../TemplatedWidth}"/>
+               </VerticalStack>-->
+
index bf0c4b6416f2736343b0d81b3e83c044ec849e5a..832cf151d3cfec63081d5c432b34d18e354e299e 100644 (file)
@@ -37,6 +37,10 @@ namespace test
                int frameCpt = 0;
                int idx = 0;
                string[] testFiles = {
+                       "testImage.crow",
+                       "testOutOfClipUpdate.crow",
+                       "test_Listbox.goml",
+                       "testTreeView.crow",
                        "0.crow",
                        "1.crow",
                        "testWindow.goml",
@@ -57,13 +61,11 @@ namespace test
                        "testScrollbar.goml",
                        "testGroupBox.goml",
                        "testGrid.goml",
-                       "test_Listbox.goml",
                        "testButton.crow",
                        "testBorder.goml",
 //                     "testButton2.crow",
                        "test2WayBinding.crow",
                        "fps.goml",
-                       "testImage.crow",
                        "test4.goml",
                        "2.crow",
                        "test1.goml",
@@ -149,6 +151,24 @@ namespace test
                                return;
                        NotifyValueChanged ("alignment", Enum.Parse(typeof(Alignment), rb.Caption));
                }
+               public IList<String> List2 = new List<string>(new string[]
+                       {
+                               "string1",
+                               "string2",
+                               "string3",
+                               "string4",
+                               "string5",
+                               "string6",
+                               "string7",
+                               "string8",
+                               "string8",
+                               "string8",
+                               "string8",
+                               "string8",
+                               "string8",
+                               "string9"
+                       }
+               );
                IList<Color> testList = Color.ColorDic.ToList();
                public IList<Color> TestList {
                        set{
index 28523e1468da1c8acee2779f4e08a2c24b4d88ee..11560723f6eae8f0d93a79cd1b1f74eb901939f0 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <VerticalStack Fit="true">
        <GraphicObject CornerRadius="5" Height="10" Width="600" Background="vgradient|0:Transparent|0,5:White|1:Transparent"/>
-       <HorizontalStack Fit="true">
+       <HorizontalStack Fit="true" HorizontalAlignment="Left">
                <Border Fit="true" CornerRadius="10" BorderWidth="1">
                        <VerticalStack Margin="10">
                                <CheckBox IsChecked="false" Caption="Check 1" Background="hgradient|0:LimeGreen|1:Transparent"/>
                        <VerticalStack Margin="10">
                                <RadioButton IsChecked="false" Caption="Choice 1" Background="hgradient|0:DarkRed|1:Transparent"/>
                                <Splitter/>
-                               <RadioButton IsChecked="false" Caption="Choice 2"  Background="hgradient|0:DarkRed|1:Transparent"/>
+                               <RadioButton Width="0" IsChecked="false" Caption="Choice 2"  Background="hgradient|0:DarkRed|1:Transparent"/>
                                <RadioButton IsChecked="true" Caption="Choice 3"  Background="hgradient|0:DarkRed|1:Transparent"/>
                                <RadioButton IsChecked="false" Caption="Choice 4" Background="hgradient|0:DarkRed|1:Transparent"/>
                        </VerticalStack>
                </Border>
                <Splitter Thickness="3" />
-               <Border Fit="true" CornerRadius="10" BorderWidth="1" MinimumSize="200;200">
+               <Border Fit="true" CornerRadius="10" BorderWidth="1" MaximumSize="150;150" MinimumSize="50;50">
                        <VerticalStack Margin="10">
                                <Label Text="label 1" Background="hgradient|0:BlueCrayola|1:Transparent"/>
                                <Label Text="label 2" Background="hgradient|0:BlueCrayola|1:Transparent"/>
                                <Label Text="label 3" Background="hgradient|0:BlueCrayola|1:Transparent"/>
-                               <Label Text="label 4" Background="hgradient|0:BlueCrayola|1:Transparent"/>
+                               <Label Text="label 4" Width="0" Background="hgradient|0:BlueCrayola|1:Transparent"/>
                        </VerticalStack>
                </Border>
                <Splitter/>
diff --git a/Tests/Interfaces/testOutOfClipUpdate.crow b/Tests/Interfaces/testOutOfClipUpdate.crow
new file mode 100755 (executable)
index 0000000..b255af7
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<Container Width="200" Height="100" Background="DimGray" Margin="5">
+       <Container Width="0" Height="300" Background="DarkBlue">
+               <Label Text="{fps}" Background="BlueCrayola" VerticalAlignment="Center"/>
+       </Container>
+</Container>
diff --git a/Tests/Interfaces/testTreeView.crow b/Tests/Interfaces/testTreeView.crow
new file mode 100755 (executable)
index 0000000..86bcae8
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<TreeView Height="400" Width="200" Data="{List2}" ItemTemplate="#Crow.Templates.TreeViewItem.crow"/>
\ No newline at end of file
index e88c107832b430e69f17aadc19717b36f8704144..1d7bbe1803bd0bfaef41932e1257654ac73a1b4f 100644 (file)
     <None Include="Interfaces\clip4.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="Interfaces\testTreeView.crow">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Interfaces\testOutOfClipUpdate.crow">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Interfaces\" />
index fa34522dab3d19951999dcd7025bd3c6c7560990..05bb0cac3302acc94e115e3004ce3796c794d844 100644 (file)
@@ -1,24 +1,13 @@
 using System;
-
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using Cairo;
-
-using winColors = System.Drawing.Color;
-using System.Diagnostics;
-using System.Xml.Serialization;
 using OpenTK.Input;
 using System.ComponentModel;
+using System.Xml.Serialization;
 
 namespace Crow
 {
        [DefaultTemplate("#Crow.Templates.CheckBox.goml")]
-    public class CheckBox : TemplatedControl
-    {                  
+       public class CheckBox : TemplatedControl
+       {
                string caption;
                string image;
                bool isChecked;
@@ -33,12 +22,7 @@ namespace Crow
                public event EventHandler Unchecked;
 
                #region GraphicObject overrides
-//             [XmlAttributeAttribute()][DefaultValue(-1)]
-//             public override int Height {
-//                     get { return base.Height; }
-//                     set { base.Height = value; }
-//             }
-               [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true
+               [XmlAttributeAttribute()][DefaultValue(true)]
                public override bool Focusable
                {
                        get { return base.Focusable; }
index f44e5e27cbff2c6b624b45368328f66e3385a728..4214ed93a65cbc037b3de9c45809316638094d57 100644 (file)
@@ -1,33 +1,39 @@
 using System;
-
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using Cairo;
-
-using winColors = System.Drawing.Color;
-using System.Diagnostics;
-using System.Xml.Serialization;
 using OpenTK.Input;
 using System.ComponentModel;
-using System.Xml;
-using System.IO;
+using System.Xml.Serialization;
 
 namespace Crow
 {
        [DefaultTemplate("#Crow.Templates.Expandable.goml")]
     public class Expandable : TemplatedContainer
-    {          
+    {
+               #region CTOR
+               public Expandable() : base()
+               {
+               }
+               #endregion
+
+               #region Private fields
                bool _isExpanded;
                string caption;
                string image;
                Container _contentContainer;
+               #endregion
 
+               #region Event Handlers
                public event EventHandler Expand;
                public event EventHandler Collapse;
+               #endregion
+
+               #region GraphicObject overrides
+               [XmlAttributeAttribute()][DefaultValue(true)]
+               public override bool Focusable
+               {
+                       get { return base.Focusable; }
+                       set { base.Focusable = value; }
+               }
+               #endregion
 
                public override GraphicObject Content {
                        get {
@@ -37,30 +43,25 @@ namespace Crow
                                _contentContainer.SetChild(value);
                        }
                }
-
-               public Expandable() : base()
-               {
-               }       
-
                protected override void loadTemplate(GraphicObject template = null)
                {
                        base.loadTemplate (template);
 
                        _contentContainer = this.child.FindByName ("Content") as Container;
                }
-
-               [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true
-               public override bool Focusable
+               public override void onMouseClick (object sender, MouseButtonEventArgs e)
                {
-                       get { return base.Focusable; }
-                       set { base.Focusable = value; }
+                       IsExpanded = !IsExpanded;
+                       base.onMouseClick (sender, e);
                }
-               [XmlAttributeAttribute()][DefaultValue(-1)]
-               public override int Height {
-                       get { return base.Height; }
-                       set { base.Height = value; }
+               public override void ResolveBindings ()
+               {
+                       base.ResolveBindings ();
+                       if (Content != null)
+                               Content.ResolveBindings ();
                }
 
+               #region Public properties
                [XmlAttributeAttribute()][DefaultValue("Expandable")]
                public string Caption {
                        get { return caption; } 
@@ -99,6 +100,7 @@ namespace Crow
                                NotifyValueChanged ("SvgSub", "collapsed");
             }
         }
+               #endregion
 
                public virtual void onExpand(object sender, EventArgs e)
                {
@@ -114,17 +116,5 @@ namespace Crow
                        
                        Collapse.Raise (this, e);
                }
-                       
-               public override void onMouseClick (object sender, MouseButtonEventArgs e)
-               {
-                       IsExpanded = !IsExpanded;
-                       base.onMouseClick (sender, e);
-               }
-               public override void ResolveBindings ()
-               {
-                       base.ResolveBindings ();
-                       if (Content != null)
-                               Content.ResolveBindings ();
-               }
        }
 }
index b6c3a69dc905c5f008c4a86dfcd9176228fe4672..ba11bd772166cc539139e9d49e5d69f2d5210970 100644 (file)
@@ -1,23 +1,14 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-//using OpenTK.Graphics.OpenGL;
-using System.Drawing.Imaging;
+using System.ComponentModel;
 using System.Diagnostics;
-using OpenTK.Input;
-
-using Cairo;
-
-using System.Xml.Serialization;
+using System.Linq;
 using System.Reflection;
-using System.ComponentModel;
-using System.IO;
-//using System.Xml;
-using System.Xml;
-using System.Runtime.CompilerServices;
 using System.Reflection.Emit;
+using System.Runtime.CompilerServices;
+using System.Xml.Serialization;
+using Cairo;
+using OpenTK.Input;
 
 namespace Crow
 {              
index db2107c4c5b801be0f30fbef48f36e6820e51854..2cf1ed5c4708db920236be0dc0d1d300b96afcc2 100644 (file)
@@ -1,12 +1,10 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Drawing;
-using System.Diagnostics;
-using Cairo;
-using System.Xml.Serialization;
 using System.ComponentModel;
+using System.Xml.Serialization;
+using Cairo;
+using OpenTK.Input;
+
 
 namespace Crow
 {
@@ -252,7 +250,7 @@ namespace Crow
 
        
                #region Mouse handling
-               public override void checkHoverWidget (OpenTK.Input.MouseMoveEventArgs e)
+               public override void checkHoverWidget (MouseMoveEventArgs e)
                {
                        if (HostContainer.hoverWidget != this) {
                                HostContainer.hoverWidget = this;
index 9206792aff03351532c5c58219975917efc1d434..e30016637eb9b0bbabb11f6789091da90b67aaf0 100644 (file)
@@ -1,20 +1,6 @@
 using System;
-
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using Cairo;
-
-using winColors = System.Drawing.Color;
-using System.Diagnostics;
 using System.Xml.Serialization;
-using OpenTK.Input;
 using System.ComponentModel;
-using System.Xml;
-using System.IO;
 
 namespace Crow
 {
index 171e54e40d44055bfa73d5a71c403b7ebc180ee3..c99b088932e114e5881648cfa0531f7596ccd2fa 100644 (file)
@@ -1,20 +1,7 @@
 using System;
-
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using Cairo;
-
-using winColors = System.Drawing.Color;
-using System.Diagnostics;
 using System.Xml.Serialization;
-using OpenTK.Input;
 using System.ComponentModel;
-using System.Xml;
-using System.IO;
+using OpenTK.Input;
 
 namespace Crow
 {
index 297b4c2b453aec37c70121ae3555ebff0366d716..4fd45c58e408e9f61134a5b505aff2685a0b6d11 100644 (file)
@@ -1,18 +1,7 @@
 using System;
-
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using Cairo;
-
-using winColors = System.Drawing.Color;
-using System.Diagnostics;
-using System.Xml.Serialization;
 using OpenTK.Input;
 using System.ComponentModel;
+using System.Xml.Serialization;
 
 namespace Crow
 {
@@ -31,17 +20,12 @@ namespace Crow
                public event EventHandler Unchecked;
 
                #region GraphicObject overrides
-               [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true
+               [XmlAttributeAttribute()][DefaultValue(true)]
                public override bool Focusable
                {
                        get { return base.Focusable; }
                        set { base.Focusable = value; }
                }
-               [XmlAttributeAttribute()][DefaultValue(-1)]
-               public override int Height {
-                       get { return base.Height; }
-                       set { base.Height = value; }
-               }
                #endregion
 
                [XmlAttributeAttribute()][DefaultValue("RadioButton")]
@@ -91,8 +75,12 @@ namespace Crow
                {                                               
                        Group pg = Parent as Group;
                        if (pg != null) {
-                               foreach (RadioButton c in pg.Children.OfType<RadioButton>())
+                               for (int i = 0; i < pg.Children.Count; i++) {
+                                       RadioButton c = pg.Children [i] as RadioButton;
+                                       if (c == null)
+                                               continue;
                                        c.IsChecked = (c == this);
+                               }
                        } else
                                IsChecked = !IsChecked;
 
index dddd441e7316549aee2efd486b54be80e66b1cf9..d1ef12a34fab117c21060e8a5c393ae1cb17070e 100644 (file)
@@ -1,18 +1,7 @@
 using System;
-
-
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using Cairo;
-
-using winColors = System.Drawing.Color;
-using System.Diagnostics;
 using System.Xml.Serialization;
-using OpenTK.Input;
 using System.ComponentModel;
+using OpenTK.Input;
 
 namespace Crow
 {
index 1924aac0dd40bf84a12982659b51d5dd00da6031..459205fecbdb0599f8141e7215080df43b86fd4b 100644 (file)
@@ -1,13 +1,30 @@
-using System;
+//
+//  Scroller.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+//  Copyright (c) 2016 jp
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+using System;
+using System.Xml.Serialization;
+using System.ComponentModel;
 using System.Diagnostics;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Drawing;
 using Cairo;
-using System.Xml.Serialization;
 using OpenTK.Input;
-using System.ComponentModel;
 
 namespace Crow
 {
@@ -95,7 +112,6 @@ namespace Crow
                }
                #endregion
 
-
         public Scroller()
             : base(){}
 
@@ -192,14 +208,6 @@ namespace Crow
                {
                        return base.ScreenCoordinates (r) - new Point((int)ScrollX,(int)ScrollY);
                }
-//             protected override void onDraw (Context gr)
-//             {
-//                     gr.Save ();
-//                     //gr.ResetClip ();
-//
-//                     base.onDraw (gr);
-//                     gr.Restore ();
-//             }
                protected override void onDraw (Context gr)
                {
                        Rectangle rBack = new Rectangle (Slot.Size);
@@ -218,20 +226,5 @@ namespace Crow
                                child.Paint (ref gr);
                        gr.Restore ();
                }
-
-//             public override void Paint (ref Context ctx)
-//             {
-//                     ctx.Save ();
-//                     //ctx.ResetClip ();
-//                     ctx.Translate (-ScrollX, -ScrollY);
-//                     base.Paint (ref ctx);
-//                     ctx.Restore ();
-//             }
-//             public override void registerClipRect ()
-//             {
-//                     HostContainer.redrawClip.AddRectangle (base.ScreenCoordinates(Slot));
-//             }
-
-
     }
 }
diff --git a/src/GraphicObjects/TabView.cs b/src/GraphicObjects/TabView.cs
new file mode 100644 (file)
index 0000000..f9f4475
--- /dev/null
@@ -0,0 +1,32 @@
+//
+//  TabView.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+//  Copyright (c) 2016 jp
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+using System;
+
+namespace Crow
+{
+       public class TabView
+       {
+               public TabView ()
+               {
+               }
+       }
+}
+
diff --git a/src/GraphicObjects/TreeView.cs b/src/GraphicObjects/TreeView.cs
new file mode 100644 (file)
index 0000000..64d4afc
--- /dev/null
@@ -0,0 +1,35 @@
+//
+//  TreeView.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+//  Copyright (c) 2016 jp
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+using System;
+
+namespace Crow
+{
+       //treeview expect expandable child (or not)
+       //if their are expandable, some functions and events are added
+       [DefaultTemplate("#Crow.Templates.TreeView.crow")]
+       public class TreeView : ListBox
+       {
+               public TreeView () : base()
+               {
+               }
+       }
+}
+
index 013f2eea4ffa59dbeeeddee636fdd9a35b7fb65e..72d8fb9c358d3b68f3a67efbc6c79e11165fcac5 100644 (file)
@@ -1,8 +1,26 @@
-// Released to the public domain. Use, modify and relicense at will.
+//
+//  OpenTKGameWindow.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+//  Copyright (c) 2016 jp
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Drawing.Imaging;
 using System.IO;
 using System.Linq;
 using System.Threading;
@@ -12,8 +30,6 @@ using OpenTK;
 using OpenTK.Graphics.OpenGL;
 using OpenTK.Input;
 
-
-
 namespace Crow
 {
        public class OpenTKGameWindow : GameWindow, ILayoutable, IGOLibHost