]> O.S.I.I.S - jp/crow.git/commitdiff
default template searched in embedded resources with .template extension
authorjpbruyere <jp.bruyere@hotmail.com>
Fri, 12 Aug 2016 15:17:05 +0000 (17:17 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Fri, 12 Aug 2016 15:17:05 +0000 (17:17 +0200)
56 files changed:
Crow.csproj
Templates/Button.crow [deleted file]
Templates/Button.template [new file with mode: 0755]
Templates/CheckBox.goml [deleted file]
Templates/CheckBox.template [new file with mode: 0755]
Templates/ComboBox.goml [deleted file]
Templates/ComboBox.template [new file with mode: 0755]
Templates/DirectoryView.crow [deleted file]
Templates/DirectoryView.template [new file with mode: 0755]
Templates/Expandable.goml [deleted file]
Templates/Expandable.template [new file with mode: 0755]
Templates/FileDialog.goml [deleted file]
Templates/FileDialog.template [new file with mode: 0644]
Templates/GroupBox.goml [deleted file]
Templates/GroupBox.template [new file with mode: 0755]
Templates/ListBox.goml [deleted file]
Templates/ListBox.template [new file with mode: 0755]
Templates/MessageBox.goml [deleted file]
Templates/MessageBox.template [new file with mode: 0644]
Templates/Popper.goml [deleted file]
Templates/Popper.template [new file with mode: 0755]
Templates/RadioButton.goml [deleted file]
Templates/RadioButton.template [new file with mode: 0755]
Templates/ScrollBar.goml [deleted file]
Templates/ScrollBar.template [new file with mode: 0755]
Templates/Slider.goml [deleted file]
Templates/Slider.template [new file with mode: 0755]
Templates/Spinner.goml [deleted file]
Templates/Spinner.template [new file with mode: 0755]
Templates/TabItem.crow [deleted file]
Templates/TabItem.template [new file with mode: 0644]
Templates/TreeView.crow [deleted file]
Templates/TreeView.template [new file with mode: 0644]
Templates/Window.goml [deleted file]
Templates/Window.template [new file with mode: 0755]
Tests/OpenTKGameWindow.cs
src/GraphicObjects/AnalogMeter.cs
src/GraphicObjects/Button.cs
src/GraphicObjects/CheckBox.cs
src/GraphicObjects/ComboBox.cs
src/GraphicObjects/DirectoryView.cs
src/GraphicObjects/DummyTemplate.cs
src/GraphicObjects/Expandable.cs
src/GraphicObjects/GroupBox.cs
src/GraphicObjects/ListBox.cs
src/GraphicObjects/MessageBox.cs
src/GraphicObjects/Popper.cs
src/GraphicObjects/RadioButton.cs
src/GraphicObjects/ScrollBar.cs
src/GraphicObjects/Spinner.cs
src/GraphicObjects/TabItem.cs
src/GraphicObjects/TemplatedControl.cs
src/GraphicObjects/TreeView.cs
src/GraphicObjects/Window.cs
src/IMLReader.cs
src/Interface.cs

index 45f60ec946a3df981cd5697d00629fb2eaf216a8..0de00b5c65b998c7f1a058a122328df0c076ab18 100644 (file)
     <EmbeddedResource Include="Images\Icons\buttonB.svg" />
     <EmbeddedResource Include="Images\Icons\checkbox.svg" />
     <EmbeddedResource Include="Images\Icons\radiobutton.svg" />
-    <EmbeddedResource Include="Templates\RadioButton.goml" />
-    <EmbeddedResource Include="Templates\Slider.goml" />
-    <EmbeddedResource Include="Templates\Spinner.goml" />
     <EmbeddedResource Include="Templates\Spinner %28copier%29.goml" />
     <EmbeddedResource Include="Templates\ItemTemplate.goml" />
-    <EmbeddedResource Include="Templates\Expandable.goml" />
     <EmbeddedResource Include="Images\Icons\expandable.svg" />
     <EmbeddedResource Include="Templates\Checkbox2.goml" />
-    <EmbeddedResource Include="Templates\Popper.goml" />
-    <EmbeddedResource Include="Templates\Window.goml" />
     <EmbeddedResource Include="Images\Icons\tetra.png" />
     <EmbeddedResource Include="Images\Icons\exit.svg" />
     <EmbeddedResource Include="Templates\AnalogMeter0.goml" />
     <EmbeddedResource Include="Images\Icons\member.svg" />
     <EmbeddedResource Include="Images\Icons\exit2.svg" />
     <EmbeddedResource Include="Images\button.svg" />
-    <EmbeddedResource Include="Templates\MessageBox.goml" />
     <EmbeddedResource Include="Images\Icons\iconInfo.svg" />
-    <EmbeddedResource Include="Templates\FileDialog.goml" />
     <EmbeddedResource Include="Templates\tmpDirItem.goml" />
     <EmbeddedResource Include="Templates\ScrollingListBox.goml" />
     <EmbeddedResource Include="Templates\imgItemTemplate.goml" />
     <EmbeddedResource Include="Images\Icons\Cursors\hand" />
     <EmbeddedResource Include="Images\Icons\Cursors\help" />
     <EmbeddedResource Include="Images\Icons\Cursors\move" />
-    <EmbeddedResource Include="Templates\CheckBox.goml" />
-    <EmbeddedResource Include="Templates\ComboBox.goml" />
-    <EmbeddedResource Include="Templates\GroupBox.goml" />
-    <EmbeddedResource Include="Templates\ListBox.goml" />
-    <EmbeddedResource Include="Templates\ScrollBar.goml" />
-    <EmbeddedResource Include="Templates\Button.crow" />
     <EmbeddedResource Include="Templates\ArrowButTemplate.crow" />
     <EmbeddedResource Include="Images\crow0.svg" />
-    <EmbeddedResource Include="Templates\TreeView.crow" />
-    <EmbeddedResource Include="Templates\TabItem.crow" />
     <EmbeddedResource Include="Templates\Dummy.goml" />
     <EmbeddedResource Include="Images\Icons\crow.png" />
     <EmbeddedResource Include="Images\Icons\crow.svg" />
     <EmbeddedResource Include="Default.style" />
     <EmbeddedResource Include="Images\Icons\folder.svg" />
     <EmbeddedResource Include="Images\Icons\file.svg" />
-    <EmbeddedResource Include="Templates\DirectoryView.crow" />
+    <EmbeddedResource Include="Templates\Button.template">
+      <LogicalName>Crow.Button.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\CheckBox.template">
+      <LogicalName>Crow.CheckBox.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\ComboBox.template">
+      <LogicalName>Crow.ComboBox.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\Expandable.template">
+      <LogicalName>Crow.Expandable.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\DirectoryView.template">
+      <LogicalName>Crow.DirectoryView.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\FileDialog.template">
+      <LogicalName>Crow.FileDialog.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\GroupBox.template">
+      <LogicalName>Crow.GroupBox.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\ListBox.template">
+      <LogicalName>Crow.ListBox.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\MessageBox.template">
+      <LogicalName>Crow.MessageBox.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\Popper.template">
+      <LogicalName>Crow.Popper.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\RadioButton.template">
+      <LogicalName>Crow.RadioButton.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\ScrollBar.template">
+      <LogicalName>Crow.ScrollBar.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\Slider.template">
+      <LogicalName>Crow.Slider.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\Spinner.template">
+      <LogicalName>Crow.Spinner.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\TabItem.template">
+      <LogicalName>Crow.TabItem.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\TreeView.template">
+      <LogicalName>Crow.TreeView.template</LogicalName>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Templates\Window.template">
+      <LogicalName>Crow.Window.template</LogicalName>
+    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
     <None Include="README.md" />
diff --git a/Templates/Button.crow b/Templates/Button.crow
deleted file mode 100755 (executable)
index 959ad8c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0"?>
-<Border Background="{./Background}" MinimumSize="50,20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
-               Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
-       MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black;caption.Foreground=White}"
-       MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
-       MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
-       MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"                  
-       >
-<!--   <Image Height="0" Width="0" Margin="0" Path="{./Image}" SvgSub="{./SvgSub}"/>-->
-       <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGray" Text="{./Caption}"/>
-</Border>
\ No newline at end of file
diff --git a/Templates/Button.template b/Templates/Button.template
new file mode 100755 (executable)
index 0000000..959ad8c
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<Border Background="{./Background}" MinimumSize="50,20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+               Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1"
+       MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black;caption.Foreground=White}"
+       MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
+       MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
+       MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"                  
+       >
+<!--   <Image Height="0" Width="0" Margin="0" Path="{./Image}" SvgSub="{./SvgSub}"/>-->
+       <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGray" Text="{./Caption}"/>
+</Border>
\ No newline at end of file
diff --git a/Templates/CheckBox.goml b/Templates/CheckBox.goml
deleted file mode 100755 (executable)
index a3c0f23..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-       <Image Style="Icon" Path="#Crow.Images.Icons.checkbox.svg"
-               SvgSub="{./IsChecked}"/>
-       <Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
-</HorizontalStack>
\ No newline at end of file
diff --git a/Templates/CheckBox.template b/Templates/CheckBox.template
new file mode 100755 (executable)
index 0000000..a3c0f23
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+       <Image Style="Icon" Path="#Crow.Images.Icons.checkbox.svg"
+               SvgSub="{./IsChecked}"/>
+       <Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+</HorizontalStack>
\ No newline at end of file
diff --git a/Templates/ComboBox.goml b/Templates/ComboBox.goml
deleted file mode 100755 (executable)
index 9688721..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<Popper Name="popper" PopDirection="Bottom" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
-       <Template>
-               <Border CornerRadius="0" Foreground="LightGray" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
-                       <HorizontalStack Margin="0
-                                               " Spacing="1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}">
-                               <TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
-                                       Text="{../../../../SelectedItem}"
-                                       Height="{../../../../HeightPolicy}" Width="{../../../../WidthPolicy}"/>
-                               <Button Width="14" Height="14" Focusable="false"
-                                       Template="#Crow.Templates.ArrowButTemplate.crow">
-                                       <Image Margin="0"  Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
-                               </Button>
-                       </HorizontalStack>
-               </Border>
-       </Template>
-       <Border Background="DimGray" BorderWidth="1" Margin="1"
-               MinimumSize="{../../MinimumPopupSize}" Fit="true">
-               <Scroller Name="scroller1" Margin="2" VerticalScrolling="true"
-                       MaximumSize="0,200"
-                       Height="{../HeightPolicy}" Width="{../WidthPolicy}"
-                       HorizontalAlignment="Left"
-                       ValueChanged="../../../_scroller_ValueChanged">
-                       <VerticalStack LayoutChanged="../../../../_list_LayoutChanged"
-                               Height="Fit" Width="{../../WidthPolicy}" Name="List" Margin="0"
-                               HorizontalAlignment="Left"
-                               VerticalAlignment="Top"/>
-               </Scroller>
-       </Border>
-</Popper>
diff --git a/Templates/ComboBox.template b/Templates/ComboBox.template
new file mode 100755 (executable)
index 0000000..9688721
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<Popper Name="popper" PopDirection="Bottom" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
+       <Template>
+               <Border CornerRadius="0" Foreground="LightGray" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
+                       <HorizontalStack Margin="0
+                                               " Spacing="1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}">
+                               <TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
+                                       Text="{../../../../SelectedItem}"
+                                       Height="{../../../../HeightPolicy}" Width="{../../../../WidthPolicy}"/>
+                               <Button Width="14" Height="14" Focusable="false"
+                                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                                       <Image Margin="0"  Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
+                               </Button>
+                       </HorizontalStack>
+               </Border>
+       </Template>
+       <Border Background="DimGray" BorderWidth="1" Margin="1"
+               MinimumSize="{../../MinimumPopupSize}" Fit="true">
+               <Scroller Name="scroller1" Margin="2" VerticalScrolling="true"
+                       MaximumSize="0,200"
+                       Height="{../HeightPolicy}" Width="{../WidthPolicy}"
+                       HorizontalAlignment="Left"
+                       ValueChanged="../../../_scroller_ValueChanged">
+                       <VerticalStack LayoutChanged="../../../../_list_LayoutChanged"
+                               Height="Fit" Width="{../../WidthPolicy}" Name="List" Margin="0"
+                               HorizontalAlignment="Left"
+                               VerticalAlignment="Top"/>
+               </Scroller>
+       </Border>
+</Popper>
diff --git a/Templates/DirectoryView.crow b/Templates/DirectoryView.crow
deleted file mode 100755 (executable)
index e861ef8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0"?>
-<TreeView IsRoot="true" Name="treeView" Data="{./CurrentDirectory}"
-               SelectedItemChanged="./onSelectedItemChanged">
-       <ItemTemplate DataType="System.IO.FileInfo">
-               <HorizontalStack Focusable="true"  Height="Fit" Width="Stretched" Background="{../Background}" >
-                       <Image Margin="2" Width="14" Height="14"
-                               Path="#Crow.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="#Tests.Interfaces.treeList.crow" />
-                       </HorizontalStack>
-               </Expandable>
-       </ItemTemplate>
-</TreeView>
\ No newline at end of file
diff --git a/Templates/DirectoryView.template b/Templates/DirectoryView.template
new file mode 100755 (executable)
index 0000000..e861ef8
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<TreeView IsRoot="true" Name="treeView" Data="{./CurrentDirectory}"
+               SelectedItemChanged="./onSelectedItemChanged">
+       <ItemTemplate DataType="System.IO.FileInfo">
+               <HorizontalStack Focusable="true"  Height="Fit" Width="Stretched" Background="{../Background}" >
+                       <Image Margin="2" Width="14" Height="14"
+                               Path="#Crow.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="#Tests.Interfaces.treeList.crow" />
+                       </HorizontalStack>
+               </Expandable>
+       </ItemTemplate>
+</TreeView>
\ No newline at end of file
diff --git a/Templates/Expandable.goml b/Templates/Expandable.goml
deleted file mode 100755 (executable)
index 3d75afa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}"
-               Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-       <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-               <HorizontalStack Spacing="1" Height="-1" Width="{./WidthPolicy}">
-                       <Image Style="Icon" Margin="2"
-                               Visible="{./HasContent}"
-                               Path="{./Image}" 
-                               SvgSub="{./IsExpanded}"/>
-                       <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
-               </HorizontalStack>
-               <Container Name="Content" Visible="false"
-                       Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
-       </VerticalStack>
-</Border>
\ No newline at end of file
diff --git a/Templates/Expandable.template b/Templates/Expandable.template
new file mode 100755 (executable)
index 0000000..3d75afa
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}"
+               Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+       <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+               <HorizontalStack Spacing="1" Height="-1" Width="{./WidthPolicy}">
+                       <Image Style="Icon" Margin="2"
+                               Visible="{./HasContent}"
+                               Path="{./Image}" 
+                               SvgSub="{./IsExpanded}"/>
+                       <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
+               </HorizontalStack>
+               <Container Name="Content" Visible="false"
+                       Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+       </VerticalStack>
+</Border>
\ No newline at end of file
diff --git a/Templates/FileDialog.goml b/Templates/FileDialog.goml
deleted file mode 100644 (file)
index c8a10c8..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<Window Caption="OpenFile" Height="300" Width="500">
-       <VerticalStack Margin="5">
-               <TextBox Margin="1" Width="0" Height="-1" Text="{CurrentPath}"/>
-               <HorizontalStack >
-                       <ListBox Data="{Directories}" Width="-1" Height="0"
-                               Background="0.5,0.5,0.5,0.5"
-                               SelectedItemChanged="OnSelectedItemChanged"
-                               Template="#Crow.Templates.ScrollingListBox.goml" 
-                               ItemTemplate="#Crow.Templates.tmpDirItem.goml" >
-                       </ListBox>
-                       <ListBox Data="{Files}" Width="0" Height="0"
-                               Background="0.5,0.5,0.5,0.5"
-                               SelectedItemChanged="onFileListItemChanged"
-                               Template="#Crow.Templates.ScrollingListBox.goml" 
-                               ItemTemplate="#Crow.Templates.imgItemTemplate.goml">
-                       </ListBox>
-               </HorizontalStack>
-               <HorizontalStack Fit="true" HorizontalAlignment="Right">
-                       <Button Caption="Ok" MouseClick="onFileSelect"/>
-                       <Button Caption="Cancel"/>
-               </HorizontalStack>
-       </VerticalStack>
-</Window>
diff --git a/Templates/FileDialog.template b/Templates/FileDialog.template
new file mode 100644 (file)
index 0000000..c8a10c8
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Window Caption="OpenFile" Height="300" Width="500">
+       <VerticalStack Margin="5">
+               <TextBox Margin="1" Width="0" Height="-1" Text="{CurrentPath}"/>
+               <HorizontalStack >
+                       <ListBox Data="{Directories}" Width="-1" Height="0"
+                               Background="0.5,0.5,0.5,0.5"
+                               SelectedItemChanged="OnSelectedItemChanged"
+                               Template="#Crow.Templates.ScrollingListBox.goml" 
+                               ItemTemplate="#Crow.Templates.tmpDirItem.goml" >
+                       </ListBox>
+                       <ListBox Data="{Files}" Width="0" Height="0"
+                               Background="0.5,0.5,0.5,0.5"
+                               SelectedItemChanged="onFileListItemChanged"
+                               Template="#Crow.Templates.ScrollingListBox.goml" 
+                               ItemTemplate="#Crow.Templates.imgItemTemplate.goml">
+                       </ListBox>
+               </HorizontalStack>
+               <HorizontalStack Fit="true" HorizontalAlignment="Right">
+                       <Button Caption="Ok" MouseClick="onFileSelect"/>
+                       <Button Caption="Cancel"/>
+               </HorizontalStack>
+       </VerticalStack>
+</Window>
diff --git a/Templates/GroupBox.goml b/Templates/GroupBox.goml
deleted file mode 100755 (executable)
index a373a29..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<Container Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-       <Group Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-               <Border CornerRadius="5" BorderWidth="1" Margin="6" Foreground="{./Foreground}"
-                       Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-                       <Container Name="Content" Margin="10" MinimumSize="70,10"
-                                       Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"/>
-               </Border>
-               <Label Text="{./Caption}" VerticalAlignment="Top" Left="15"
-                       Background="Clear" Margin="1"/>
-       </Group>
-</Container>
\ No newline at end of file
diff --git a/Templates/GroupBox.template b/Templates/GroupBox.template
new file mode 100755 (executable)
index 0000000..a373a29
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<Container Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+       <Group Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+               <Border CornerRadius="5" BorderWidth="1" Margin="6" Foreground="{./Foreground}"
+                       Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+                       <Container Name="Content" Margin="10" MinimumSize="70,10"
+                                       Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"/>
+               </Border>
+               <Label Text="{./Caption}" VerticalAlignment="Top" Left="15"
+                       Background="Clear" Margin="1"/>
+       </Group>
+</Container>
\ No newline at end of file
diff --git a/Templates/ListBox.goml b/Templates/ListBox.goml
deleted file mode 100755 (executable)
index c56ec0d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Margin="1" MinimumSize="10,10" Height="{./HeightPolicy}" Width="{./WidthPolicy}" >
-       <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true"
-               Height="{./HeightPolicy}" Width="{./WidthPolicy}"
-               ValueChanged="./_scroller_ValueChanged">
-               <VerticalStack LayoutChanged="./_list_LayoutChanged"
-                       Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
-       </Scroller>
-</Border>
\ No newline at end of file
diff --git a/Templates/ListBox.template b/Templates/ListBox.template
new file mode 100755 (executable)
index 0000000..c56ec0d
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Margin="1" MinimumSize="10,10" Height="{./HeightPolicy}" Width="{./WidthPolicy}" >
+       <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true"
+               Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+               ValueChanged="./_scroller_ValueChanged">
+               <VerticalStack LayoutChanged="./_list_LayoutChanged"
+                       Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
+       </Scroller>
+</Border>
\ No newline at end of file
diff --git a/Templates/MessageBox.goml b/Templates/MessageBox.goml
deleted file mode 100644 (file)
index e9dc514..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"?>
-<Border Height="{./HeightPolicy}" Width="{./WidthPolicy}" CornerRadius="0"
-                               MouseEnter="./onBorderMouseEnter"
-                               MouseLeave="./onBorderMouseLeave">
-       <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
-               <Border BorderWidth="0" Foreground="White" Width="{./WidthPolicy}" Height="Fit" 
-                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
-                       <HorizontalStack Name="hs" Margin="2" Spacing="1" Width="{./WidthPolicy}" Height="Fit" >
-                               <GraphicObject Width="5" Height="5"/>
-                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
-                               <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
-                               <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
-                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
-                                       <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
-                                                MouseClick="./butQuitPress"/>
-                               </Border>
-                               <GraphicObject Width="5" Height="5"/>
-                       </HorizontalStack>
-               </Border>
-               <HorizontalStack Margin="5" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-                       <Image Name="Image" Width="20%" Height="20" Path="#Crow.Images.Icons.iconInfo.svg" />
-                       <Label Margin="5" Font="serif, 10" Height="{./HeightPolicy}" Width="80%" Text="{./Message}"
-                               TextAlignment="Left"
-                               Multiline="true" />             
-               </HorizontalStack>
-               <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
-                       <Button Width="50%" Caption="Ok" MouseClick="./onOkButtonClick" />
-                       <Button Width="50%" Caption="Cancel" MouseClick="./onCancelButtonClick" />
-               </HorizontalStack>
-       </VerticalStack>
-</Border>
diff --git a/Templates/MessageBox.template b/Templates/MessageBox.template
new file mode 100644 (file)
index 0000000..e9dc514
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<Border Height="{./HeightPolicy}" Width="{./WidthPolicy}" CornerRadius="0"
+                               MouseEnter="./onBorderMouseEnter"
+                               MouseLeave="./onBorderMouseLeave">
+       <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="{./Background}">
+               <Border BorderWidth="0" Foreground="White" Width="{./WidthPolicy}" Height="Fit" 
+                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
+                       <HorizontalStack Name="hs" Margin="2" Spacing="1" Width="{./WidthPolicy}" Height="Fit" >
+                               <GraphicObject Width="5" Height="5"/>
+                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                               <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
+                               <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg"
+                                                MouseClick="./butQuitPress"/>
+                               </Border>
+                               <GraphicObject Width="5" Height="5"/>
+                       </HorizontalStack>
+               </Border>
+               <HorizontalStack Margin="5" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+                       <Image Name="Image" Width="20%" Height="20" Path="#Crow.Images.Icons.iconInfo.svg" />
+                       <Label Margin="5" Font="serif, 10" Height="{./HeightPolicy}" Width="80%" Text="{./Message}"
+                               TextAlignment="Left"
+                               Multiline="true" />             
+               </HorizontalStack>
+               <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right">
+                       <Button Width="50%" Caption="Ok" MouseClick="./onOkButtonClick" />
+                       <Button Width="50%" Caption="Cancel" MouseClick="./onCancelButtonClick" />
+               </HorizontalStack>
+       </VerticalStack>
+</Border>
diff --git a/Templates/Popper.goml b/Templates/Popper.goml
deleted file mode 100755 (executable)
index a36daae..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit" Width="{./WidthPolicy}">
-       <HorizontalStack Spacing="1" Height="Fit"  Width="{./WidthPolicy}">
-               <Image Style="Icon" Margin="2"
-                               Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
-               <Label Text="{./Caption}"  Width="{./WidthPolicy}"/>
-       </HorizontalStack>
-</Border>
\ No newline at end of file
diff --git a/Templates/Popper.template b/Templates/Popper.template
new file mode 100755 (executable)
index 0000000..a36daae
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit" Width="{./WidthPolicy}">
+       <HorizontalStack Spacing="1" Height="Fit"  Width="{./WidthPolicy}">
+               <Image Style="Icon" Margin="2"
+                               Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/>
+               <Label Text="{./Caption}"  Width="{./WidthPolicy}"/>
+       </HorizontalStack>
+</Border>
\ No newline at end of file
diff --git a/Templates/RadioButton.goml b/Templates/RadioButton.goml
deleted file mode 100755 (executable)
index 6d2e9de..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-       <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
-               SvgSub="{./IsChecked}"/>
-       <Label Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
-</HorizontalStack>
\ No newline at end of file
diff --git a/Templates/RadioButton.template b/Templates/RadioButton.template
new file mode 100755 (executable)
index 0000000..6d2e9de
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<HorizontalStack Style="Control" Background="{./Background}" Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+       <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg"
+               SvgSub="{./IsChecked}"/>
+       <Label Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+</HorizontalStack>
\ No newline at end of file
diff --git a/Templates/ScrollBar.goml b/Templates/ScrollBar.goml
deleted file mode 100755 (executable)
index 4164c30..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="LightGray" Width="{./WidthPolicy}" Height="{./HeightPolicy}">
-       <GenericStack Orientation="{./Orientation}" Spacing="0"
-               Width="{./WidthPolicy}" Height="{./HeightPolicy}">
-               <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
-                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
-               </Button>
-               <Slider Name="Slider"
-                       Orientation="{./Orientation}"
-                       Value="{./Value}"
-                       Maximum="{./Maximum}"
-                       LargeIncrement="{./LargeIncrement}"
-                       SmallIncrement="{./SmallIncrement}"
-                       Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"
-                       Width="{./WidthPolicy}" Height="{./HeightPolicy}"
-                       ValueChanged="./onSliderValueChange"/>
-               <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
-                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
-               </Button>
-       </GenericStack>
-</Border>
\ No newline at end of file
diff --git a/Templates/ScrollBar.template b/Templates/ScrollBar.template
new file mode 100755 (executable)
index 0000000..4164c30
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="LightGray" Width="{./WidthPolicy}" Height="{./HeightPolicy}">
+       <GenericStack Orientation="{./Orientation}" Spacing="0"
+               Width="{./WidthPolicy}" Height="{./HeightPolicy}">
+               <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack"
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
+               </Button>
+               <Slider Name="Slider"
+                       Orientation="{./Orientation}"
+                       Value="{./Value}"
+                       Maximum="{./Maximum}"
+                       LargeIncrement="{./LargeIncrement}"
+                       SmallIncrement="{./SmallIncrement}"
+                       Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"
+                       Width="{./WidthPolicy}" Height="{./HeightPolicy}"
+                       ValueChanged="./onSliderValueChange"/>
+               <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth"
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
+               </Button>
+       </GenericStack>
+</Border>
\ No newline at end of file
diff --git a/Templates/Slider.goml b/Templates/Slider.goml
deleted file mode 100755 (executable)
index 9c7bb70..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<?xml version="1.0"?>
diff --git a/Templates/Slider.template b/Templates/Slider.template
new file mode 100755 (executable)
index 0000000..9c7bb70
--- /dev/null
@@ -0,0 +1 @@
+<?xml version="1.0"?>
diff --git a/Templates/Spinner.goml b/Templates/Spinner.goml
deleted file mode 100755 (executable)
index b07e17b..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0"
-               Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-       <Border BorderWidth="1" Height="{./HeightPolicy}" Width="80%"  Background="White" 
-               Foreground="DimGray" Margin="0">
-               <Label Foreground="DimGray" Height="{../../../HeightPolicy}" Width="Stretched"
-                       Text="{../../../Value}" TextAlignment="Right" Margin="0"/>
-       </Border>
-       <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
-               <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
-                       <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
-               </Button>                               
-               <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown" 
-                       Template="#Crow.Templates.ArrowButTemplate.crow">
-                       <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
-               </Button>
-       </VerticalStack>
-</HorizontalStack>
diff --git a/Templates/Spinner.template b/Templates/Spinner.template
new file mode 100755 (executable)
index 0000000..b07e17b
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0"
+               Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+       <Border BorderWidth="1" Height="{./HeightPolicy}" Width="80%"  Background="White" 
+               Foreground="DimGray" Margin="0">
+               <Label Foreground="DimGray" Height="{../../../HeightPolicy}" Width="Stretched"
+                       Text="{../../../Value}" TextAlignment="Right" Margin="0"/>
+       </Border>
+       <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red">
+               <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp"
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/>
+               </Button>                               
+               <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown" 
+                       Template="#Crow.Templates.ArrowButTemplate.crow">
+                       <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/>
+               </Button>
+       </VerticalStack>
+</HorizontalStack>
diff --git a/Templates/TabItem.crow b/Templates/TabItem.crow
deleted file mode 100644 (file)
index c585214..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<GenericStack Orientation="Vertical" Spacing="0"
-               Width="{./WidthPolicy}" Height="{./HeightPolicy}"
-               Background="Onyx"
-               MouseEnter="{caption.Foreground=White}"
-               MouseLeave="{caption.Foreground=Gray}">
-       <HorizontalStack Margin="2" Left="{./TabOffset}"
-               Name="TabTitle"
-               HorizontalAlignment="Left"
-               Height="{../../../TabThickness}"
-               Width="Fit">
-               <Label Name="caption" Text="{./Caption}" Foreground="Gray"/>
-               <Border CornerRadius="5" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
-                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
-                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
-                                MouseClick="../../../../butCloseTabClick"/>
-               </Border>
-       </HorizontalStack>
-       <Container
-               Name="Content" Width="{./WidthPolicy}" Height="{./HeightPolicy}"/>
-</GenericStack>
-
diff --git a/Templates/TabItem.template b/Templates/TabItem.template
new file mode 100644 (file)
index 0000000..ce2a270
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<GenericStack Orientation="Vertical" Spacing="0"
+               Width="{./WidthPolicy}" Height="{./HeightPolicy}"
+               Background="Onyx"
+               MouseEnter="{caption.Foreground=White}"
+               MouseLeave="{caption.Foreground=Gray}">
+       <HorizontalStack Margin="2" Left="{./TabOffset}"
+               Name="TabTitle"
+               HorizontalAlignment="Left"
+               Height="{../../../TabThickness}"
+               Width="Fit">
+               <Label Name="caption" Text="{./Caption}" Foreground="Gray"/>
+               <Border CornerRadius="5" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+                                MouseClick="../../../../butCloseTabClick"/>
+               </Border>
+       </HorizontalStack>
+       <Container
+               Name="Content" Width="{./WidthPolicy}" Height="{./HeightPolicy}"/>
+</GenericStack>
+
diff --git a/Templates/TreeView.crow b/Templates/TreeView.crow
deleted file mode 100644 (file)
index 1dc291f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<HorizontalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-       <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true"
-               Background="{./Background}"
-               Height="{./HeightPolicy}" Width="{./WidthPolicy}"
-               ScrollY="{../scrollbar1.Value}"
-               ValueChanged="./_scroller_ValueChanged">
-               <VerticalStack LayoutChanged="./_list_LayoutChanged"
-                       Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
-       </Scroller>
-       <ScrollBar
-               Name="scrollbar1"
-               Value="{../scroller1.ScrollY}"
-               Maximum="{../scroller1.MaximumScroll}"
-               Width="14" Orientation="Vertical"/>
-</HorizontalStack>
diff --git a/Templates/TreeView.template b/Templates/TreeView.template
new file mode 100644 (file)
index 0000000..bd50e54
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<HorizontalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+       <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true"
+               Background="{./Background}"
+               Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+               ScrollY="{../scrollbar1.Value}"
+               ValueChanged="./_scroller_ValueChanged">
+               <VerticalStack LayoutChanged="./_list_LayoutChanged"
+                       Height="Fit" Width="{./WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
+       </Scroller>
+       <ScrollBar
+               Name="scrollbar1"
+               Value="{../scroller1.ScrollY}"
+               Maximum="{../scroller1.MaximumScroll}"
+               Width="14" Orientation="Vertical"/>
+</HorizontalStack>
diff --git a/Templates/Window.goml b/Templates/Window.goml
deleted file mode 100755 (executable)
index 3a252ca..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="White" CornerRadius="20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
-                               MouseEnter="./onBorderMouseEnter"
-                               MouseLeave="./onBorderMouseLeave">
-       <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-               <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
-                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
-                       <HorizontalStack Name="hs" Margin="1" Spacing="1" Width="{./WidthPolicy}" Height="Fit">
-                               <GraphicObject Width="5"/>
-                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
-                               <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
-                               <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
-                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
-                                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
-                                                MouseClick="./butQuitPress"/>
-                               </Border>
-                               <GraphicObject Width="5"/>
-                       </HorizontalStack>
-               </Border>
-               <Container Name="Content" MinimumSize="50,50" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
-       </VerticalStack>
-</Border>
\ No newline at end of file
diff --git a/Templates/Window.template b/Templates/Window.template
new file mode 100755 (executable)
index 0000000..3a252ca
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<Border BorderWidth="1" Foreground="White" CornerRadius="20" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
+                               MouseEnter="./onBorderMouseEnter"
+                               MouseLeave="./onBorderMouseLeave">
+       <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+               <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit"
+                               Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">
+                       <HorizontalStack Name="hs" Margin="1" Spacing="1" Width="{./WidthPolicy}" Height="Fit">
+                               <GraphicObject Width="5"/>
+                               <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
+                               <Label Foreground="White" Width="{./WidthPolicy}" Margin="1" TextAlignment="Center" Text="{./Title}" />
+                               <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
+                                       MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+                                       <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+                                                MouseClick="./butQuitPress"/>
+                               </Border>
+                               <GraphicObject Width="5"/>
+                       </HorizontalStack>
+               </Border>
+               <Container Name="Content" MinimumSize="50,50" Height="{./HeightPolicy}" Width="{./WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
+       </VerticalStack>
+</Border>
\ No newline at end of file
index 9b4d0a0657f863b505ab7e47f2568645d8462b1c..f67d755d55b53a8231e1f05f5be111f6583217c3 100644 (file)
@@ -110,8 +110,6 @@ namespace Crow
 
                void interfaceThread()
                {
-                       Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
-
                        CrowInterface.Quit += Quit;
                        CrowInterface.MouseCursorChanged += CrowInterface_MouseCursorChanged;
                        while (CrowInterface.ClientRectangle.Size.Width == 0)
index 80e0e850c6eb28e3f8fa895a7a86e9e1a6c6f918..1d60850c9cc71da9af2ba3cb8061a43a7540f05f 100644 (file)
@@ -5,7 +5,6 @@ using Cairo;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.AnalogMeter0.goml")]
        public class AnalogMeter : NumericControl
        {
                #region CTOR
index 92238e69237b8ae6e84c1c6cf91618066fc8e92b..597621827264fb3f6c1d199bcb933cd62cc7c993 100644 (file)
@@ -12,7 +12,6 @@ using System.ComponentModel;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.Button.crow")]
     public class Button : TemplatedContainer
     {
                string caption;
@@ -74,7 +73,7 @@ namespace Crow
                }
                #endregion
 
-               [XmlAttributeAttribute()][DefaultValue("Button")]
+               [XmlAttributeAttribute][DefaultValue("Button")]
                public string Caption {
                        get { return caption; } 
                        set {
@@ -84,7 +83,7 @@ namespace Crow
                                NotifyValueChanged ("Caption", caption);
                        }
                }        
-               [XmlAttributeAttribute()][DefaultValue("#Crow.Images.button.svg")]
+               [XmlAttributeAttribute][DefaultValue("#Crow.Images.button.svg")]
                public string Image {
                        get { return image; } 
                        set {
@@ -94,7 +93,7 @@ namespace Crow
                                NotifyValueChanged ("Image", image);
                        }
                } 
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [XmlAttributeAttribute][DefaultValue(false)]
                public bool IsPressed
                {
                        get { return isPressed; }
index 61b581edec7fa512b49c07108bf4fedc4f126093..46d77e769249b7af6ee48b6fe3e1abdfd8f79e65 100644 (file)
@@ -25,7 +25,6 @@ using System.Xml.Serialization;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.CheckBox.goml")]
        public class CheckBox : TemplatedControl
        {
                string caption;
index d2b0567e5639df1bf1075cced34dcdb8824eb1da..becee3cea6e3b4258e54c6dc327d68f4efc8ef35 100644 (file)
@@ -24,7 +24,6 @@ using System.Xml.Serialization;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.ComboBox.goml")]
        public class ComboBox : ListBox
     {          
                #region CTOR
index ac53ee8b67cd866ff4761a825930c882610e176a..586b1b26ce715a1d48dcae43553219f0798c9bc5 100644 (file)
@@ -25,7 +25,6 @@ using System.IO;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.DirectoryView.crow")]
        public class DirectoryView : TemplatedControl
        {
                #region CTOR
index 68597d18f2244b0244ffe7db73252b706fbfe88c..891499fff1643168b09614e9bb6df9d656b25828 100644 (file)
@@ -22,7 +22,6 @@ using System;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.Dummy.goml")]
        public class DummyTemplate : TemplatedControl
        {
                public DummyTemplate () : base()
index 819987eb2811cad5f10cd6bbcab99095bbbff96a..059cab8b9418a9bdc5950addf0566f4ce12c6779 100644 (file)
@@ -25,7 +25,6 @@ using System.Xml.Serialization;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.Expandable.goml")]
     public class Expandable : TemplatedContainer
     {
                #region CTOR
index 886e79649ecff80e1b714375715d30b6d70a5185..db457282b19b97e7e403f049da1d5ee833421180 100644 (file)
@@ -25,7 +25,6 @@ using System.ComponentModel;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.GroupBox.goml")]
     public class GroupBox : TemplatedContainer
     {          
                string caption;
index ab349ed4c95fa6404c9e5b4e0b3ad70b2e859141..e1b82f19e0f737e76ab122d8b77a1f364465743e 100644 (file)
@@ -30,7 +30,6 @@ using System.Threading;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.ListBox.goml")]
        public class ListBox : TemplatedControl
        {
                #region CTOR
index 550f5b7271ba76a77350cefcde77e3a8ca96bb56..dbca769d31fd4caba8b8d62cdc436675e2b64bfd 100644 (file)
@@ -23,7 +23,6 @@ using System.ComponentModel;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.MessageBox.goml")]
        public class MessageBox : Window
        {
                public MessageBox ():base(){}
index ea11435a0a124bcb3988e09bb9c8b9f421bd46a7..029a9837b57051b7ddae7e8908542f3d8f92ff42 100644 (file)
@@ -26,7 +26,6 @@ using OpenTK.Input;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.Popper.goml")]
     public class Popper : TemplatedContainer
     {          
                #region CTOR
index 35c96c309336b41abe3fb9bd8cd3fa099248e812..ede16475e44dcd08982e02c0b36fe370b4fe42be 100644 (file)
@@ -25,7 +25,6 @@ using System.Xml.Serialization;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.RadioButton.goml")]
     public class RadioButton : TemplatedControl
     {                  
                string caption;
index 017b50acb10b315eb015fdcd14aacdccbb5b9c23..5660c00b9b4b6d31745d813f8f69c60a06181a64 100644 (file)
@@ -5,7 +5,6 @@ using OpenTK.Input;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.ScrollBar.goml")]
        public class ScrollBar : NumericControl
        {
                Orientation _orientation;
index 0806d4d3a42aada38c9ec4b0e398c12858c9bde5..7fc34ae878b292fc6eb2417d14c197c7b1b8dec5 100644 (file)
@@ -22,7 +22,6 @@ using System;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.Spinner.goml")]
        public class Spinner : NumericControl
        {
                #region CTOR
index 2d2ba4534f626a55fb706f1150cec8e3f63851b1..c06a43a9357c0742c87f354a9b4c8a3c355ca991 100644 (file)
@@ -25,7 +25,6 @@ using System.Diagnostics;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.TabItem.crow")]
        public class TabItem : TemplatedContainer
        {
                #region Private fields
index 422a45ec55d2b3da845efdf74142bec6bfd074db..4745b87b6cddd7c1cdccae208a91f899736cba20 100644 (file)
@@ -31,27 +31,6 @@ using System.Reflection;
 
 namespace Crow
 {
-       [AttributeUsage(AttributeTargets.Class)]
-       public class TemplateAttribute : Attribute
-       {
-               public string Path = "";
-               public TemplateAttribute(string path)
-               {
-                       Path = path;
-               }
-       }
-
-       [AttributeUsage(AttributeTargets.Class)]
-       public class DefaultTemplate : TemplateAttribute
-       {
-               public DefaultTemplate(string path) : base(path){}
-       }
-       [AttributeUsage(AttributeTargets.Class)]
-       public class DefaultItemTemplate : TemplateAttribute
-       {
-               public DefaultItemTemplate(string path) : base(path){}
-       }
-
        public abstract class TemplatedControl : PrivateContainer, IXmlSerializable
        {
                #region CTOR
@@ -116,8 +95,9 @@ namespace Crow
                protected virtual void loadTemplate(GraphicObject template = null)
                {
                        if (template == null) {
-                               DefaultTemplate dt = (DefaultTemplate)this.GetType ().GetCustomAttributes (typeof(DefaultTemplate), true).FirstOrDefault();
-                               this.SetChild (Interface.Load (dt.Path));
+                               if (!Interface.DefaultTemplates.ContainsKey (this.GetType ().FullName))
+                                       throw new Exception (string.Format ("No default template found for '{0}'", this.GetType ().FullName));
+                               this.SetChild (Interface.Load (Interface.DefaultTemplates[this.GetType ().FullName]));
                        }else
                                this.SetChild (template);
 
index 510802810d001d2cdbdda5d2ef8e2f9fed0f6f88..b7de4b69d898b5394d147cacdf7ff850013d121b 100644 (file)
@@ -27,7 +27,6 @@ namespace Crow
 {
        //treeview expect expandable child (or not)
        //if their are expandable, some functions and events are added
-       [DefaultTemplate("#Crow.Templates.TreeView.crow")]
        public class TreeView : ListBox
        {
                GraphicObject selectedItemContainer = null;
index be482e431b595b359bed5122dae1c24d03bf7c0d..9fb6bd2951eeaa114c1daa4480d00c323d609263 100644 (file)
@@ -26,7 +26,6 @@ using System.Diagnostics;
 
 namespace Crow
 {
-       [DefaultTemplate("#Crow.Templates.Window.goml")]
        public class Window : TemplatedContainer
        {
                enum Direction
index f8fd34ed3b62a5e359dc5d28a82b14bfb8ed9908..78f1880a71db92b3272639f7a9da015f6f93e22e 100644 (file)
@@ -147,21 +147,16 @@ namespace Crow
                                        }
 
                                        if (!inlineTemplate) {
+                                               reader.il.Emit (OpCodes.Ldloc_0);//Load  this templateControl ref
                                                if (string.IsNullOrEmpty (templatePath)) {
-                                                       DefaultTemplate dt = (DefaultTemplate)crowType.GetCustomAttributes (typeof(DefaultTemplate), true).FirstOrDefault ();
-                                                       if (dt!=null)
-                                                               templatePath = dt.Path;
-                                               }
-
-                                               if (!string.IsNullOrEmpty (templatePath)) {
-                                                       reader.il.Emit (OpCodes.Ldloc_0);//Load  this templateControl ref
-
+                                                       reader.il.Emit (OpCodes.Ldnull);//default template loading
+                                               }else{
                                                        reader.il.Emit (OpCodes.Ldstr, templatePath); //Load template path string
                                                        reader.il.Emit (OpCodes.Callvirt,//call Interface.Load(path)
-                                                               typeof(Interface).GetMethod ("Load", BindingFlags.Static | BindingFlags.Public));
-                                                       reader.il.Emit (OpCodes.Callvirt,//add child
-                                                               crowType.GetMethod ("loadTemplate", BindingFlags.Instance | BindingFlags.NonPublic));
+                                                                       typeof(Interface).GetMethod ("Load", BindingFlags.Static | BindingFlags.Public));
                                                }
+                                               reader.il.Emit (OpCodes.Callvirt,//load template
+                                                       crowType.GetMethod ("loadTemplate", BindingFlags.Instance | BindingFlags.NonPublic));
                                        }
                                        foreach (string[] iTempId in itemTemplateIds) {
                                                reader.il.Emit (OpCodes.Ldloc_0);//load TempControl ref
index 6997f6ba63f3baade60b95e5e68ca2e861290627..2ffebdbda4b7d002ff359a20df4e78e60ddf15d0 100644 (file)
@@ -45,8 +45,9 @@ namespace Crow
        {
                #region CTOR
                static Interface(){
-                       LoadCursors ();
-                       LoadStyling ();
+                       loadCursors ();
+                       loadStyling ();
+                       findAvailableTemplates ();
 
                        FontRenderingOptions = new FontOptions ();
                        FontRenderingOptions.Antialias = Antialias.Subpixel;
@@ -121,18 +122,13 @@ namespace Crow
                public static Dictionary<String, LoaderInvoker> DefaultValuesLoader = new Dictionary<string, LoaderInvoker>();
                public static Dictionary<string, Style> Styling;
                /// <summary> parse all styling data's and build global Styling Dictionary </summary>
-               static void LoadStyling() {
-                       System.Globalization.CultureInfo savedCulture = Thread.CurrentThread.CurrentCulture;
-                       Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
-
+               static void loadStyling() {
                        Styling = new Dictionary<string, Style> ();
 
                        //fetch styling info in this order, if member styling is alreadey referenced in previous
                        //assembly, it's ignored.
                        loadStylingFromAssembly (Assembly.GetEntryAssembly ());
                        loadStylingFromAssembly (Assembly.GetExecutingAssembly ());
-
-                       Thread.CurrentThread.CurrentCulture = savedCulture;
                }
                /// <summary> Search for .style resources in assembly </summary>
                static void loadStylingFromAssembly (Assembly assembly) {
@@ -143,7 +139,7 @@ namespace Crow
                                        .Dispose ();
                        }
                }
-               static void LoadCursors(){
+               static void loadCursors(){
                        //Load cursors
                        XCursor.Cross = XCursorFile.Load("#Crow.Images.Icons.Cursors.cross").Cursors[0];
                        XCursor.Default = XCursorFile.Load("#Crow.Images.Icons.Cursors.arrow").Cursors[0];
@@ -156,6 +152,23 @@ namespace Crow
                }
                #endregion
 
+               #region Templates
+               public static Dictionary<String, string> DefaultTemplates = new Dictionary<string, string>();
+               static void findAvailableTemplates(){
+                       searchTemplatesIn (Assembly.GetEntryAssembly ());
+                       searchTemplatesIn (Assembly.GetExecutingAssembly ());
+               }
+               static void searchTemplatesIn(Assembly assembly){
+                       foreach (string resId in assembly
+                               .GetManifestResourceNames ()
+                               .Where (r => r.EndsWith (".template", StringComparison.OrdinalIgnoreCase))) {
+                               string clsName = resId.Substring (0, resId.Length - 9);
+                               if (DefaultTemplates.ContainsKey (clsName))
+                                       continue;
+                               DefaultTemplates[clsName] = "#" + resId;
+                       }
+               }
+               #endregion
 
                #region Load/Save
                public static Stream GetStreamFromPath (string path)
@@ -194,16 +207,11 @@ namespace Crow
                }
                public static GraphicObject Load (string path)
                {
-                       System.Globalization.CultureInfo savedCulture = Thread.CurrentThread.CurrentCulture;
-                       Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
-
                        try {
                                return GetInstantiator (path).CreateInstance ();
                        } catch (Exception ex) {
                                throw new Exception ("Error loading <" + path + ">:", ex);
                        }
-
-                       Thread.CurrentThread.CurrentCulture = savedCulture;
                }
                /// <summary>
                /// fetch it from cache or create it