]> O.S.I.I.S - jp/crow.git/commitdiff
tests reorganization
authorjpbruyere <jp.bruyere@hotmail.com>
Thu, 18 Aug 2016 15:26:50 +0000 (17:26 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Thu, 1 Sep 2016 10:44:38 +0000 (12:44 +0200)
modifié :         Crow.csproj
modifié :         Tests/BasicTests.cs
renommé :         Tests/Interfaces/Expandable/0.crow -> Tests/Interfaces/TemplatedContainer/0.crow
renommé :         Tests/Interfaces/Expandable/6.crow -> Tests/Interfaces/TemplatedContainer/6.crow
renommé :         Tests/Interfaces/Expandable/7.crow -> Tests/Interfaces/TemplatedContainer/7.crow
renommé :         Tests/Interfaces/Divers/testDirViewer2.crow -> Tests/Interfaces/TemplatedContainer/testDirViewer2.crow
renommé :         Tests/Interfaces/Divers/testGroupBox.crow -> Tests/Interfaces/TemplatedContainer/testGroupBox.crow
renommé :         Tests/Interfaces/Divers/testMsgBox.crow -> Tests/Interfaces/TemplatedContainer/testMsgBox.crow
renommé :         Tests/Interfaces/Divers/testPopper.crow -> Tests/Interfaces/TemplatedContainer/testPopper.crow
renommé :         Tests/Interfaces/Divers/testTabView.crow -> Tests/Interfaces/TemplatedContainer/testTabView.crow
renommé :         Tests/Interfaces/Divers/testTreeView.crow -> Tests/Interfaces/TemplatedContainer/testTreeView.crow
renommé :         Tests/Interfaces/Divers/testWindow.goml -> Tests/Interfaces/TemplatedContainer/testWindow.goml
renommé :         Tests/Interfaces/Divers/testWindow2.goml -> Tests/Interfaces/TemplatedContainer/testWindow2.goml
renommé :         Tests/Interfaces/Divers/testWindow3.goml -> Tests/Interfaces/TemplatedContainer/testWindow3.goml
renommé :         Tests/Interfaces/Divers/test_Listbox.crow -> Tests/Interfaces/TemplatedContainer/test_Listbox.crow
renommé :         Tests/Interfaces/Divers/testButton.crow -> Tests/Interfaces/TemplatedControl/testButton.crow
renommé :         Tests/Interfaces/Divers/testCheckbox.crow -> Tests/Interfaces/TemplatedControl/testCheckbox.crow
renommé :         Tests/Interfaces/Divers/testCombobox.crow -> Tests/Interfaces/TemplatedControl/testCombobox.crow
renommé :         Tests/Interfaces/Divers/testItemTemplateTag.crow -> Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow
renommé :         Tests/Interfaces/Divers/testRadioButton.crow -> Tests/Interfaces/TemplatedControl/testRadioButton.crow
renommé :         Tests/Interfaces/Divers/testScrollbar.goml -> Tests/Interfaces/TemplatedControl/testScrollbar.goml
renommé :         Tests/Interfaces/Divers/testSpinner.goml -> Tests/Interfaces/TemplatedControl/testSpinner.goml
modifié :         Tests/Tests.csproj
modifié :         src/GraphicObjects/Expandable.cs
modifié :         src/GraphicObjects/Group.cs

TemplatedGroup class
nouveau fichier : src/GraphicObjects/TemplatedGroup.cs
nouveau fichier : Tests/Interfaces/TemplatedGroup/0.crow
modifié :         src/IMLReader.cs

48 files changed:
Crow.csproj
Tests/BasicTests.cs
Tests/Interfaces/Divers/testButton.crow [deleted file]
Tests/Interfaces/Divers/testCheckbox.crow [deleted file]
Tests/Interfaces/Divers/testCombobox.crow [deleted file]
Tests/Interfaces/Divers/testDirViewer2.crow [deleted file]
Tests/Interfaces/Divers/testGroupBox.crow [deleted file]
Tests/Interfaces/Divers/testItemTemplateTag.crow [deleted file]
Tests/Interfaces/Divers/testMsgBox.crow [deleted file]
Tests/Interfaces/Divers/testPopper.crow [deleted file]
Tests/Interfaces/Divers/testRadioButton.crow [deleted file]
Tests/Interfaces/Divers/testScrollbar.goml [deleted file]
Tests/Interfaces/Divers/testSpinner.goml [deleted file]
Tests/Interfaces/Divers/testTabView.crow [deleted file]
Tests/Interfaces/Divers/testTreeView.crow [deleted file]
Tests/Interfaces/Divers/testWindow.goml [deleted file]
Tests/Interfaces/Divers/testWindow2.goml [deleted file]
Tests/Interfaces/Divers/testWindow3.goml [deleted file]
Tests/Interfaces/Divers/test_Listbox.crow [deleted file]
Tests/Interfaces/Expandable/0.crow [deleted file]
Tests/Interfaces/Expandable/6.crow [deleted file]
Tests/Interfaces/Expandable/7.crow [deleted file]
Tests/Interfaces/TemplatedContainer/0.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/6.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/7.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/testDirViewer2.crow [new file with mode: 0644]
Tests/Interfaces/TemplatedContainer/testGroupBox.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/testMsgBox.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/testPopper.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/testTabView.crow [new file with mode: 0644]
Tests/Interfaces/TemplatedContainer/testTreeView.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/testWindow.goml [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/testWindow2.goml [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/testWindow3.goml [new file with mode: 0755]
Tests/Interfaces/TemplatedContainer/test_Listbox.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedControl/testButton.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedControl/testCheckbox.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedControl/testCombobox.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedControl/testRadioButton.crow [new file with mode: 0755]
Tests/Interfaces/TemplatedControl/testScrollbar.goml [new file with mode: 0755]
Tests/Interfaces/TemplatedControl/testSpinner.goml [new file with mode: 0755]
Tests/Interfaces/TemplatedGroup/0.crow [new file with mode: 0755]
Tests/Tests.csproj
src/GraphicObjects/Expandable.cs
src/GraphicObjects/Group.cs
src/GraphicObjects/TemplatedGroup.cs [new file with mode: 0644]
src/IMLReader.cs

index 0bebc5f2c44b005a00aba0d7fbf8a83c7e972cc2..570a8941fd67a5fe9d50d25c001a16c5446f4470 100644 (file)
     <Compile Include="src\ItemTemplate.cs" />
     <Compile Include="src\Style.cs" />
     <Compile Include="src\GraphicObjects\Wrapper.cs" />
+    <Compile Include="src\GraphicObjects\TemplatedGroup.cs" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
index 9717c230d0fae2edb8bc9b3b3777871978b76c85..b2299f42445577c877aa3719078e30521903a6ed 100644 (file)
@@ -95,14 +95,16 @@ namespace Tests
                        this.KeyDown += KeyboardKeyDown1;
 
                        testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedGroup", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Stack", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Wrapper", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Expandable", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
+                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.crow")).ToArray ();
+                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedContainer", "*.crow")).ToArray ();
 
                        this.Title = testFiles [idx] + ". Press <F3> to switch example.";
                        CrowInterface.LoadInterface(testFiles[idx]).DataSource = this;
diff --git a/Tests/Interfaces/Divers/testButton.crow b/Tests/Interfaces/Divers/testButton.crow
deleted file mode 100755 (executable)
index 69367ea..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Fit="true" Background="vgradient|0:DimGray|1:Black">
-       <HorizontalStack Fit="True">
-               <Button Caption="but" MouseClick="onButClick"/>
-               <Button Caption="but" MouseClick="onButClick" Fit="true"/>
-               <Button Width="60" Height="40" MouseClick="onButClick"/>
-               <Button Caption="Long text button" MouseClick="onButClick"/>
-               <Button Font="droid, 20" Caption="Button"/>
-       </HorizontalStack>
-</VerticalStack>
\ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testCheckbox.crow b/Tests/Interfaces/Divers/testCheckbox.crow
deleted file mode 100755 (executable)
index ddde673..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Fit="true" Margin="100" Background="DimGray" >
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
-</VerticalStack>
-
diff --git a/Tests/Interfaces/Divers/testCombobox.crow b/Tests/Interfaces/Divers/testCombobox.crow
deleted file mode 100755 (executable)
index 2ef6d39..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<Container Background="Onyx" Width="300">
-       <ComboBox  Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem.crow"/>
-</Container>
\ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testDirViewer2.crow b/Tests/Interfaces/Divers/testDirViewer2.crow
deleted file mode 100644 (file)
index c4f0904..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<HorizontalStack>
-       <Window Resizable="false" Focusable="true" Title="Open File..." Width="20%" Height="100%"
-                       MinimumSize="10,1">
-               <DirectoryView Name="dv" Margin="10" Root="./" SelectedItemChanged="Tv_SelectedItemChanged"/>
-       </Window>
-       <Splitter/>
-       <VerticalStack Width="80%" Height="100%">
-               <Window Resizable="false" Focusable="true" Title="{../dv.SelectedItem}"
-                               Height="50%" Width="Stretched"
-                               MinimumSize="10,1">
-                       <Container Margin="10" Name="crowContainer"/>
-               </Window>
-               <Splitter/>
-               <Window Resizable="false" Focusable="true" Title="{../dv.SelectedItem}"
-                               Height="50%" Width="Stretched"
-                               MinimumSize="10,1">
-                       <TextBox Multiline="true" Margin="10" Height="Stretched"
-                               Text="{CurSources}"/>
-               </Window>
-       </VerticalStack>
-</HorizontalStack>
diff --git a/Tests/Interfaces/Divers/testGroupBox.crow b/Tests/Interfaces/Divers/testGroupBox.crow
deleted file mode 100755 (executable)
index 416bb21..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<!--<Container Background="vgradient|0:DarkGray|1:DimGray">-->
-       <GroupBox Fit="true" Background="vgradient|0:SteelBlue|1:Transparent"
-               Foreground="White">
-<!--           <Label/>-->
-       </GroupBox>
-<!--</Container>-->
diff --git a/Tests/Interfaces/Divers/testItemTemplateTag.crow b/Tests/Interfaces/Divers/testItemTemplateTag.crow
deleted file mode 100755 (executable)
index e05c2d1..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="2" Fit="true">
-       <VerticalStack Fit="true" Margin="5">
-               <ListBox Data="{TestList}" Background="0.5,0.5,0.5,0.7"
-                                        HorizontalAlignment="Center" Width="200" Height="200" Margin="5">
-                       <Template>
-                               <Border BorderWidth="1" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
-                                       <HorizontalStack Margin="1" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}" >
-                                               <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" 
-                                                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
-                                                               ValueChanged="../../../_scroller_ValueChanged">
-                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="10,10"
-                                                               Name="List" Margin="0"
-                                                               VerticalAlignment="Top"
-                                                               HorizontalAlignment="Left"
-                                                               LayoutChanged="../../../../_list_LayoutChanged"/>
-                                               </Scroller>
-                                               <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}" 
-                                                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" 
-                                                       Width="14" Height="{../../../HeightPolicy}" />
-                                       </HorizontalStack>
-                               </Border>
-                       </Template>
-                       <ItemTemplate DataType="Crow.Color">
-                               <HorizontalStack
-                                                       HorizontalAlignment="Left"
-                                                       Height="Fit" Width="200" Margin="1" Focusable="true"
-                                                       MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}"
-                                                       MouseLeave="{Background=Transparent}">
-                                       <GraphicObject Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/>
-                                       <Label Text="{Name}" Margin="0" Width="Stretched"/>
-                               </HorizontalStack>
-                       </ItemTemplate>
-               </ListBox>
-               <HorizontalStack Fit="true" HorizontalAlignment="Right">
-                       <Button Caption="Load list" MouseClick="OnLoadList"/>
-                       <Button Caption="Clear" MouseClick="OnClear"/>
-               </HorizontalStack>
-       </VerticalStack>
-</Border>
\ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testMsgBox.crow b/Tests/Interfaces/Divers/testMsgBox.crow
deleted file mode 100755 (executable)
index 9536637..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0"?>
-<MessageBox Title="message" Message="this is a message box"/>
-<!--   Ok="onMsgBoxOk"
-       Cancel="onMsgBoxCancel"/>-->
\ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testPopper.crow b/Tests/Interfaces/Divers/testPopper.crow
deleted file mode 100755 (executable)
index 0c579d9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack>
-       <Border Fit="true" Margin="10">
-               <VerticalStack Width="150" Height="Fit">
-                       <RadioButton Caption="Left" IsChecked="true" Checked="change_alignment"/>
-                       <RadioButton Caption="Right" Checked="change_alignment"/>
-                       <RadioButton Caption="Top" Checked="change_alignment"/>
-                       <RadioButton Caption="Bottom" Checked="change_alignment"/>
-               </VerticalStack>
-       </Border>
-       <GraphicObject Height="200"/>
-       <Popper Caption="TestPopper" Width="100" Background="DimGray" PopDirection="{alignment}">
-               <Border Fit="True" Background="ArmyGreen">
-                       <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>
-                       <VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
-                               <CheckBox Name="chk1" Background="Red"/>
-                               <CheckBox Name="chk2" IsChecked="true"/>
-                               <CheckBox Name="chk3"/>
-                               <CheckBox Name="chk4"/>
-                               <HorizontalStack Fit="true" Margin="20">
-                                       <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
-                                       <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
-                               </HorizontalStack>
-                       </VerticalStack>
-               </Border>
-       </Popper>
-</VerticalStack>
diff --git a/Tests/Interfaces/Divers/testRadioButton.crow b/Tests/Interfaces/Divers/testRadioButton.crow
deleted file mode 100755 (executable)
index de07e25..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGray">
-       <RadioButton Caption="Radio1"/>
-       <RadioButton Caption="Radio2" IsChecked="true"/>
-       <RadioButton Caption="Radio3"/>
-       <RadioButton Caption="Radio4"/>
-</VerticalStack>
-
diff --git a/Tests/Interfaces/Divers/testScrollbar.goml b/Tests/Interfaces/Divers/testScrollbar.goml
deleted file mode 100755 (executable)
index c494e34..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<Group Name="TopContainer" Width="400" Height="400"
-       Focusable="True" Background="Gray">
-       <ScrollBar Height="Stretched" Orientation="Vertical" Width="16" Maximum="100"/>
-</Group>
\ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testSpinner.goml b/Tests/Interfaces/Divers/testSpinner.goml
deleted file mode 100755 (executable)
index 4efd587..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Name="TopContainer" Width="400" Height="Fit"
-       Margin="20" Background="DarkGray">
-
-       <HorizontalStack Fit="true" Margin="5" Background="SkyBlue">
-               <Spinner Value="{IntValue}" ValueChanged="onSpinnerValueChange"/>
-               <Spinner Value="5"/>
-               <Spinner Value="5"/>
-               <Button/>
-       </HorizontalStack>
-</VerticalStack>
\ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testTabView.crow b/Tests/Interfaces/Divers/testTabView.crow
deleted file mode 100644 (file)
index 27c221f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<HorizontalStack Fit="true">
-       <VerticalStack Fit="true">
-               <TabView Name="tabview1"
-                       Width="400" Height="200" Orientation="Horizontal" Spacing="20">
-                       <TabItem Name="TabItem1" Caption="tab item 1" Margin="0">
-                               <VerticalStack Fit="true">
-                                       <CheckBox/>
-                                       <CheckBox/>
-                                       <CheckBox/>
-                                       <CheckBox/>
-                               </VerticalStack>
-                       </TabItem>
-                       <TabItem Name="TabItem2" Caption="tab item 2" Width="Stretched" Height="Stretched" Margin="0" Background="Gray">
-                               <VerticalStack Fit="true">
-                                       <RadioButton/>
-                                       <RadioButton/>
-                                       <RadioButton/>
-                                       <RadioButton/>
-                               </VerticalStack>
-                       </TabItem>
-                       <TabItem Name="TabItem2" Caption="tab item 3" Width="Stretched" Height="Stretched" Margin="0" Background="Gray">
-                               <Container Margin="5" CornerRadius="2" Width="Stretched" Height="Stretched">
-                                       <TextBox Margin="5" Width="Stretched" Height="Stretched" Multiline="true" TextAlignment="TopLeft"/>
-                               </Container>
-                       </TabItem>
-                       <TabItem Name="TabItem2" Caption="tab item 4" Width="Stretched" Height="Stretched" Margin="0" Background="Gray">
-                               <TextBox/>
-                       </TabItem>
-               </TabView>
-               <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
-                       Caption="Add new tab" Width="Fit" Height="30" MouseClick="onAddTabButClick"/>
-       </VerticalStack>
-</HorizontalStack>
-
diff --git a/Tests/Interfaces/Divers/testTreeView.crow b/Tests/Interfaces/Divers/testTreeView.crow
deleted file mode 100755 (executable)
index 3ec7ce6..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0"?>
-<TreeView IsRoot="true" Name="treeView" Data="{CurDirectory}" Background="DimGray">
-       <ItemTemplate DataType="System.IO.FileInfo">
-               <HorizontalStack Focusable="true"  Height="Fit" Width="Stretched" Background="{../Background}" >
-                       <Image Margin="2" Width="14" Height="14"
-                               Path="#Crow.Images.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="GetFileSystemInfos">             
-               <Expandable Caption="{Name}" >
-                       <Template>
-                               <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-                                       <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}"
-                                                       MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
-                                                       MouseLeave="{Background=Transparent}">
-                                               <Image Margin="2" Width="12" Height="12"
-                                                       Visible="{./HasContent}"
-                                                       Path="{./Image}" 
-                                                       SvgSub="{./IsExpanded}"/>
-                                               <Image Margin="2" Width="14" Height="14"
-                                                       Path="#Crow.Images.Icons.folder.svg"/>
-                                               <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
-                                       </HorizontalStack>
-                                       <Container Name="Content" Visible="false"
-                                                       Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
-                               </VerticalStack>
-                       </Template>
-                       <HorizontalStack Height="Fit" Width="{./WidthPolicy}">
-                               <GraphicObject Width="12" Height="10"/>
-                               <TreeView Name="List" Height="Fit" Width="{./WidthPolicy}">
-                                       <Template>
-                                               <VerticalStack Height="Fit" Width="{../WidthPolicy}" Name="List"/>
-                                       </Template>
-                               </TreeView>
-                       </HorizontalStack>
-               </Expandable>
-       </ItemTemplate>
-</TreeView>
diff --git a/Tests/Interfaces/Divers/testWindow.goml b/Tests/Interfaces/Divers/testWindow.goml
deleted file mode 100755 (executable)
index 09db619..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0"?>
-<Window Left="10" Top="10" Title="Test window" 
-               Width="250" Height="550" >
-       <VerticalStack Name="contentVSStack" Margin="10" Spacing="10" Background="0.4,0.4,0.4,0.4">
-               <Slider Name="slider" Height="12" Width="Stretched" CornerRadius="3"/>
-               <GroupBox Caption="test"  Height="Fit" Width="Stretched" Margin="5">
-                       <VerticalStack  Height="Fit" Width="Stretched" >
-                               <RadioButton  Caption="Radio 1" Background="Red" Width="Stretched"/>
-                               <RadioButton  Caption="Radio 2" IsChecked="true" />
-                               <RadioButton  Caption="Radio 3" />
-                               <RadioButton  Caption="Radio 1" Background="SkyBlue" Width="Stretched"/>
-                       </VerticalStack>
-               </GroupBox>
-               <HorizontalStack Width="Stretched" Height="Fit" Margin="10" CornerRadius="5" Background="SkyBlue">
-                       <RadioButton Width="80" Height="Fit"  Caption="Radio 2" IsChecked="true" />
-                       <GraphicObject Width="Stretched"/>
-                       <RadioButton Width="80" Height="Fit" Caption="Radio 3" />
-               </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Stretched" MinimumSize="10,40" Margin="0" CornerRadius="5"
-                               Background="vgradient|0:White|0.1:SteelBlue|0.9:SteelBlue|1:Transparent">
-                       <CheckBox Height="Fit" Width="80"/>
-                       <GraphicObject Width="Stretched"/>
-                       <CheckBox Height="Fit" Width="80" IsChecked="true"/>
-               </HorizontalStack>
-               <Border Fit="true" CornerRadius="5" BorderWidth="1" >
-                       <Container Name="MainGrp" Background="0.5,0.5,0.5,0.4" Width="120" Fit="true"
-                               Margin="10" Focusable="True" >
-                                       <VerticalStack Fit="true" Name="vsFps"  Spacing="10" >
-                                               <HorizontalStack Fit="true">
-                                                       <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
-                                                       <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
-                                                               Background="vgradient|0:AoEnglish|1:Black"/>
-                                               </HorizontalStack>
-                                               <HorizontalStack Fit="true">
-                                                       <Label Text="Clipping:" Width="50" TextAlignment="Right"/>
-                                                       <Label Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
-                                                               Background="vgradient|0:AoEnglish|1:Black"/>
-                                               </HorizontalStack>
-                                               <HorizontalStack Fit="true">
-                                                       <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
-                                                       <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
-                                                               Background="vgradient|0:AoEnglish|1:Black"/>
-                                               </HorizontalStack>
-                                               <HorizontalStack Fit="true">
-                                                       <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
-                                                       <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" 
-                                                               Background="vgradient|0:AoEnglish|1:Black"/>
-                                               </HorizontalStack>
-                                               <HorizontalStack Fit="true">
-                                                       <Label Text="Min:" Width="50" TextAlignment="Right"/>
-                                                       <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
-                                                               Background="vgradient|0:AoEnglish|1:Black"/>
-                                               </HorizontalStack>
-                                               <HorizontalStack Fit="true">
-                                                       <Label Text="Max:" Width="50" TextAlignment="Right"/>
-                                                       <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
-                                                               Background="vgradient|0:AoEnglish|1:Black"/>
-                                               </HorizontalStack>
-                                       </VerticalStack>                                
-                       </Container>
-               </Border>
-               <HorizontalStack Fit="true" Background="BlueCrayola" Margin="3">
-                       <GraphicObject Margin="10" Background="LimeGreen" Width="5" Height="5"/>
-                       <TextBox Font="droid, 16" Multiline="true" Text="this is a test\nmultiline" Margin="2"/>
-                       <GraphicObject Margin="10" Background="LimeGreen" Width="5" Height="5"/>
-               </HorizontalStack>
-       </VerticalStack>
-</Window>
\ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testWindow2.goml b/Tests/Interfaces/Divers/testWindow2.goml
deleted file mode 100755 (executable)
index 7f0caf3..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0"?>
-<Window Focusable="true" Title="Measures" Width="30%" Height="Fit" MinimumSize="100,100">
-       <VerticalStack Width="90%" Height="Fit" Spacing="1" Margin="10">
-               <HorizontalStack Height="Fit">
-                       <Label Text="Fps:" Style="FpsLabel"/>
-                       <Label Text="{fps}" Style="FpsDisp"/>
-               </HorizontalStack>
-               <HorizontalStack Height="Fit">
-                       <Label Text="Min:" Style="FpsLabel"/>
-                       <Label Text="{fpsMin}" Style="FpsDisp"/>
-               </HorizontalStack>
-               <HorizontalStack Height="Fit">
-                       <Label Text="Max:" Style="FpsLabel"/>
-                       <Label Text="{fpsMax}" Style="FpsDisp"/>
-               </HorizontalStack>
-               <HorizontalStack Height="Fit">
-                       <Label Text="Update:" Style="FpsLabel"/>
-                       <Label Text="{update}" Style="FpsDisp"/>
-               </HorizontalStack>
-               <HorizontalStack Height="Fit">
-                       <Label Text="Layouting:" Style="FpsLabel"/>
-                       <Label Text="{layouting}" Style="FpsDisp"/>
-               </HorizontalStack>
-               <HorizontalStack Height="Fit">
-                       <Label Text="Clipping:" Style="FpsLabel"/>
-                       <Label Text="{clipping}" Style="FpsDisp"/>
-               </HorizontalStack>
-               <HorizontalStack Height="Fit">
-                       <Label Text="Drawing:" Style="FpsLabel"/>
-                       <Label Text="{drawing}" Style="FpsDisp"/>
-               </HorizontalStack>
-       </VerticalStack>
-</Window>
diff --git a/Tests/Interfaces/Divers/testWindow3.goml b/Tests/Interfaces/Divers/testWindow3.goml
deleted file mode 100755 (executable)
index 42459bd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<Window Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0.5,0.5,0.5,0.8" 
-       Focusable="True"  CornerRadius="20" MinimumSize="100,100" MaximumSize="500,500">
-       <Template>
-               <Container Margin="20" Name="Content" Height="{../HeightPolicy}" Width="{../WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
-       </Template>
-<!--   <Group Background="Green">-->
-               <GraphicObject Height="50" Width="50" Background="Red" Margin="5"/>
-<!--           <Scrollbar Orientation="Vertical" Height="Stretched" Width="10" Background="Blue" Margin="0" HorizontalAlignment="Right"/>-->
-<!--   </Group>-->
-</Window>
diff --git a/Tests/Interfaces/Divers/test_Listbox.crow b/Tests/Interfaces/Divers/test_Listbox.crow
deleted file mode 100755 (executable)
index 321ea58..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<!--<ListBox Data="{TestList}" Focusable="true"/>-->
-<Border Margin="50">
-       <VerticalStack >
-               <Label Text="{../ColorList.SelectedItem}" Background="DarkGreen"/>
-               <Label Text="{Hover}" Background="DarkGreen"/>
-               <Button Caption="Clear" Width="Stretched" MouseClick="OnClear"/>
-               <ListBox Name="ColorList" Data="{TestList}" Background="0.5,0.5,0.5,0.5"
-                                        HorizontalAlignment="Center" Width="Fit" Height="200" Margin="0"
-                                        ItemTemplate="#Tests.Interfaces.colorItem.crow"
-                                        Template="#Crow.Templates.ScrollingListBox.goml">
-<!--                   <Template>
-                               <Border BorderWidth="1" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
-                                       <HorizontalStack Margin="1" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}" >
-                                               <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" 
-                                                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
-                                                               ValueChanged="../../../_scroller_ValueChanged">
-                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="100,100"
-                                                               Name="List" Margin="0" VerticalAlignment="Top"
-                                                               LayoutChanged="../../../../_list_LayoutChanged"/>
-                                               </Scroller>
-                                               <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}" 
-                                                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" 
-                                                       Width="12" Height="{../../../HeightPolicy}" />
-                                       </HorizontalStack>
-                               </Border>
-                       </Template>-->
-               </ListBox>
-               <Button Caption="Load list" Width="Stretched" MouseClick="../../../OnLoadList"/>
-       </VerticalStack>
-</Border>
\ No newline at end of file
diff --git a/Tests/Interfaces/Expandable/0.crow b/Tests/Interfaces/Expandable/0.crow
deleted file mode 100755 (executable)
index 0c37d33..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<Expandable Fit="true" Caption="Test expandable" Background="DimGray">
-               <VerticalStack Margin="5" >
-                       <CheckBox Name="chk1" />
-                       <CheckBox Name="chk2" IsChecked="true"/>
-                       <CheckBox Name="chk3" />
-                       <CheckBox Name="chk4" />
-                       <HorizontalStack Fit="true" Margin="2" Background="Mantis">
-                               <Label Name="captionFps" Text="Fps:" Width="30" TextAlignment="Right"/>
-                               <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="Fit" TextAlignment="Center" Background="AoEnglish"/>
-                       </HorizontalStack>
-               </VerticalStack>
-</Expandable>
diff --git a/Tests/Interfaces/Expandable/6.crow b/Tests/Interfaces/Expandable/6.crow
deleted file mode 100755 (executable)
index 041bdf5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<Expandable Width="Stretched"  Background="Gray">
-               <Expandable Width="Stretched" Background="LightBlue">
-                       <Expandable Width="Stretched" Background="Green">
-                               <Expandable Width="Stretched" Background="LimeGreen">
-                                       <Expandable Width="Stretched" Background="DimGray">
-                                               <Expandable Width="Stretched" Background="Yellow">
-                                                       <Expandable Width="Stretched" Background="NavyBlue">
-                                                               <Expandable Width="Stretched" Background="Blue">
-                                                                       <Expandable Width="Stretched" Background="BlueCrayola">
-                                                                               <Expandable Width="Stretched" Background="Green">
-                                                                                       <Label Background="Red" Text="{fps}"/>
-                                                                               </Expandable>
-                                                                       </Expandable>
-                                                               </Expandable>
-                                                       </Expandable>
-                                               </Expandable>
-                                       </Expandable>
-                               </Expandable>
-                       </Expandable>
-               </Expandable>
-       </Expandable>
\ No newline at end of file
diff --git a/Tests/Interfaces/Expandable/7.crow b/Tests/Interfaces/Expandable/7.crow
deleted file mode 100755 (executable)
index 0c94b6c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Height="Fit" Width="Fit">
-       <Label Width="Stretched"/>
-       <Expandable  Width="Fit" Background="Gray">
-               <Expandable Background="LightBlue">
-                       <Expandable Background="Green">
-                               <Expandable Background="LimeGreen">
-                                       <Expandable Background="DimGray">
-                                               <Expandable Width="Stretched" Background="Yellow">
-                                                       <Expandable Background="NavyBlue">
-                                                               <Expandable Width="Stretched" Background="Blue">
-                                                                       <Expandable Width="Stretched" Background="BlueCrayola">
-                                                                               <Expandable Width="Stretched" Background="Green">
-                                                                                       <Label Background="Red" Text="{fps}"/>
-                                                                               </Expandable>
-                                                                       </Expandable>
-                                                               </Expandable>
-                                                       </Expandable>
-                                               </Expandable>
-                                       </Expandable>
-                               </Expandable>
-                       </Expandable>
-               </Expandable>
-       </Expandable>
-</VerticalStack>
diff --git a/Tests/Interfaces/TemplatedContainer/0.crow b/Tests/Interfaces/TemplatedContainer/0.crow
new file mode 100755 (executable)
index 0000000..0c37d33
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<Expandable Fit="true" Caption="Test expandable" Background="DimGray">
+               <VerticalStack Margin="5" >
+                       <CheckBox Name="chk1" />
+                       <CheckBox Name="chk2" IsChecked="true"/>
+                       <CheckBox Name="chk3" />
+                       <CheckBox Name="chk4" />
+                       <HorizontalStack Fit="true" Margin="2" Background="Mantis">
+                               <Label Name="captionFps" Text="Fps:" Width="30" TextAlignment="Right"/>
+                               <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="Fit" TextAlignment="Center" Background="AoEnglish"/>
+                       </HorizontalStack>
+               </VerticalStack>
+</Expandable>
diff --git a/Tests/Interfaces/TemplatedContainer/6.crow b/Tests/Interfaces/TemplatedContainer/6.crow
new file mode 100755 (executable)
index 0000000..041bdf5
--- /dev/null
@@ -0,0 +1,21 @@
+<Expandable Width="Stretched"  Background="Gray">
+               <Expandable Width="Stretched" Background="LightBlue">
+                       <Expandable Width="Stretched" Background="Green">
+                               <Expandable Width="Stretched" Background="LimeGreen">
+                                       <Expandable Width="Stretched" Background="DimGray">
+                                               <Expandable Width="Stretched" Background="Yellow">
+                                                       <Expandable Width="Stretched" Background="NavyBlue">
+                                                               <Expandable Width="Stretched" Background="Blue">
+                                                                       <Expandable Width="Stretched" Background="BlueCrayola">
+                                                                               <Expandable Width="Stretched" Background="Green">
+                                                                                       <Label Background="Red" Text="{fps}"/>
+                                                                               </Expandable>
+                                                                       </Expandable>
+                                                               </Expandable>
+                                                       </Expandable>
+                                               </Expandable>
+                                       </Expandable>
+                               </Expandable>
+                       </Expandable>
+               </Expandable>
+       </Expandable>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedContainer/7.crow b/Tests/Interfaces/TemplatedContainer/7.crow
new file mode 100755 (executable)
index 0000000..0c94b6c
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<VerticalStack Height="Fit" Width="Fit">
+       <Label Width="Stretched"/>
+       <Expandable  Width="Fit" Background="Gray">
+               <Expandable Background="LightBlue">
+                       <Expandable Background="Green">
+                               <Expandable Background="LimeGreen">
+                                       <Expandable Background="DimGray">
+                                               <Expandable Width="Stretched" Background="Yellow">
+                                                       <Expandable Background="NavyBlue">
+                                                               <Expandable Width="Stretched" Background="Blue">
+                                                                       <Expandable Width="Stretched" Background="BlueCrayola">
+                                                                               <Expandable Width="Stretched" Background="Green">
+                                                                                       <Label Background="Red" Text="{fps}"/>
+                                                                               </Expandable>
+                                                                       </Expandable>
+                                                               </Expandable>
+                                                       </Expandable>
+                                               </Expandable>
+                                       </Expandable>
+                               </Expandable>
+                       </Expandable>
+               </Expandable>
+       </Expandable>
+</VerticalStack>
diff --git a/Tests/Interfaces/TemplatedContainer/testDirViewer2.crow b/Tests/Interfaces/TemplatedContainer/testDirViewer2.crow
new file mode 100644 (file)
index 0000000..c4f0904
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<HorizontalStack>
+       <Window Resizable="false" Focusable="true" Title="Open File..." Width="20%" Height="100%"
+                       MinimumSize="10,1">
+               <DirectoryView Name="dv" Margin="10" Root="./" SelectedItemChanged="Tv_SelectedItemChanged"/>
+       </Window>
+       <Splitter/>
+       <VerticalStack Width="80%" Height="100%">
+               <Window Resizable="false" Focusable="true" Title="{../dv.SelectedItem}"
+                               Height="50%" Width="Stretched"
+                               MinimumSize="10,1">
+                       <Container Margin="10" Name="crowContainer"/>
+               </Window>
+               <Splitter/>
+               <Window Resizable="false" Focusable="true" Title="{../dv.SelectedItem}"
+                               Height="50%" Width="Stretched"
+                               MinimumSize="10,1">
+                       <TextBox Multiline="true" Margin="10" Height="Stretched"
+                               Text="{CurSources}"/>
+               </Window>
+       </VerticalStack>
+</HorizontalStack>
diff --git a/Tests/Interfaces/TemplatedContainer/testGroupBox.crow b/Tests/Interfaces/TemplatedContainer/testGroupBox.crow
new file mode 100755 (executable)
index 0000000..416bb21
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!--<Container Background="vgradient|0:DarkGray|1:DimGray">-->
+       <GroupBox Fit="true" Background="vgradient|0:SteelBlue|1:Transparent"
+               Foreground="White">
+<!--           <Label/>-->
+       </GroupBox>
+<!--</Container>-->
diff --git a/Tests/Interfaces/TemplatedContainer/testMsgBox.crow b/Tests/Interfaces/TemplatedContainer/testMsgBox.crow
new file mode 100755 (executable)
index 0000000..9536637
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<MessageBox Title="message" Message="this is a message box"/>
+<!--   Ok="onMsgBoxOk"
+       Cancel="onMsgBoxCancel"/>-->
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedContainer/testPopper.crow b/Tests/Interfaces/TemplatedContainer/testPopper.crow
new file mode 100755 (executable)
index 0000000..0c579d9
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<VerticalStack>
+       <Border Fit="true" Margin="10">
+               <VerticalStack Width="150" Height="Fit">
+                       <RadioButton Caption="Left" IsChecked="true" Checked="change_alignment"/>
+                       <RadioButton Caption="Right" Checked="change_alignment"/>
+                       <RadioButton Caption="Top" Checked="change_alignment"/>
+                       <RadioButton Caption="Bottom" Checked="change_alignment"/>
+               </VerticalStack>
+       </Border>
+       <GraphicObject Height="200"/>
+       <Popper Caption="TestPopper" Width="100" Background="DimGray" PopDirection="{alignment}">
+               <Border Fit="True" Background="ArmyGreen">
+                       <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>
+                       <VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
+                               <CheckBox Name="chk1" Background="Red"/>
+                               <CheckBox Name="chk2" IsChecked="true"/>
+                               <CheckBox Name="chk3"/>
+                               <CheckBox Name="chk4"/>
+                               <HorizontalStack Fit="true" Margin="20">
+                                       <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+                                       <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
+                               </HorizontalStack>
+                       </VerticalStack>
+               </Border>
+       </Popper>
+</VerticalStack>
diff --git a/Tests/Interfaces/TemplatedContainer/testTabView.crow b/Tests/Interfaces/TemplatedContainer/testTabView.crow
new file mode 100644 (file)
index 0000000..ca558d1
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<HorizontalStack Fit="true">
+       <VerticalStack Fit="true">
+               <TabView Name="tabview1"
+                       Width="400" Height="200" Orientation="Horizontal" Spacing="20">
+                       <TabItem Name="TabItem1" Caption="tab item 1" Margin="0">
+                               <VerticalStack Fit="true">
+                                       <CheckBox/>
+                                       <CheckBox/>
+                                       <CheckBox/>
+                                       <CheckBox/>
+                               </VerticalStack>
+                       </TabItem>
+                       <TabItem Name="TabItem2" Caption="tab item 2" Width="Stretched" Height="Stretched" Margin="0" Background="Gray">
+                               <VerticalStack Fit="true">
+                                       <RadioButton/>
+                                       <RadioButton/>
+                                       <RadioButton/>
+                                       <RadioButton/>
+                               </VerticalStack>
+                       </TabItem>
+                       <TabItem Name="TabItem2" Caption="tab item 3" Width="Stretched" Height="Stretched" Margin="0" Background="Gray">
+                               <Container Margin="5" CornerRadius="2" Width="Stretched" Height="Stretched">
+                                       <TextBox Margin="5" Width="Stretched" Height="Stretched" Multiline="true" TextAlignment="TopLeft"/>
+                               </Container>
+                       </TabItem>
+                       <TabItem Name="TabItem2" Caption="tab item 4" Width="Stretched" Height="Stretched" Margin="0" Background="Gray">
+                               <TextBox/>
+                       </TabItem>
+               </TabView>
+               <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
+                       Caption="Add new tab" Width="Fit" Height="30" MouseClick="onAddTabButClick"/>
+       </VerticalStack>
+</HorizontalStack>
diff --git a/Tests/Interfaces/TemplatedContainer/testTreeView.crow b/Tests/Interfaces/TemplatedContainer/testTreeView.crow
new file mode 100755 (executable)
index 0000000..3a44bf3
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<TreeView IsRoot="true" Name="treeView" Data="{CurDirectory}" Background="DimGray">
+       <ItemTemplate DataType="System.IO.FileInfo">
+               <HorizontalStack Focusable="true"  Height="Fit" Width="Stretched" Background="{../Background}" >
+                       <Image Margin="2" Width="14" Height="14"
+                               Path="#Crow.Images.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="GetFileSystemInfos">
+               <Expandable Caption="{Name}" >
+                       <Template>
+                               <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+                                       <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}"
+                                                       MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
+                                                       MouseLeave="{Background=Transparent}">
+                                               <Image Margin="2" Width="12" Height="12"
+                                                       Visible="{./HasContent}"
+                                                       Path="{./Image}"
+                                                       SvgSub="{./IsExpanded}"/>
+                                               <Image Margin="2" Width="14" Height="14"
+                                                       Path="#Crow.Images.Icons.folder.svg"/>
+                                               <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
+                                       </HorizontalStack>
+                                       <Container Name="Content" Visible="false"
+                                                       Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+                               </VerticalStack>
+                       </Template>
+                       <HorizontalStack Height="Fit" Width="{./WidthPolicy}">
+                               <GraphicObject Width="12" Height="10"/>
+                               <TreeView Name="List" Height="Fit" Width="{./WidthPolicy}">
+                                       <Template>
+                                               <VerticalStack Height="Fit" Width="{../WidthPolicy}" Name="List"/>
+                                       </Template>
+                               </TreeView>
+                       </HorizontalStack>
+               </Expandable>
+       </ItemTemplate>
+</TreeView>
diff --git a/Tests/Interfaces/TemplatedContainer/testWindow.goml b/Tests/Interfaces/TemplatedContainer/testWindow.goml
new file mode 100755 (executable)
index 0000000..c930d92
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<Window Left="10" Top="10" Title="Test window"
+               Width="250" Height="550" >
+       <VerticalStack Name="contentVSStack" Margin="10" Spacing="10" Background="0.4,0.4,0.4,0.4">
+               <Slider Name="slider" Height="12" Width="Stretched" CornerRadius="3"/>
+               <GroupBox Caption="test"  Height="Fit" Width="Stretched" Margin="5">
+                       <VerticalStack  Height="Fit" Width="Stretched" >
+                               <RadioButton  Caption="Radio 1" Background="Red" Width="Stretched"/>
+                               <RadioButton  Caption="Radio 2" IsChecked="true" />
+                               <RadioButton  Caption="Radio 3" />
+                               <RadioButton  Caption="Radio 1" Background="SkyBlue" Width="Stretched"/>
+                       </VerticalStack>
+               </GroupBox>
+               <HorizontalStack Width="Stretched" Height="Fit" Margin="10" CornerRadius="5" Background="SkyBlue">
+                       <RadioButton Width="80" Height="Fit"  Caption="Radio 2" IsChecked="true" />
+                       <GraphicObject Width="Stretched"/>
+                       <RadioButton Width="80" Height="Fit" Caption="Radio 3" />
+               </HorizontalStack>
+               <HorizontalStack Width="Stretched" Height="Stretched" MinimumSize="10,40" Margin="0" CornerRadius="5"
+                               Background="vgradient|0:White|0.1:SteelBlue|0.9:SteelBlue|1:Transparent">
+                       <CheckBox Height="Fit" Width="80"/>
+                       <GraphicObject Width="Stretched"/>
+                       <CheckBox Height="Fit" Width="80" IsChecked="true"/>
+               </HorizontalStack>
+               <Border Fit="true" CornerRadius="5" BorderWidth="1" >
+                       <Container Name="MainGrp" Background="0.5,0.5,0.5,0.4" Width="120" Fit="true"
+                               Margin="10" Focusable="True" >
+                                       <VerticalStack Fit="true" Name="vsFps"  Spacing="10" >
+                                               <HorizontalStack Fit="true">
+                                                       <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+                                                       <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+                                                               Background="vgradient|0:AoEnglish|1:Black"/>
+                                               </HorizontalStack>
+                                               <HorizontalStack Fit="true">
+                                                       <Label Text="Clipping:" Width="50" TextAlignment="Right"/>
+                                                       <Label Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+                                                               Background="vgradient|0:AoEnglish|1:Black"/>
+                                               </HorizontalStack>
+                                               <HorizontalStack Fit="true">
+                                                       <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+                                                       <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+                                                               Background="vgradient|0:AoEnglish|1:Black"/>
+                                               </HorizontalStack>
+                                               <HorizontalStack Fit="true">
+                                                       <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+                                                       <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+                                                               Background="vgradient|0:AoEnglish|1:Black"/>
+                                               </HorizontalStack>
+                                               <HorizontalStack Fit="true">
+                                                       <Label Text="Min:" Width="50" TextAlignment="Right"/>
+                                                       <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+                                                               Background="vgradient|0:AoEnglish|1:Black"/>
+                                               </HorizontalStack>
+                                               <HorizontalStack Fit="true">
+                                                       <Label Text="Max:" Width="50" TextAlignment="Right"/>
+                                                       <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+                                                               Background="vgradient|0:AoEnglish|1:Black"/>
+                                               </HorizontalStack>
+                                       </VerticalStack>
+                       </Container>
+               </Border>
+               <HorizontalStack Fit="true" Background="BlueCrayola" Margin="3">
+                       <GraphicObject Margin="10" Background="LimeGreen" Width="5" Height="5"/>
+                       <TextBox Font="droid, 16" Multiline="true" Text="this is a test\nmultiline" Margin="2"/>
+                       <GraphicObject Margin="10" Background="LimeGreen" Width="5" Height="5"/>
+               </HorizontalStack>
+       </VerticalStack>
+</Window>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedContainer/testWindow2.goml b/Tests/Interfaces/TemplatedContainer/testWindow2.goml
new file mode 100755 (executable)
index 0000000..7f0caf3
--- /dev/null
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<Window Focusable="true" Title="Measures" Width="30%" Height="Fit" MinimumSize="100,100">
+       <VerticalStack Width="90%" Height="Fit" Spacing="1" Margin="10">
+               <HorizontalStack Height="Fit">
+                       <Label Text="Fps:" Style="FpsLabel"/>
+                       <Label Text="{fps}" Style="FpsDisp"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Min:" Style="FpsLabel"/>
+                       <Label Text="{fpsMin}" Style="FpsDisp"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Max:" Style="FpsLabel"/>
+                       <Label Text="{fpsMax}" Style="FpsDisp"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Update:" Style="FpsLabel"/>
+                       <Label Text="{update}" Style="FpsDisp"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Layouting:" Style="FpsLabel"/>
+                       <Label Text="{layouting}" Style="FpsDisp"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Clipping:" Style="FpsLabel"/>
+                       <Label Text="{clipping}" Style="FpsDisp"/>
+               </HorizontalStack>
+               <HorizontalStack Height="Fit">
+                       <Label Text="Drawing:" Style="FpsLabel"/>
+                       <Label Text="{drawing}" Style="FpsDisp"/>
+               </HorizontalStack>
+       </VerticalStack>
+</Window>
diff --git a/Tests/Interfaces/TemplatedContainer/testWindow3.goml b/Tests/Interfaces/TemplatedContainer/testWindow3.goml
new file mode 100755 (executable)
index 0000000..d66de1d
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<Window Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0.5,0.5,0.5,0.8"
+       Focusable="True"  CornerRadius="20" MinimumSize="100,100" MaximumSize="500,500">
+       <Template>
+               <Container Margin="20" Name="Content" Height="{../HeightPolicy}" Width="{../WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
+       </Template>
+<!--   <Group Background="Green">-->
+               <GraphicObject Height="50" Width="50" Background="Red" Margin="5"/>
+<!--           <Scrollbar Orientation="Vertical" Height="Stretched" Width="10" Background="Blue" Margin="0" HorizontalAlignment="Right"/>-->
+<!--   </Group>-->
+</Window>
diff --git a/Tests/Interfaces/TemplatedContainer/test_Listbox.crow b/Tests/Interfaces/TemplatedContainer/test_Listbox.crow
new file mode 100755 (executable)
index 0000000..8b12cb8
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--<ListBox Data="{TestList}" Focusable="true"/>-->
+<Border Margin="50">
+       <VerticalStack >
+               <Label Text="{../ColorList.SelectedItem}" Background="DarkGreen"/>
+               <Label Text="{Hover}" Background="DarkGreen"/>
+               <Button Caption="Clear" Width="Stretched" MouseClick="OnClear"/>
+               <ListBox Name="ColorList" Data="{TestList}" Background="0.5,0.5,0.5,0.5"
+                                        HorizontalAlignment="Center" Width="Fit" Height="200" Margin="0"
+                                        ItemTemplate="#Tests.Interfaces.colorItem.crow"
+                                        Template="#Crow.Templates.ScrollingListBox.goml">
+<!--                   <Template>
+                               <Border BorderWidth="1" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
+                                       <HorizontalStack Margin="1" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}" >
+                                               <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"
+                                                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
+                                                               ValueChanged="../../../_scroller_ValueChanged">
+                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="100,100"
+                                                               Name="List" Margin="0" VerticalAlignment="Top"
+                                                               LayoutChanged="../../../../_list_LayoutChanged"/>
+                                               </Scroller>
+                                               <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}"
+                                                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
+                                                       Width="12" Height="{../../../HeightPolicy}" />
+                                       </HorizontalStack>
+                               </Border>
+                       </Template>-->
+               </ListBox>
+               <Button Caption="Load list" Width="Stretched" MouseClick="../../../OnLoadList"/>
+       </VerticalStack>
+</Border>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedControl/testButton.crow b/Tests/Interfaces/TemplatedControl/testButton.crow
new file mode 100755 (executable)
index 0000000..69367ea
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<VerticalStack Fit="true" Background="vgradient|0:DimGray|1:Black">
+       <HorizontalStack Fit="True">
+               <Button Caption="but" MouseClick="onButClick"/>
+               <Button Caption="but" MouseClick="onButClick" Fit="true"/>
+               <Button Width="60" Height="40" MouseClick="onButClick"/>
+               <Button Caption="Long text button" MouseClick="onButClick"/>
+               <Button Font="droid, 20" Caption="Button"/>
+       </HorizontalStack>
+</VerticalStack>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedControl/testCheckbox.crow b/Tests/Interfaces/TemplatedControl/testCheckbox.crow
new file mode 100755 (executable)
index 0000000..5147a15
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<VerticalStack Fit="true" Margin="100" Background="DimGray" >
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+</VerticalStack>
diff --git a/Tests/Interfaces/TemplatedControl/testCombobox.crow b/Tests/Interfaces/TemplatedControl/testCombobox.crow
new file mode 100755 (executable)
index 0000000..2ef6d39
--- /dev/null
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<Container Background="Onyx" Width="300">
+       <ComboBox  Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem.crow"/>
+</Container>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow b/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow
new file mode 100755 (executable)
index 0000000..5f86071
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+<Border BorderWidth="2" Fit="true">
+       <VerticalStack Fit="true" Margin="5">
+               <ListBox Data="{TestList}" Background="0.5,0.5,0.5,0.7"
+                                        HorizontalAlignment="Center" Width="200" Height="200" Margin="5">
+                       <Template>
+                               <Border BorderWidth="1" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
+                                       <HorizontalStack Margin="1" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}" >
+                                               <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"
+                                                               Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
+                                                               ValueChanged="../../../_scroller_ValueChanged">
+                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="10,10"
+                                                               Name="List" Margin="0"
+                                                               VerticalAlignment="Top"
+                                                               HorizontalAlignment="Left"
+                                                               LayoutChanged="../../../../_list_LayoutChanged"/>
+                                               </Scroller>
+                                               <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}"
+                                                       Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
+                                                       Width="14" Height="{../../../HeightPolicy}" />
+                                       </HorizontalStack>
+                               </Border>
+                       </Template>
+                       <ItemTemplate DataType="Crow.Color">
+                               <HorizontalStack
+                                                       HorizontalAlignment="Left"
+                                                       Height="Fit" Width="200" Margin="1" Focusable="true"
+                                                       MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}"
+                                                       MouseLeave="{Background=Transparent}">
+                                       <GraphicObject Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/>
+                                       <Label Text="{Name}" Margin="0" Width="Stretched"/>
+                               </HorizontalStack>
+                       </ItemTemplate>
+               </ListBox>
+               <HorizontalStack Fit="true" HorizontalAlignment="Right">
+                       <Button Caption="Load list" MouseClick="OnLoadList"/>
+                       <Button Caption="Clear" MouseClick="OnClear"/>
+               </HorizontalStack>
+       </VerticalStack>
+</Border>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedControl/testRadioButton.crow b/Tests/Interfaces/TemplatedControl/testRadioButton.crow
new file mode 100755 (executable)
index 0000000..905cdeb
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGray">
+       <RadioButton Caption="Radio1"/>
+       <RadioButton Caption="Radio2" IsChecked="true"/>
+       <RadioButton Caption="Radio3"/>
+       <RadioButton Caption="Radio4"/>
+</VerticalStack>
diff --git a/Tests/Interfaces/TemplatedControl/testScrollbar.goml b/Tests/Interfaces/TemplatedControl/testScrollbar.goml
new file mode 100755 (executable)
index 0000000..c494e34
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<Group Name="TopContainer" Width="400" Height="400"
+       Focusable="True" Background="Gray">
+       <ScrollBar Height="Stretched" Orientation="Vertical" Width="16" Maximum="100"/>
+</Group>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedControl/testSpinner.goml b/Tests/Interfaces/TemplatedControl/testSpinner.goml
new file mode 100755 (executable)
index 0000000..4efd587
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<VerticalStack Name="TopContainer" Width="400" Height="Fit"
+       Margin="20" Background="DarkGray">
+
+       <HorizontalStack Fit="true" Margin="5" Background="SkyBlue">
+               <Spinner Value="{IntValue}" ValueChanged="onSpinnerValueChange"/>
+               <Spinner Value="5"/>
+               <Spinner Value="5"/>
+               <Button/>
+       </HorizontalStack>
+</VerticalStack>
\ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedGroup/0.crow b/Tests/Interfaces/TemplatedGroup/0.crow
new file mode 100755 (executable)
index 0000000..9c7bb70
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0"?>
index 105298587d79e48d2ca18b16091d479b98a1787c..566abf23a201b201c1617ca0e0f3ebbda510929b 100644 (file)
     <None Include="Interfaces\Divers\fps.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\test_Listbox.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <None Include="Interfaces\Divers\test_stack.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <None Include="Interfaces\Divers\test1.2.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testButton.crow">
+    <None Include="Interfaces\Divers\testStacks.crow">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Interfaces\Divers\testTextBox.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testCheckbox.crow">
+    <None Include="Interfaces\Splitter\1.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testCombobox.crow">
+    <None Include="OpenTK.dll.config" />
+    <None Include="image\textest.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testGroupBox.crow">
+    <None Include="Interfaces\Divers\welcome.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testPopper.crow">
+    <None Include="packages.config" />
+    <None Include="Interfaces\Unsorted\testFileDialog.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testRadioButton.crow">
+    <None Include="Interfaces\Unsorted\testTypeViewer.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testScrollbar.goml">
+    <None Include="Interfaces\Divers\testPropLess.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testSpinner.goml">
+    <None Include="Interfaces\Wrapper\1.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testStacks.crow">
+    <None Include="Interfaces\Wrapper\2.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testTextBox.crow">
+    <None Include="Interfaces\Divers\testImage.crow">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <None Include="Interfaces\Divers\testOutOfClipUpdate.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testWindow.goml">
+    <None Include="Interfaces\Divers\0.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testWindow2.goml">
+    <None Include="Interfaces\Divers\testDisable.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testWindow3.goml">
+    <None Include="Interfaces\Divers\3.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Expandable\0.crow">
+    <None Include="Interfaces\TemplatedContainer\0.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Expandable\7.crow">
+    <None Include="Interfaces\TemplatedContainer\6.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Splitter\1.crow">
+    <None Include="Interfaces\TemplatedContainer\7.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="OpenTK.dll.config" />
-    <None Include="image\textest.png">
+    <None Include="Interfaces\TemplatedControl\testButton.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\welcome.crow">
+    <None Include="Interfaces\TemplatedControl\testCheckbox.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="packages.config" />
-    <None Include="Interfaces\Unsorted\testFileDialog.goml">
+    <None Include="Interfaces\TemplatedControl\testCombobox.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Unsorted\testTypeViewer.goml">
+    <None Include="Interfaces\TemplatedControl\testItemTemplateTag.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testDirViewer2.crow">
+    <None Include="Interfaces\TemplatedControl\testRadioButton.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testPropLess.crow">
+    <None Include="Interfaces\TemplatedControl\testScrollbar.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Wrapper\1.crow">
+    <None Include="Interfaces\TemplatedControl\testSpinner.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Wrapper\2.crow">
+    <None Include="Interfaces\TemplatedContainer\test_Listbox.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testImage.crow">
+    <None Include="Interfaces\TemplatedContainer\testDirViewer2.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testOutOfClipUpdate.crow">
+    <None Include="Interfaces\TemplatedContainer\testGroupBox.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testMsgBox.crow">
+    <None Include="Interfaces\TemplatedContainer\testMsgBox.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testTabView.crow">
+    <None Include="Interfaces\TemplatedContainer\testPopper.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testItemTemplateTag.crow">
+    <None Include="Interfaces\TemplatedContainer\testTabView.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testTreeView.crow">
+    <None Include="Interfaces\TemplatedContainer\testTreeView.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\0.crow">
+    <None Include="Interfaces\TemplatedContainer\testWindow.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Expandable\6.crow">
+    <None Include="Interfaces\TemplatedContainer\testWindow2.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\testDisable.crow">
+    <None Include="Interfaces\TemplatedContainer\testWindow3.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
-    <None Include="Interfaces\Divers\3.crow">
+    <None Include="Interfaces\TemplatedGroup\0.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
   </ItemGroup>
     <Folder Include="Interfaces\GraphicObject\" />
     <Folder Include="Interfaces\Group\" />
     <Folder Include="Interfaces\Divers\" />
-    <Folder Include="Interfaces\Expandable\" />
     <Folder Include="Interfaces\Splitter\" />
     <Folder Include="Interfaces\Unsorted\" />
     <Folder Include="Interfaces\Wrapper\" />
+    <Folder Include="Interfaces\TemplatedControl\" />
+    <Folder Include="Interfaces\TemplatedContainer\" />
+    <Folder Include="Interfaces\TemplatedGroup\" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="image\tetra.png">
index 059cab8b9418a9bdc5950addf0566f4ce12c6779..70451f415b447512a0b0bb375a4e63dae658376f 100644 (file)
@@ -63,6 +63,7 @@ namespace Crow
                                NotifyValueChanged ("HasContent", HasContent);
                        }
                }
+               //TODO: move loadTemplate and ResolveBinding in TemplatedContainer
                protected override void loadTemplate(GraphicObject template = null)
                {
                        base.loadTemplate (template);
index 950992e27c313559629c85ed5bc6117a2cfdf2cb..402128b08792b4640019b0f28892117a57cf473e 100644 (file)
@@ -27,8 +27,6 @@ namespace Crow
         bool _multiSelect = false;
                List<GraphicObject> children = new List<GraphicObject>();
 
-        public GraphicObject activeWidget;
-
         public virtual List<GraphicObject> Children {
                        get { return children; }
                }
diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs
new file mode 100644 (file)
index 0000000..12448b8
--- /dev/null
@@ -0,0 +1,144 @@
+//
+//  TemplatedContainer.cs
+//
+//  Author:
+//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+//  Copyright (c) 2015 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.Xml;
+using System.Reflection;
+using System.Collections.Generic;
+
+namespace Crow
+{
+       public abstract class TemplatedGroup : TemplatedControl
+       {
+               #region CTOR
+               public TemplatedGroup () : base(){}
+               #endregion
+
+               protected Group items;
+
+               public virtual List<GraphicObject> Items{ get { return items.Children; }}
+
+               public virtual void AddItem(GraphicObject g){
+                       items.AddChild (g);
+                       g.LogicalParent = this;
+               }
+               public virtual void RemoveItem(GraphicObject g)
+               {
+                       items.RemoveChild (g);
+               }
+
+               public virtual void ClearItems()
+               {
+                       items.ClearChildren ();
+               }
+
+               protected override void loadTemplate(GraphicObject template = null)
+               {
+                       base.loadTemplate (template);
+
+                       items = this.child.FindByName ("ItemsContainer") as Group;
+                       if (items == null)
+                               throw new Exception ("TemplatedGroup template Must contain a Group named 'ItemsContainer'");
+               }
+
+               #region GraphicObject overrides
+               public override GraphicObject FindByName (string nameToFind)
+               {
+                       if (Name == nameToFind)
+                               return this;
+
+                       foreach (GraphicObject w in Items) {
+                               GraphicObject r = w.FindByName (nameToFind);
+                               if (r != null)
+                                       return r;
+                       }
+                       return null;
+               }
+               public override bool Contains (GraphicObject goToFind)
+               {
+                       foreach (GraphicObject w in Items) {
+                               if (w == goToFind)
+                                       return true;
+                               if (w.Contains (goToFind))
+                                       return true;
+                       }
+                       return false;
+               }
+               #endregion
+
+               #region IXmlSerialisation Overrides
+               public override void ReadXml(System.Xml.XmlReader reader)
+               {
+                       using (System.Xml.XmlReader subTree = reader.ReadSubtree ()) {
+                               subTree.Read ();
+                               string tmp = subTree.ReadOuterXml ();
+
+                               //seek for template tag
+                               using (XmlReader xr = new XmlTextReader (tmp, XmlNodeType.Element, null)) {
+                                       xr.Read ();
+                                       base.ReadXml (xr);
+                               }
+                               //process content
+                               using (XmlReader xr = new XmlTextReader (tmp, XmlNodeType.Element, null)) {
+                                       xr.Read (); //skip current node
+
+                                       while (!xr.EOF) {
+                                               xr.Read (); //read first child
+
+                                               if (!xr.IsStartElement ())
+                                                       continue;
+
+                                               if (xr.Name == "Template" || Name == "ItemTemplate"){
+                                                       xr.Skip ();
+                                                       if (!xr.IsStartElement ())
+                                                               continue;
+                                               }
+
+                                               Type t = Type.GetType ("Crow." + xr.Name);
+                                               if (t == null) {
+                                                       Assembly a = Assembly.GetEntryAssembly ();
+                                                       foreach (Type expT in a.GetExportedTypes ()) {
+                                                               if (expT.Name == xr.Name)
+                                                                       t = expT;
+                                                       }
+                                               }
+                                               if (t == null)
+                                                       throw new Exception (xr.Name + " type not found");
+
+                                               GraphicObject go = (GraphicObject)Activator.CreateInstance (t);
+
+                                               (go as IXmlSerializable).ReadXml (xr);
+
+                                               AddItem (go);
+
+                                               xr.Read (); //closing tag
+                                       }
+
+                               }
+                       }
+               }
+               public override void WriteXml(System.Xml.XmlWriter writer)
+               {
+                       throw new NotImplementedException ();
+               }
+               #endregion
+       }
+}
index e4f98ecbd505e380e1a172d24f3df79d3c8a3efe..922a48d7d7b1bc485ca071d4b1f607855515ab57 100644 (file)
@@ -107,6 +107,7 @@ namespace Crow
 
                        il.Emit (OpCodes.Ldloc_0);//save current go onto the stack if child has to be added
 
+                       #region Template and TemplateItems loading
                        if (typeof(TemplatedControl).IsAssignableFrom (crowType)) {
                                //if its a template, first read template elements
                                using (IMLReader reader = new IMLReader (il, tmpXml)) {
@@ -188,10 +189,12 @@ namespace Crow
                                        }
                                }
                        }
+                       #endregion
 
                        using (IMLReader reader = new IMLReader(il,tmpXml)){
                                reader.Read ();
 
+                               #region Styling and default values loading
                                if (reader.HasAttributes) {
                                        string style = reader.GetAttribute ("Style");
                                        if (!string.IsNullOrEmpty (style)) {
@@ -201,7 +204,9 @@ namespace Crow
                                }
                                reader.il.Emit (OpCodes.Ldloc_0);
                                reader.il.Emit (OpCodes.Callvirt, typeof(GraphicObject).GetMethod ("loadDefaultValues"));
+                               #endregion
 
+                               #region Attributes reading
                                if (reader.HasAttributes) {
 
                                        MethodInfo miAddBinding = typeof(GraphicObject).GetMethod ("BindMember");
@@ -229,6 +234,7 @@ namespace Crow
                                        }
                                        reader.MoveToElement ();
                                }
+                               #endregion
 
                                if (reader.IsEmptyElement) {
                                        reader.il.Emit (OpCodes.Pop);//pop saved ref to current object
@@ -253,7 +259,7 @@ namespace Crow
                                case XmlNodeType.Element:
                                        //Templates
                                        if (reader.Name == "Template" ||
-                                               reader.Name == "ItemTemplate") {
+                                           reader.Name == "ItemTemplate") {
                                                reader.Skip ();
                                                continue;
                                        }
@@ -263,16 +269,18 @@ namespace Crow
                                                        miAddChild = typeof(Group).GetMethod ("AddChild");
                                                else if (typeof(Container).IsAssignableFrom (crowType))
                                                        miAddChild = typeof(Container).GetMethod ("SetChild");
-                                               else if (typeof(TemplatedContainer).IsAssignableFrom (crowType)&&!templateLoading)
-                                                       miAddChild = typeof(TemplatedContainer).GetProperty("Content").GetSetMethod();
+                                               else if (typeof(TemplatedContainer).IsAssignableFrom (crowType) && !templateLoading)
+                                                       miAddChild = typeof(TemplatedContainer).GetProperty ("Content").GetSetMethod ();
+                                               else if (typeof(TemplatedGroup).IsAssignableFrom (crowType) && !templateLoading)
+                                                       miAddChild = typeof(TemplatedGroup).GetMethod ("AddItem",
+                                                               BindingFlags.Instance | BindingFlags.Public);
                                                else if (typeof(TemplatedControl).IsAssignableFrom (crowType))
                                                        miAddChild = typeof(TemplatedControl).GetMethod ("loadTemplate",
-                                                               BindingFlags.Instance | BindingFlags.NonPublic);                                                
+                                                               BindingFlags.Instance | BindingFlags.NonPublic);
                                                else if (typeof(PrivateContainer).IsAssignableFrom (crowType))
                                                        miAddChild = typeof(PrivateContainer).GetMethod ("SetChild",
                                                                BindingFlags.Instance | BindingFlags.NonPublic);
                                        }
-
                                        //push current instance on stack for parenting
                                        //loc_0 will be used for child
                                        reader.il.Emit (OpCodes.Ldloc_0);
@@ -288,13 +296,15 @@ namespace Crow
                                        if (t == null)
                                                throw new Exception (reader.Name + " type not found");
 
-                                       reader.il.Emit(OpCodes.Newobj, t.GetConstructors () [0]);//TODO:search parameterless ctor
+                                       reader.il.Emit (OpCodes.Newobj, t.GetConstructors () [0]);//TODO:search parameterless ctor
                                        reader.il.Emit (OpCodes.Stloc_0);//child is now loc_0
                                        CompilerServices.emitSetCurInterface (il);
 
-                                       reader.emitLoader(t);
+                                       reader.emitLoader (t);
 
                                        reader.il.Emit (OpCodes.Ldloc_0);//load child on stack for parenting
+                                       if (miAddChild == null)
+                                               System.Diagnostics.Debugger.Break ();
                                        reader.il.Emit (OpCodes.Callvirt, miAddChild);
                                        reader.il.Emit (OpCodes.Stloc_0); //reset local to current go
                                        reader.il.Emit (OpCodes.Ldloc_0);//save current go onto the stack if child has to be added