]> O.S.I.I.S - jp/crow.git/commitdiff
first try with xlib
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 13 Nov 2018 13:48:41 +0000 (14:48 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 13 Nov 2018 13:48:41 +0000 (14:48 +0100)
155 files changed:
Crow.Test/Crow.Test.csproj [deleted file]
Crow.Test/ExpectedOutputs/0.png [deleted file]
Crow.Test/ExpectedOutputs/1.png [deleted file]
Crow.Test/ExpectedOutputs/3.png [deleted file]
Crow.Test/ExpectedOutputs/4.png [deleted file]
Crow.Test/ExpectedOutputs/5.png [deleted file]
Crow.Test/Interfaces/0.crow [deleted file]
Crow.Test/Interfaces/1.crow [deleted file]
Crow.Test/Interfaces/2.crow [deleted file]
Crow.Test/Interfaces/3.crow [deleted file]
Crow.Test/Interfaces/4.crow [deleted file]
Crow.Test/Interfaces/5.crow [deleted file]
Crow.Test/Interfaces/testButton.crow [deleted file]
Crow.Test/Test.cs [deleted file]
Crow.Test/packages.config [deleted file]
Crow.csproj
Crow.sln
CrowIDE/CrowIDE.csproj
CrowIDE/packages.config [deleted file]
CrowIDE/src/CrowIDE.cs
CrowIDE/src/DesignInterface.cs
CrowIDE/src/Editors/CodeBuffer/TextEditor.cs
CrowIDE/src/Editors/ImlVisualEditor.cs
CrowIDE/src/Editors/SourceEditor.cs
CrowIDE/src/MemberView/PropertyContainer.cs
CrowIDE/ui/CategoryExp.template
CrowIDE/ui/ContextMenu.template
CrowIDE/ui/CrowIDE.crow
CrowIDE/ui/DockWindows/GTreeExpITemp.crow
CrowIDE/ui/DockWindows/WinSchemaItem.template
CrowIDE/ui/DockWindows/toolboxBut.template
CrowIDE/ui/DockWindows/winGTExplorer.crow
CrowIDE/ui/DockWindows/winToolbox.crow
CrowIDE/ui/IDE.style
CrowIDE/ui/ItemTemplates/Enum.template
CrowIDE/ui/ItemTemplates/Fill.template
CrowIDE/ui/LQIsExplorer.crow
CrowIDE/ui/MenuItem.template
CrowIDE/ui/Options.crow
CrowIDE/ui/ProjectTree.template
CrowIDE/ui/TabItem.template
CrowIDE/ui/TreeExpandable.template
CrowIDE/ui/editors/IMLEdit.itemp
CrowIDE/ui/editors/SourceEditor.crow
CrowIDE/ui/editors/TextEditor.crow
CrowIDE/ui/test.crow
Default.style
Templates/ArrowBut.template
Templates/Button.template
Templates/CheckBox2.template
Templates/ComboBox.template
Templates/ContextMenu.template
Templates/DirectoryView.template
Templates/DockWindow.template
Templates/Expandable.template
Templates/HScrollBar.template
Templates/MenuItem.template
Templates/ScrollBar.template
Templates/TabItem.template
Templates/Tooltip.template
Templates/Window.template
Tests/BasicTests.cs
Tests/CrowDebugger.cs [new file with mode: 0644]
Tests/CrowWindow.cs [deleted file]
Tests/Hello3D.cs [deleted file]
Tests/HelloWorld.cs [deleted file]
Tests/InterfaceControler.cs [deleted file]
Tests/Interfaces/CheckBox2.imlt
Tests/Interfaces/Container/0.crow
Tests/Interfaces/Container/3.crow
Tests/Interfaces/Divers/0.crow
Tests/Interfaces/Divers/3.crow
Tests/Interfaces/Divers/5.crow
Tests/Interfaces/Divers/6.crow
Tests/Interfaces/Divers/clip0.crow
Tests/Interfaces/Divers/clip1.crow
Tests/Interfaces/Divers/clip2.crow
Tests/Interfaces/Divers/clip3.crow
Tests/Interfaces/Divers/clip4.crow
Tests/Interfaces/Divers/colorPicker.crow
Tests/Interfaces/Divers/perfMeasures.crow
Tests/Interfaces/Divers/testDisable.crow
Tests/Interfaces/Divers/testOutOfClipUpdate.crow
Tests/Interfaces/Divers/testPropLess.crow
Tests/Interfaces/Divers/testShape.crow
Tests/Interfaces/Divers/testStacks.crow
Tests/Interfaces/Divers/testTextBox.crow
Tests/Interfaces/Divers/welcome.crow
Tests/Interfaces/DragAndDrop/0.crow
Tests/Interfaces/Experimental/testDock.crow
Tests/Interfaces/Experimental/testDock2.crow
Tests/Interfaces/Experimental/testStack.crow
Tests/Interfaces/Group/0.crow
Tests/Interfaces/Group/1.crow
Tests/Interfaces/Group/2.crow
Tests/Interfaces/Group/3.crow
Tests/Interfaces/Group/4.crow
Tests/Interfaces/Splitter/1.crow
Tests/Interfaces/Stack/0.crow
Tests/Interfaces/Stack/0h.crow
Tests/Interfaces/Stack/1.crow
Tests/Interfaces/Stack/1h.crow
Tests/Interfaces/Stack/2.crow
Tests/Interfaces/Stack/2h.crow
Tests/Interfaces/Stack/3.crow
Tests/Interfaces/Stack/3h.crow
Tests/Interfaces/Stack/4.crow
Tests/Interfaces/TabItem.template
Tests/Interfaces/TemplatedContainer/0.crow
Tests/Interfaces/TemplatedContainer/6.crow
Tests/Interfaces/TemplatedContainer/7.crow
Tests/Interfaces/TemplatedContainer/testGroupBox.crow
Tests/Interfaces/TemplatedContainer/testPopper.crow
Tests/Interfaces/TemplatedContainer/testTabView.crow
Tests/Interfaces/TemplatedContainer/testTabView2.crow
Tests/Interfaces/TemplatedControl/testButton.crow
Tests/Interfaces/TemplatedControl/testCheckbox.crow
Tests/Interfaces/TemplatedControl/testCombobox.crow
Tests/Interfaces/TemplatedControl/testRadioButton.crow
Tests/Interfaces/TemplatedControl/testScrollbar.crow
Tests/Interfaces/TemplatedControl/testSpinner.crow
Tests/Interfaces/perfMsr.crow
Tests/OpenGL/Extensions.cs [deleted file]
Tests/OpenGL/Shader.cs [deleted file]
Tests/OpenGL/Texture.cs [deleted file]
Tests/OpenGL/vaoMesh.cs [deleted file]
Tests/Showcase.cs
Tests/Tests.csproj
Tests/Tutorials/T1_HelloWorld.cs [deleted file]
Tests/Tutorials/T2_IML.cs [deleted file]
Tests/Tutorials/T3_OpenGLCube.cs [deleted file]
Tests/Tutorials/T4_Gauge.cs [deleted file]
Tests/Tutorials/test.crow [deleted file]
Tests/packages.config [deleted file]
Tests/test.style
Tests/testCairoXLib.cs [new file with mode: 0644]
Tests/ui/LabelButton.style
Tests/ui/MenuItem.style
Tests/ui/showcase.crow
Tests/ui/test.crow
src/Cairo/CairoHelpers.cs
src/Colors.cs
src/GraphicObjects/Border.cs
src/GraphicObjects/GraphicObject.cs
src/GraphicObjects/ScrollBar.cs
src/GraphicObjects/Slider.cs
src/GraphicObjects/Splitter.cs
src/GraphicObjects/Trend.cs
src/Interface.cs
src/Mono.Cairo/Antialias.cs
src/StyleReader.cs
src/XLib/Display.cs [new file with mode: 0644]
src/XLib/NativeMethods.cs [new file with mode: 0644]
src/XLib/Window.cs [new file with mode: 0644]
src/XLib/X11Structs.cs [new file with mode: 0644]

diff --git a/Crow.Test/Crow.Test.csproj b/Crow.Test/Crow.Test.csproj
deleted file mode 100644 (file)
index cf7b10a..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.30703</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <RootNamespace>Crow.Test</RootNamespace>
-    <AssemblyName>Crow.Test</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
-    <ReleaseVersion>0.7</ReleaseVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <DefineConstants>DEBUG;</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <Optimize>true</Optimize>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="nunit.framework">
-      <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Test.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="packages.config" />
-    <None Include="ExpectedOutputs\0.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="ExpectedOutputs\1.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="ExpectedOutputs\3.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="ExpectedOutputs\4.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="ExpectedOutputs\5.png">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Interfaces\0.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Interfaces\1.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Interfaces\2.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Interfaces\3.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Interfaces\4.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Interfaces\5.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Interfaces\testButton.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\Crow.csproj">
-      <Project>{C2980F9B-4798-4C05-99E2-E174810F7C7B}</Project>
-      <Name>Crow</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="ExpectedOutputs\" />
-    <Folder Include="Interfaces\" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-</Project>
\ No newline at end of file
diff --git a/Crow.Test/ExpectedOutputs/0.png b/Crow.Test/ExpectedOutputs/0.png
deleted file mode 100644 (file)
index 153a364..0000000
Binary files a/Crow.Test/ExpectedOutputs/0.png and /dev/null differ
diff --git a/Crow.Test/ExpectedOutputs/1.png b/Crow.Test/ExpectedOutputs/1.png
deleted file mode 100644 (file)
index 57fcf77..0000000
Binary files a/Crow.Test/ExpectedOutputs/1.png and /dev/null differ
diff --git a/Crow.Test/ExpectedOutputs/3.png b/Crow.Test/ExpectedOutputs/3.png
deleted file mode 100644 (file)
index c4ba81c..0000000
Binary files a/Crow.Test/ExpectedOutputs/3.png and /dev/null differ
diff --git a/Crow.Test/ExpectedOutputs/4.png b/Crow.Test/ExpectedOutputs/4.png
deleted file mode 100644 (file)
index c2e97e7..0000000
Binary files a/Crow.Test/ExpectedOutputs/4.png and /dev/null differ
diff --git a/Crow.Test/ExpectedOutputs/5.png b/Crow.Test/ExpectedOutputs/5.png
deleted file mode 100644 (file)
index 7eec095..0000000
Binary files a/Crow.Test/ExpectedOutputs/5.png and /dev/null differ
diff --git a/Crow.Test/Interfaces/0.crow b/Crow.Test/Interfaces/0.crow
deleted file mode 100755 (executable)
index fdcc11d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
-<GraphicObject Width="100" Height="100" Background="Green"/>
diff --git a/Crow.Test/Interfaces/1.crow b/Crow.Test/Interfaces/1.crow
deleted file mode 100755 (executable)
index 142d072..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<Container Width="300" Height="300" Margin="20" Background="Yellow">
-       <Container Width="0" Height="0" Margin="20" Background="Green">
-               <GraphicObject VerticalAlignment="Bottom" Width="50" Height="50"
-                       Background="Red"/>
-       </Container>
-</Container>
\ No newline at end of file
diff --git a/Crow.Test/Interfaces/2.crow b/Crow.Test/Interfaces/2.crow
deleted file mode 100755 (executable)
index dcccba0..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Fit="true">
-       <HorizontalStack Fit="true">
-               <Label Text="label1"/>
-               <TextRun Text="textrun1"/>
-       </HorizontalStack>
-</VerticalStack>
\ No newline at end of file
diff --git a/Crow.Test/Interfaces/3.crow b/Crow.Test/Interfaces/3.crow
deleted file mode 100755 (executable)
index e9c8892..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0"?>
-<HorizontalStack Margin="5" Background="DimGray">
-       <VerticalStack Width="200" Margin="5" Background="Gray">
-               <VerticalStack Fit="true" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </VerticalStack>
-               <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue" Width="Stretched"/>
-                       <TextRun Background="SkyBlue" Height="Stretched"/>
-               </VerticalStack>
-               <HorizontalStack Fit="true" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-                       <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue" Width="Stretched"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-       </VerticalStack>
-       <VerticalStack Width="Stretched" Height="Stretched" Margin="5" Background="Gray">
-               <VerticalStack Fit="true" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </VerticalStack>
-               <VerticalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue" Width="Stretched"/>
-                       <TextRun TextAlignment="Center" Background="SkyBlue" Width="Stretched" Height="Stretched"/>
-               </VerticalStack>
-               <HorizontalStack Fit="true" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-                       <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue" Width="Stretched"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-       </VerticalStack>
-       <VerticalStack Width="Fit" Margin="5" Background="Gray">
-               <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue" HorizontalAlignment="Left"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </VerticalStack>
-               <VerticalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue" Width="Stretched"/>
-                       <TextRun Background="SkyBlue" Height="Stretched"/>
-               </VerticalStack>
-               <HorizontalStack Fit="true" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-                       <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
-                       <TextRun Background="SkyBlue"/>
-                       <TextRun Background="SkyBlue" Width="Stretched"/>
-                       <TextRun Background="SkyBlue"/>
-               </HorizontalStack>
-       </VerticalStack>
-</HorizontalStack>
\ No newline at end of file
diff --git a/Crow.Test/Interfaces/4.crow b/Crow.Test/Interfaces/4.crow
deleted file mode 100755 (executable)
index 6546a9a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Fit="true" Spacing="0">
-       <Label Text="SCALED PROPORTIONNAL" Background="hgradient|0:DimGray|1:DarkRed" Width="0"/>
-       <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" >
-               <Image Background="vgradient|0:SkyBlue|1:White" Path="#Crow.image.crow0.svg"/>
-               <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Path="#Crow.image.crow0.svg" />
-               <Image Background="vgradient|0:SkyBlue|1:White" Width="20" Height="20" Path="#Crow.image.crow0.svg" />
-               <Image Margin="2" Background="vgradient|0:SkyBlue|1:White" Width="20" Height="20" Path="#Crow.image.crow0.svg" />
-               <Image Background="vgradient|0:SkyBlue|1:White" Width="25" Height="50" Path="#Crow.image.crow0.svg" />
-               <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="25" Height="50" Path="#Crow.image.crow0.svg" />
-               <Image Background="vgradient|0:SkyBlue|1:White" Width="50" Height="25" Path="#Crow.image.crow0.svg" />
-               <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="25" Path="#Crow.image.crow0.svg" />
-               <Image Background="vgradient|0:SkyBlue|1:White" Width="25" Height="Fit" Path="#Crow.image.crow0.svg" />
-               <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="25" Height="Fit" Path="#Crow.image.crow0.svg" />
-       </HorizontalStack>
-       <Label Text="SCALED NOT PROPORTIONNAL" Background="hgradient|0:DimGray|1:DarkRed"/>
-       <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" >
-               <Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Width="20" Height="20" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Margin="2" Background="vgradient|0:SkyBlue|1:White" Width="20" Height="20" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Width="25" Height="50" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="25" Height="50" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="25" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="25" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Width="25" Height="Fit" Path="#Crow.image.crow0.svg" />
-               <Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="25" Height="Fit" Path="#Crow.image.crow0.svg" />
-       </HorizontalStack>
-       <Label Text="UNSCALED" Background="hgradient|0:DimGray|1:DarkRed"/>
-       <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" >
-               <Image Scaled="false" Background="Blue" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Margin="10" Background="Blue" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Background="Blue" Width="20" Height="20" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Background="Blue" Width="25" Height="50" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Margin="10" Background="Blue" Width="25" Height="50" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Background="Blue" Width="50" Height="25" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="25" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Background="Blue" Width="25" Height="Fit" Path="#Crow.image.crow0.svg" />
-               <Image Scaled="false" Margin="10" Background="Blue" Width="25" Height="Fit" Path="#Crow.image.crow0.svg" />
-       </HorizontalStack>
-       <Label Text="SCALED PROPORTIONNAL" Background="hgradient|0:DimGray|1:DarkRed"/>
-       <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent">
-               <Image Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Margin="10" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Background="Blue" Width="25" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Margin="10" Background="Blue" Width="25" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Background="Blue" Width="50" Height="25" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Margin="10" Background="Blue" Width="50" Height="25" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Background="Blue" Width="25" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Margin="10" Background="Blue" Width="25" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
-       </HorizontalStack>
-       <Label Text="SCALED NOT PROPORTIONNAL" Background="hgradient|0:DimGray|1:DarkRed"/>
-       <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent">             
-               <Image KeepProportions="false" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Margin="10" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Background="Blue" Width="25" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Margin="10" Background="Blue" Width="25" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Background="Blue" Width="50" Height="25" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Margin="10" Background="Blue" Width="50" Height="25" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Background="Blue" Width="25" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image KeepProportions="false" Margin="10" Background="Blue" Width="25" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
-       </HorizontalStack>
-       <Label Text="UNSCALED" Background="hgradient|0:DimGray|1:DarkRed"/>
-       <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" >
-               <Image Scaled="false" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Margin="10" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Background="Blue" Width="25" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Margin="10" Background="Blue" Width="25" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Background="Blue" Width="50" Height="25" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="25" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Background="Blue" Width="25" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
-               <Image Scaled="false" Margin="10" Background="Blue" Width="25" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
-       </HorizontalStack>
-</VerticalStack>
\ No newline at end of file
diff --git a/Crow.Test/Interfaces/5.crow b/Crow.Test/Interfaces/5.crow
deleted file mode 100755 (executable)
index 7238ae4..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<HorizontalStack Fit="true" Margin="5">
-       <VerticalStack Fit="true" Margin="2" Spacing="2">
-               <TextRun Text="text run test"/>
-               <Label Text="label test"/>
-               <TextBox Text="text box test"/>
-               <Button Caption="test button"/>
-               <CheckBox Caption="test checkbox"/>
-               <RadioButton Caption="test radiobutton"/>
-               <ComboBox/>
-               <Popper Caption="test popper">
-                       <Label Text="label test"/>
-               </Popper>
-               <Expandable Caption="test expandable">
-                       <Label Text="label test"/>
-               </Expandable>
-               <Border >
-                       <Label Text="border test" Margin="3"/>
-               </Border>
-               <GroupBox Caption="Group box" >
-                       <Label Text="border test" Margin="3"/>
-               </GroupBox>
-               <Container Fit="true" Background="DimGray" Margin="3">
-                       <GraphicObject Width="20" Height="20" Background="LightGray"/>
-               </Container>
-               <ProgressBar Height="10" Width="150" Background="DimGray" Value="50" />
-               <Slider Value="5" Width="150" Height="10"/>
-               <ScrollBar Orientation="Horizontal" Maximum="100" Value="50" Height="16" Width="150"/>
-               <Spinner Value="100"/>
-       </VerticalStack>
-       <VerticalStack Width="150" Height="Fit" Margin="2" Spacing="2">
-               <TextRun Text="text run test" Width="0"/>
-               <Label Text="label test" Width="0"/>
-               <TextBox Text="text box test" Width="0"/>
-               <Button Caption="test button" Width="0"/>
-               <CheckBox Caption="test checkbox" Width="0"/>
-               <RadioButton Caption="test radiobutton" Width="0"/>
-               <ComboBox Width="0"/>
-               <Popper Caption="test popper" Width="0">
-                       <Label Text="label test"/>
-               </Popper>
-               <Expandable Caption="test expandable" Width="0">
-                       <Label Text="label test"/>
-               </Expandable>
-               <Border  Width="0">
-                       <Label Text="border test" Margin="3"/>
-               </Border>
-               <GroupBox Caption="Group box"  Width="0">
-                       <Label Text="border test" Margin="3"/>
-               </GroupBox>
-               <Container Height="Fit"  Width="0" Background="DimGray" Margin="3">
-                       <GraphicObject Width="20" Height="20" Background="LightGray"/>
-               </Container>
-               <ProgressBar Height="10" Width="0" Background="DimGray" Value="50" />
-               <Slider Value="5" Width="0" Height="10"/>
-               <ScrollBar Orientation="Horizontal" Maximum="100" Value="50" Height="16" Width="0"/>
-               <Spinner Value="100"  Width="0"/>
-       </VerticalStack>
-</HorizontalStack>
-<!--<HorizontalStack Fit="true" Background="RoyalBlue" Margin="5">
-       <GraphicObject Background="Red" Width="30" Height="20"/>
-       <Spinner Maximum="10000000000" SmallIncrement="10" Value="0"/>
-       <GraphicObject Background="Green" Width="30" Height="20"/>
-</HorizontalStack>-->
\ No newline at end of file
diff --git a/Crow.Test/Interfaces/testButton.crow b/Crow.Test/Interfaces/testButton.crow
deleted file mode 100755 (executable)
index 5e4c5a5..0000000
+++ /dev/null
@@ -1,322 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Fit="true">
-       <HorizontalStack Fit="True">
-               <Button Caption="but" MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>      <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-       <HorizontalStack Fit="True">
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-               <Button MouseClick="onButClick"/>
-       </HorizontalStack>
-</VerticalStack>
\ No newline at end of file
diff --git a/Crow.Test/Test.cs b/Crow.Test/Test.cs
deleted file mode 100644 (file)
index d4d9785..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-//  Test.cs
-//
-//  Author:
-//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
-//
-//  Copyright (c) 2016 jp
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-using NUnit.Framework;
-using System;
-using Crow;
-using System.IO;
-[assembly: Description ("Assembly description here")]
-namespace UnitTest
-{
-       [TestFixture, Description ("Fixture description here")]
-       public class Test
-       {
-               Interface iface;
-               Rectangle bounds = new Rectangle (0, 0, 600, 600);
-
-
-               [SetUp]
-               public void Init ()
-               {
-                       iface = new Interface ();
-                       iface.Init ();
-                       iface.ProcessResize (bounds);
-               }
-
-               [Test , Description("My really cool test")]
-               public void GraphicObject ()
-               {
-                       string [] tests = new string [] { "0", "1", "3", "4", "5" };
-
-                       foreach (string s in tests) {
-                               string fileName = Path.Combine ("Interfaces", s + ".crow");
-                               iface.AddWidget (fileName);
-
-                               iface.Update ();
-                               iface.Update ();
-
-                               using (Cairo.Surface surf = new Cairo.ImageSurface (iface.bmp,
-                                         Cairo.Format.Argb32, iface.ClientRectangle.Width, iface.ClientRectangle.Height, iface.ClientRectangle.Width * 4)) {
-                                       surf.WriteToPng (@"tmp.png");
-                                       surf.WriteToPng (fileName + ".png");
-                               }
-
-
-                               byte [] model = File.ReadAllBytes ("ExpectedOutputs/" + s + ".png");
-                               byte [] result = File.ReadAllBytes (@"tmp.png");
-
-                               //CollectionAssert.AreEqual (model, result);
-
-                               iface.ClearInterface ();
-                       }
-               }
-       }
-}
-
diff --git a/Crow.Test/packages.config b/Crow.Test/packages.config
deleted file mode 100644 (file)
index 01c187c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="NUnit" version="2.6.4" targetFramework="net461" />
-</packages>
\ No newline at end of file
index 1b5b3406bf82884fd9a7d1531c6027a3043bc311..558511b37ada90f3568b1f344d17bbd3510d9a39 100644 (file)
@@ -22,9 +22,9 @@
     <OutputPath>$(SolutionDir)build\$(Configuration)</OutputPath>
     <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
     <AssemblyOriginatorKeyFile>crow.key</AssemblyOriginatorKeyFile>
+    <ReleaseVersion>0.5</ReleaseVersion>
     <ProductVersion>8.0.30703</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
-    <ReleaseVersion>0.5</ReleaseVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
     <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
     <Optimize>false</Optimize>
     <OutputPath>$(SolutionDir)build\Debug</OutputPath>
-    <DefineConstants>DESIGN_MODE;DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_DISPOSE0;DEBUG_LAYOUTING0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
+    <DefineConstants>XLIB_BACKEND0;DESIGN_MODE;DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_DISPOSE0;DEBUG_LAYOUTING0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
+    <EnvironmentVariables>
+      <EnvironmentVariables>
+        <Variable name="MONO_CAIRO_DEBUG_DISPOSE" value="1" />
+      </EnvironmentVariables>
+    </EnvironmentVariables>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <Optimize>true</Optimize>
     <Compile Include="src\ParsingException.cs" />
     <Compile Include="src\IMLAttributes.cs" />
     <Compile Include="src\GraphicObjects\DockStack.cs" />
+    <Compile Include="src\XLib\Display.cs" />
+    <Compile Include="src\XLib\NativeMethods.cs" />
+    <Compile Include="src\XLib\Window.cs" />
+    <Compile Include="src\XLib\X11Structs.cs" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Folder Include="src\rsvg\" />
     <Folder Include="src\IML\" />
     <Folder Include="Icons\" />
+    <Folder Include="src\XLib\" />
   </ItemGroup>
   <ItemGroup>
     <EmbeddedResource Include="Images\Icons\updown.svg" />
index 4d3e4799a67c4b3fde83e9f15040bd191ec63be1..dc694b6b8f838a325aa791327d9bc651fe8a5e48 100644 (file)
--- a/Crow.sln
+++ b/Crow.sln
@@ -5,8 +5,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow", "Crow.csproj", "{C29
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{74289092-9F70-4941-AFCB-DFD7BE2140B6}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Test", "Crow.Test\Crow.Test.csproj", "{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrowIDE", "CrowIDE\CrowIDE.csproj", "{B6D911CD-1D09-42FC-B300-9187190F2AE1}"
 EndProject
 Global
@@ -15,8 +13,6 @@ Global
                Release|Any CPU = Release|Any CPU
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
index 1cae7289c95a09b3ad0899e9c7a0ef6902841203..8cb90b0c3e509a0f2128f4fc56f7d36a6e057bd0 100644 (file)
     <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
+  <PropertyGroup Condition=" '$(RunConfiguration)' == 'Custom Command' ">
+    <StartAction>Program</StartAction>
+    <StartProgram>%24{TargetName}</StartProgram>
+    <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
     <Reference Include="System.Drawing" />
-    <Reference Include="OpenTK">
-      <HintPath>$(SolutionDir)packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
-    </Reference>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
     <Compile Include="src\Solution.cs" />
     <Compile Include="src\Project.cs" />
     <Compile Include="src\VerticalLine.cs" />
-    <Compile Include="..\Tests\OpenGL\Extensions.cs">
-      <Link>src\OpenGL\Extensions.cs</Link>
-    </Compile>
-    <Compile Include="..\Tests\OpenGL\Shader.cs">
-      <Link>src\OpenGL\Shader.cs</Link>
-    </Compile>
-    <Compile Include="..\Tests\OpenGL\Texture.cs">
-      <Link>src\OpenGL\Texture.cs</Link>
-    </Compile>
-    <Compile Include="..\Tests\OpenGL\vaoMesh.cs">
-      <Link>src\OpenGL\vaoMesh.cs</Link>
-    </Compile>
-    <Compile Include="..\Tests\CrowWindow.cs">
-      <Link>src\CrowWindow.cs</Link>
-    </Compile>
-    <Compile Include="..\Tests\InterfaceControler.cs">
-      <Link>src\InterfaceControler.cs</Link>
-    </Compile>
     <Compile Include="src\DesignInterface.cs" />
     <Compile Include="src\SolutionControler.cs" />
     <Compile Include="src\INetProject.cs" />
diff --git a/CrowIDE/packages.config b/CrowIDE/packages.config
deleted file mode 100644 (file)
index b371766..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="OpenTK" version="2.0.0" targetFramework="net45" />
-</packages>
\ No newline at end of file
index 46a926e348b73211cbc1a4344227831e321975c2..0ee5844dae6a28ceb3bc37f845431eebe254b69a 100644 (file)
@@ -20,8 +20,6 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
 using Crow;
 using System.Reflection;
 using System.Collections.Generic;
@@ -36,7 +34,7 @@ using System.Threading;
 
 namespace Crow.Coding
 {
-       class CrowIDE : CrowWindow
+       class CrowIDE : Interface
        {
                public Command CMDNew, CMDOpen, CMDSave, CMDSaveAs, cmdCloseSolution, CMDQuit,
                CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDHelp,
@@ -50,12 +48,12 @@ namespace Crow.Coding
                        CMDOpen = new Command(new Action(() => openFileDialog())) { Caption = "Open...", Icon = new SvgPicture("#Crow.Coding.ui.icons.outbox.svg")};
                        CMDSave = new Command(new Action(() => saveFileDialog())) { Caption = "Save", Icon = new SvgPicture("#Crow.Coding.ui.icons.inbox.svg"), CanExecute = false};
                        CMDSaveAs = new Command(new Action(() => saveFileDialog())) { Caption = "Save As...", Icon = new SvgPicture("#Crow.Coding.ui.icons.inbox.svg"), CanExecute = false};
-                       CMDQuit = new Command(new Action(() => Quit (null, null))) { Caption = "Quit", Icon = new SvgPicture("#Crow.Coding.ui.icons.sign-out.svg")};
+                       //CMDQuit = new Command(new Action(() => Quit (null, null))) { Caption = "Quit", Icon = new SvgPicture("#Crow.Coding.ui.icons.sign-out.svg")};
                        CMDUndo = new Command(new Action(() => undo())) { Caption = "Undo", Icon = new SvgPicture("#Crow.Coding.icons.undo.svg"), CanExecute = false};
                        CMDRedo = new Command(new Action(() => redo())) { Caption = "Redo", Icon = new SvgPicture("#Crow.Coding.icons.redo.svg"), CanExecute = false};
-                       CMDCut = new Command(new Action(() => Quit (null, null))) { Caption = "Cut", Icon = new SvgPicture("#Crow.Coding.icons.scissors.svg"), CanExecute = false};
-                       CMDCopy = new Command(new Action(() => Quit (null, null))) { Caption = "Copy", Icon = new SvgPicture("#Crow.Coding.icons.copy-file.svg"), CanExecute = false};
-                       CMDPaste = new Command(new Action(() => Quit (null, null))) { Caption = "Paste", Icon = new SvgPicture("#Crow.Coding.icons.paste-on-document.svg"), CanExecute = false};
+                       //CMDCut = new Command(new Action(() => Quit (null, null))) { Caption = "Cut", Icon = new SvgPicture("#Crow.Coding.icons.scissors.svg"), CanExecute = false};
+                       //CMDCopy = new Command(new Action(() => Quit (null, null))) { Caption = "Copy", Icon = new SvgPicture("#Crow.Coding.icons.copy-file.svg"), CanExecute = false};
+                       //CMDPaste = new Command(new Action(() => Quit (null, null))) { Caption = "Paste", Icon = new SvgPicture("#Crow.Coding.icons.paste-on-document.svg"), CanExecute = false};
                        CMDHelp = new Command(new Action(() => System.Diagnostics.Debug.WriteLine("help"))) { Caption = "Help", Icon = new SvgPicture("#Crow.Coding.icons.question.svg")};
                        CMDOptions = new Command(new Action(() => loadWindow("#Crow.Coding.ui.Options.crow"))) { Caption = "Editor Options", Icon = new SvgPicture("#Crow.Coding.icons.tools.svg")};
 
@@ -106,13 +104,20 @@ namespace Crow.Coding
                [STAThread]
                static void Main ()
                {
-                       CrowIDE win = new CrowIDE ();
-                       MainWin = win;
-                       win.Run (30);
+                       using (CrowIDE app = new CrowIDE ()) {
+                               MainIFace = app;
+
+                               app.initIde ();
+
+                               while (true) {
+                                       
+                                       Thread.Sleep(10);
+                               }
+                       }
                }
 
                public CrowIDE ()
-                       : base(1024, 800,"UIEditor")
+                       : base(1024, 800)
                {                       
                }
 
@@ -124,21 +129,12 @@ namespace Crow.Coding
                public static Interface MainIFace;
                public static CrowIDE MainWin;
 
-               protected override void OnLoad (EventArgs e)
-               {
-                       base.OnLoad (e);
-
+               void initIde() {
                        initCommands ();
 
-                       this.KeyDown += CrowIDE_KeyDown;
-
-                       //this.CrowInterface.LoadInterface ("#Crow.Coding.ui.imlEditor.crow").DataSource = this;
-                       //GraphicObject go = this.CrowInterface.LoadInterface (@"ui/test.crow");
                        GraphicObject go = AddWidget (@"#Crow.Coding.ui.CrowIDE.crow");
                        go.DataSource = this;
 
-                       MainIFace = ifaceControl[0].CrowInterface;
-
                        mainDock = go.FindByName ("mainDock") as DockStack;
 
                        if (ReopenLastSolution && !string.IsNullOrEmpty (LastOpenSolution)) {
@@ -249,40 +245,6 @@ namespace Crow.Coding
                        }                               
                }
 
-               void CrowIDE_KeyDown (object sender, OpenTK.Input.KeyboardKeyEventArgs e)
-               {
-//                     if (e.Key == OpenTK.Input.Key.Escape) {
-//                             Quit (null, null);
-//                     } else
-                       if (e.Key == OpenTK.Input.Key.F5) {
-                               try {
-                                       CurrentSolution.StartupProject.Compile ();      
-                               } catch (Exception ex) {
-                                       Console.WriteLine (ex.ToString ());
-                               }
-
-                       }// else if (e.Key == OpenTK.Input.Key.F6) {
-//                             loadWindow ("#Crow.Coding.ui.LQIsExplorer.crow");
-//                     } else if (e.Key == OpenTK.Input.Key.F7) {
-//                             loadWindow ("#Crow.Coding.ui.CSProjExplorer.crow");
-//                     }
-               }
-//             DockWindow loadDockWindow(string path){
-//                     lock (MainIFace.UpdateMutex) {
-//                             GraphicObject g = MainIFace.FindByName (path);
-//                             if (g == null){
-//                                     try {                                   
-//                                                     g = MainIFace.Load (path);
-//                                                     mainDock.AddChild (g);
-//                                                     g.Name = path;
-//                                                     g.DataSource = CurrentSolution;
-//                                     } catch (Exception ex) {
-//                                             System.Diagnostics.Debug.WriteLine (ex.ToString ());
-//                                     }
-//                             }
-//                             return g as DockWindow;
-//                     }
-//             }
                Window loadWindow(string path, object dataSource = null){
                        try {
                                GraphicObject g = MainIFace.FindByName (path);
index 04666b110a7487c904b4c0bf32f269d9ce8a6f07..ff4944e83f611fa9ceff88e7427f24da55453a76 100644 (file)
@@ -59,6 +59,27 @@ namespace Crow.Coding
 
                public ProjectFile ProjFile;
 
+
+               protected override void initX ()
+               {
+                       surf = CrowIDE.MainIFace.surf.CreateSimilar (Cairo.Content.ColorAlpha, 100, 100);
+                       //base.initX ();
+               }
+               public override void ProcessResize (Rectangle bounds)
+               {
+                       lock (UpdateMutex) {
+                               clientRectangle = bounds;
+                               surf.Dispose ();
+                               surf = CrowIDE.MainIFace.surf.CreateSimilar (Cairo.Content.ColorAlpha, clientRectangle.Width, clientRectangle.Height);
+
+
+                               foreach (GraphicObject g in GraphicTree)
+                                       g.RegisterForLayouting (LayoutingType.All);
+
+                               RegisterClip (clientRectangle);
+                       }
+
+               }
                public override GraphicObject Load (string path)
                {
                        ProjectFile pi;
index 6b7234dc23131c7cf8c0e523bfc19cff30b97e5b..86e1850e48c1d8d262dd2f8a9de34e74351c73fd 100644 (file)
@@ -230,7 +230,7 @@ namespace Crow.Text
                                }
                        }
                }
-               [DefaultValue("BlueGray")]
+               [DefaultValue("BlueGrey")]
                public virtual Color SelectionBackground {
                        get { return selBackground; }
                        set {
index b1759fbc93dec010d30279727ffd890623bbedc8..ee2c215707ea3c0e38338ecb2bfd6be8eead2ea2 100644 (file)
@@ -419,11 +419,8 @@ namespace Crow.Coding
                        }
 
                        lock (imlVE.RenderMutex) {
-                               using (Cairo.Surface surf = new Cairo.ImageSurface (imlVE.bmp, Cairo.Format.Argb32,
-                                       imlVE.ClientRectangle.Width, imlVE.ClientRectangle.Height, imlVE.ClientRectangle.Width * 4)) {
-                                       gr.SetSourceSurface (surf, cb.Left, cb.Top);
-                                       gr.Paint ();
-                               }
+                               gr.SetSourceSurface (imlVE.surf, cb.Left, cb.Top);
+                               gr.Paint ();
                                imlVE.IsDirty = false;
                        }
                        if (Error == null) {
@@ -557,7 +554,7 @@ namespace Crow.Coding
 
                        //                              hr.Inflate (2);
                        //gr.SetDash (new double[]{ 1.0, 4.0 }, 0.0);
-                       //gr.SetSourceColor (Color.Gray);
+                       //gr.SetSourceColor (Color.Grey);
 //                     gr.Rectangle (hr,coteStroke);
 //                     gr.Stroke ();
                        gr.Operator = Operator.Over;                    
index 4234a6835f639a58c121ea62daff1d9b0e3d397f..056e40940aa8b716d73f8e0871e54669a5a3a395 100644 (file)
@@ -47,7 +47,7 @@ namespace Crow.Coding
                #region CTOR
                public SourceEditor (): base()
                {
-                       formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.DarkSlateGray, Color.Transparent));
+                       formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.DarkSlateGrey, Color.Transparent));
                        formatting.Add ((int)XMLParser.TokenType.ElementName, new TextFormatting (Color.DarkBlue, Color.Transparent));
                        formatting.Add ((int)XMLParser.TokenType.ElementStart, new TextFormatting (Color.Black, Color.Transparent));
                        formatting.Add ((int)XMLParser.TokenType.ElementEnd, new TextFormatting (Color.Black, Color.Transparent));
@@ -58,8 +58,8 @@ namespace Crow.Coding
                        formatting.Add ((int)XMLParser.TokenType.AttributeValue, new TextFormatting (Color.FireBrick, Color.Transparent, false, true));
                        formatting.Add ((int)XMLParser.TokenType.XMLDecl, new TextFormatting (Color.ForestGreen, Color.Transparent));
 
-                       formatting.Add ((int)BufferParser.TokenType.BlockComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
-                       formatting.Add ((int)BufferParser.TokenType.LineComment, new TextFormatting (Color.Gray, Color.Transparent, false, true));
+                       formatting.Add ((int)BufferParser.TokenType.BlockComment, new TextFormatting (Color.Grey, Color.Transparent, false, true));
+                       formatting.Add ((int)BufferParser.TokenType.LineComment, new TextFormatting (Color.Grey, Color.Transparent, false, true));
                        formatting.Add ((int)BufferParser.TokenType.OperatorOrPunctuation, new TextFormatting (Color.Black, Color.Transparent));
                        formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.Teal, Color.Transparent));
                        //formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent));
@@ -554,7 +554,7 @@ namespace Crow.Coding
                        double y = cb.Y + (fe.Ascent+fe.Descent) * i, x = cb.X;
 
                        //Draw line numbering
-                       Color mgFg = Color.Gray;
+                       Color mgFg = Color.Grey;
                        Color mgBg = Color.White;
                        if (PrintLineNumbers){
                                Rectangle mgR = new Rectangle ((int)x, (int)y, leftMargin - leftMarginGap, (int)Math.Ceiling((fe.Ascent+fe.Descent)));
@@ -563,10 +563,10 @@ namespace Crow.Coding
                                        if (buffer.CurrentLine == lineIndex)
                                                mgFg = Color.White;
                                        else
-                                               mgFg = Color.LightGray;
+                                               mgFg = Color.LightGrey;
                                }else if (buffer.CurrentLine == lineIndex) {
                                        mgFg = Color.Black;
-                                       mgBg = Color.DarkGray;
+                                       mgBg = Color.DarkGrey;
                                }
                                string strLN = (lineIndex+1).ToString ();
                                gr.SetSourceColor (mgBg);
@@ -614,7 +614,7 @@ namespace Crow.Coding
                                        closingNode = false;
                                }
                                gr.SetDash (new double[]{ 1.5 },0.0);
-                               gr.SetSourceColor (Color.Gray);
+                               gr.SetSourceColor (Color.Grey);
                                gr.Stroke ();
                                gr.SetDash (new double[]{}, 0.0);
 
@@ -901,7 +901,7 @@ namespace Crow.Coding
                }
                void updateHoverLine () {
                        int hvl = (int)Math.Max (0, Math.Floor (mouseLocalPos.Y / (fe.Ascent+fe.Descent)));
-                       hvl = Math.Min (PrintedLines.Count, hvl);
+                       hvl = Math.Min (PrintedLines.Count-1, hvl);
                        HoverLine = buffer.IndexOf (PrintedLines[hvl]);
                }
                void updateCurrentPosFromMouseLocalPos(){                       
index c2dc28997a4b94ce0a0d243e301cf7729f386915..b4e54f6bab70d393f16b934b5bc0dea0d12f8605 100644 (file)
@@ -177,7 +177,7 @@ namespace Crow.Coding
 
 
                public Fill LabForeground {
-                       get { return IsSetByIML ? Color.DarkBlue : HasStyling ? Color.Black : Color.DimGray;}
+                       get { return IsSetByIML ? Color.DarkBlue : HasStyling ? Color.Black : Color.DimGrey;}
                }
 
                /// <summary>
index 55bf380b3c069af6d719384816023231c07b625f..f546492d905520a10cabfcefa0ce00f60d2923d2 100755 (executable)
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
-<Expandable Caption="{Name}" IsExpanded="{IsExpanded}" Background="Gray" Foreground="Black">
+<Expandable Caption="{Name}" IsExpanded="{IsExpanded}" Background="Grey" Foreground="Black">
        <Template>
                <VerticalStack>
-                       <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand" Background="Gray">
+                       <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand" Background="Grey">
                                <Container Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
-                                                                                                                       MouseEnter="{Background=LightGray}"
+                                                                                                                       MouseEnter="{Background=LightGrey}"
                                                                                                                        MouseLeave="{Background=Transparent}">
                                        <Image
                                                Path="#Crow.Images.Icons.expandable.svg"
index bd38532df38da26e2d136ac2de0deff5d1052a22..38e6b7bf94b35439b50d85e5b8219d5c9764543c 100644 (file)
@@ -2,7 +2,7 @@
 <MenuItem MinimumSize="20,20" Height="Fit" Width="160" Caption="Context Menu" Data="{ContextCommands}" Orientation="Vertical"
        IsOpened ="true" Visible="{/IsOpened}" SelectionBackground="Transparent">
        <Template>              
-               <Border Background="DimGray" Foreground="Black" CornerRadius="2">
+               <Border Background="DimGrey" Foreground="Black" CornerRadius="2">
                        <GenericStack Orientation="{./Orientation}" Name="ItemsContainer" Margin="2"/>
                </Border>               
        </Template>
                                        <Template>
                                                <Border Name="border1"
                                                                CornerRadius="0"
-                                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                                MouseLeave="{Foreground=Transparent}"
-                                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
-                                                               MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+                                                               MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                                MinimumSize = "60,0"
                                                                Foreground="Transparent"
                                                                Background="{./Background}">
@@ -31,7 +31,7 @@
                                                                </HorizontalStack>
                                                </Border>
                                        </Template>
-                                       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGray">
+                                       <Border Foreground="DimGrey" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGrey">
                                                <VerticalStack Name="ItemsContainer"/>
                                        </Border>
                                </Popper>
index d721ac361b1c98de27c052c3221aac1b62b815bc..1246e8c4de1e7f6f0d7f949bde102d084ad27ea9 100644 (file)
@@ -43,7 +43,7 @@
                        <DockStack Name="mainDock"/>
 <!--                   <DockWindow DataSource="{CurrentSolution}" Name="winEditor" Caption="Edit View" Width="70%" Height="80%">
                                <Template>
-                                       <Border BorderWidth="1" Foreground="DimGray" CornerRadius="{./CornerRadius}"
+                                       <Border BorderWidth="1" Foreground="DimGrey" CornerRadius="{./CornerRadius}"
                                                                        Background="{./Background}"
                                                                        MouseEnter="./onBorderMouseEnter"
                                                                        MouseLeave="./onBorderMouseLeave">
index a0ae10b30b1c3b38aa593ba1c7f0f5ebc7589136..614e8e7a742e8ffccc1f51213b3c1f5ddfb96dfd 100644 (file)
@@ -4,16 +4,16 @@
                <VerticalStack>
                        <Border CornerRadius="2" Margin="0" Height="Fit" MouseDoubleClick="./onClickForExpand"                                          
                                        Foreground="Transparent"
-                                       MouseEnter="{Foreground=DimGray}"
+                                       MouseEnter="{Foreground=DimGrey}"
                                        MouseLeave="{Foreground=Transparent}">
                                <HorizontalStack Spacing="1">
                                        <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
                                                Path="{./Image}"
                                                Visible="{./IsExpandable}"
                                                SvgSub="{./IsExpanded}"
-                                               MouseEnter="{Background=LightGray}"
+                                               MouseEnter="{Background=LightGrey}"
                                                MouseLeave="{Background=Transparent}"/>
-                                       <Border Width="16" Height="16" Foreground="Black" Background="DimGray">
+                                       <Border Width="16" Height="16" Foreground="Black" Background="DimGrey">
                                                <Image Margin="2" Path="{GetIcon}" />
                                        </Border>
                                        <Label Text="{./Caption}"/>
index 5a4ce8cff3f91d91408ca951930ccad8cbae14bc..caf46cbc3930e256e852a92059fffe4ea9979792 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <Border BorderWidth="1" Foreground="Black" CornerRadius="10"
-                               Background="Gray"
+                               Background="Grey"
                                MouseEnter="./onBorderMouseEnter"
                                MouseLeave="./onBorderMouseLeave">
        <VerticalStack Spacing="0">
index 9e1e43b4403f7a8eeac98c7147d894bbafdf2b57..0729a3871be2c560ec7885afbd7665380d6579a2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <Border Background="{./Background}" Name="Content"
        Foreground="Transparent" CornerRadius="{./CornerRadius}" BorderWidth="1"
-       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}">
+       MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+       MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}">
        <Image Path="{./Caption}" Margin="2" Width="20" Height="20" />
 </Border>
index 10fa5ceda060bf02afbb6ef3b51af26630366614..fb9d2f0df76a2e6bd05813c1e7a980c062e1bbd5 100644 (file)
@@ -8,7 +8,7 @@
                                <Border Width="Stretched" Focusable="true" Foreground="Transparent">
                                        <HorizontalStack Spacing="5">
                                                <GraphicObject Width="5" Height="5"/>
-                                               <Border Width="16" Height="16" Foreground="Black" Background="DimGray">
+                                               <Border Width="16" Height="16" Foreground="Black" Background="DimGrey">
                                                        <Image Margin="2" Path="{GetIcon}" />
                                                </Border>
                                                <Label Text="{Name}" Width="Stretched"/>
index 6c755c3a8b0bcba7b8e12706a463c44967d53c87..615488e8a0f5d0ee5aaefcb9534f2d9201444fa0 100644 (file)
@@ -7,7 +7,7 @@
                <ItemTemplate>
                        <Container Fit="true" Focusable="true" Tooltip="{DisplayName}" Margin="2" AllowDrag="true"
                                StartDrag="onStartDrag" EndDrag="onEndDrag" Drop="onDrop">
-                               <Border Foreground="Black" Background="DimGray" Margin="0" BorderWidth="1"
+                               <Border Foreground="Black" Background="DimGrey" Margin="0" BorderWidth="1"
                                        MouseEnter="{Foreground=White}"
                                        MouseLeave="{Foreground=Black}">
                                        <Image Path="{IconPath}" Margin="3"  Width="20" Height="20" />
index 22387808ee70097a96bc26ee6e87a4deaf9d74e9..5afbaf7d8eb2ac439cfcaa3bef45ce4a52ec2125 100644 (file)
@@ -42,7 +42,7 @@ TreeItemBorder {
        Height="Fit";
        Width="Stretched";
        Foreground="Transparent";
-       MouseEnter="{Foreground=DimGray}";
+       MouseEnter="{Foreground=DimGrey}";
        MouseLeave="{Foreground=Transparent}";
 }
 TreeIcon {
index 701217c73c49f93c1138a40a859295154322d2ed..efd9e4363fc83ed8e1343fd1b1416570f9c30fbf 100755 (executable)
@@ -8,7 +8,7 @@
                                <Template>
                                        <CheckBox Caption="{./Caption}" IsChecked="{²./IsPopped}" Foreground="{./Foreground}" Background="{./Background}">
                                                <Template>
-                                                       <Border CornerRadius="0" Foreground="LightGray" Background="White">
+                                                       <Border CornerRadius="0" Foreground="LightGrey" Background="White">
                                                                <HorizontalStack Margin="0" Spacing="1">
                                                                        <Label Width="Stretched" MinimumSize="80,10" Margin="1" Foreground = "{LabForeground}" Background="White"
                                                                                Text="{../../../../../SelectedItem}"/>
index b0bd671d2d449daa48eac4d099f013a699d1ac67..56d4a4d4ccfe8aaf891507ac847e762e00d0a6ee 100755 (executable)
@@ -14,6 +14,6 @@
                                </Template>
                        </CheckBox>
                </Template>
-               <ColorPicker SelectedColor="{²Value}" Background="DimGray" Margin="5" Fit="True" />
+               <ColorPicker SelectedColor="{²Value}" Background="DimGrey" Margin="5" Fit="True" />
        </Popper>
 </HorizontalStack>
\ No newline at end of file
index a3317e47b105ddb81060d7f216d3bf3c5c23f416..b78cfc04f630c937a9b65f548f0f164b7a2416a1 100644 (file)
@@ -1,15 +1,15 @@
 <?xml version="1.0"?>
-<Window Width="50%" Height="50%" Background="DimGray">
+<Window Width="50%" Height="50%" Background="DimGrey">
        <TreeView IsRoot="true" Name="treeView" Data="{LQIs}">
                <ItemTemplate DataType="Crow.LayoutingQueueItem" Data="triggeredLQIs">
                        <Expandable>
                                <Template>
                                        <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
-                                               <VerticalStack Fit="true" Margin="3" Background="DimGray"
+                                               <VerticalStack Fit="true" Margin="3" Background="DimGrey"
                                                                HorizontalAlignment="Left"
                                                                MouseEnter="{Background=hgradient|0:RoyalBlue|1:Transparent}"
-                                                               MouseLeave="{Background=DimGray}">
-                                                       <Label Text="{FullName}" Font="droid, 8" Background="LightGray" Foreground="Black"/>
+                                                               MouseLeave="{Background=DimGrey}">
+                                                       <Label Text="{FullName}" Font="droid, 8" Background="LightGrey" Foreground="Black"/>
                                                        <HorizontalStack Fit="true" Spacing="10">
                                                                <Label Text="{LayoutingTries}" Foreground="SkyBlue"/>
                                                                <Label Text="{DiscardCount}" Foreground="Red"/>
index 97ee0272b3823eb6c54905f6fd5eda5f783b7c30..2fc29369ac091c1e916a45da9906461ebd8be240 100644 (file)
@@ -6,10 +6,10 @@
                <CheckBox IsChecked="{²./IsPopped}" Caption="{./Caption}" Background="{./Background}" Foreground="{./Foreground}">
                        <Template>
                                <Border Name="border1"
-                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                MouseLeave="{Foreground=Transparent}"
-                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
-                                               MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+                                               MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                MinimumSize = "40,0"
                                                Foreground="Transparent"
                                                Background="{./Background}">
@@ -23,7 +23,7 @@
                        </Template>
                </CheckBox>
        </Template>
-       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Jet">
+       <Border Foreground="DimGrey" Width="{../PopWidth}" Height="{../PopHeight}" Background="Jet">
                <VerticalStack Name="ItemsContainer"/>
        </Border>
 </Popper>
index 4f0443ba3611e400a8d75cb59c0f347dfc17a14d..7d401e059d66fddfd052b9ac1f720a6d754f3132 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Window Caption="Crow IDE Options" Width="80%" Height="70%" Background="DimGray" Modal="true">
+<Window Caption="Crow IDE Options" Width="80%" Height="70%" Background="DimGrey" Modal="true">
        <TabView>
                <TabItem Caption="IML Visual Editor">
                        <VerticalStack Margin="10">
index e3aa462a270f22252415f6397f5cecb6657271cd..6b6422f9562373eecce6c572163e36e8720c2aef 100644 (file)
@@ -12,7 +12,7 @@
                                                        Path="{./Image}"
                                                        Visible="{./IsExpandable}"
                                                        SvgSub="{./IsExpanded}"
-                                                       MouseEnter="{Background=LightGray}"
+                                                       MouseEnter="{Background=LightGrey}"
                                                        MouseLeave="{Background=Transparent}"/>
                                                <Image Style="TreeIcon"
                                                        Path="#Crow.Icons.crowproj.svg"/>
index 00dd14c523678168d552c75031f4f196606b0e1d..66caeb0ca9fc85f0bfc39be76831e727dd2803ed 100644 (file)
@@ -2,13 +2,13 @@
 <GenericStack Orientation="Vertical" Spacing="0"
                Background="Onyx"
                MouseEnter="{caption.Foreground=White}"
-               MouseLeave="{caption.Foreground=Gray}">
+               MouseLeave="{caption.Foreground=Grey}">
        <HorizontalStack Margin="2" Left="{./TabOffset}"
                Name="TabTitle"
                HorizontalAlignment="Left"
                Height="{./TabHeight}"
                Width="{./TabWidth}">
-               <Label Name="caption" Text="{./Caption}" Foreground="Gray" Width="Stretched"/>
+               <Label Name="caption" Text="{./Caption}" Foreground="Grey" Width="Stretched"/>
                <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"
index c69cbf4b50304f81bbcfb7705b12ef2a233f552c..04313b1478c46febca84c75bdbb9df62787d2060 100644 (file)
@@ -6,7 +6,7 @@
                                Path="{./Image}"
                                Visible="{./IsExpandable}"
                                SvgSub="{./IsExpanded}"
-                               MouseEnter="{Background=LightGray}"
+                               MouseEnter="{Background=LightGrey}"
                                MouseLeave="{Background=Transparent}"/>
                        <Image Style="TreeIcon"
                                Path="#Crow.Coding.icons.folder.svg" SvgSub="{./IsExpanded}"/>
index 84f391cfce1a1613c0cb87f5edfee314a6ac8f83..290a9c6f214250d435dff7df9e0bb2b425fc7d26 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <TabItem Caption="{DisplayName}" QueryClose="OnQueryClose">
        <VerticalStack>
-               <HorizontalStack Height="Fit" Margin="2" Background="DimGray" Spacing="5">
+               <HorizontalStack Height="Fit" Margin="2" Background="DimGrey" Spacing="5">
                        <HorizontalStack Width="Fit" Spacing="1">
                                <Label Text="Design Size:"/>
                                <TextBox Text="{²../../../editor.DesignWidth}" Width="40" TextAlignment="Right"/>
@@ -23,7 +23,7 @@
                <VerticalStack Height="60%" Width="Stretched" Margin="0" MinimumSize="10,10">
                        <HorizontalStack>
                                <Scroller Name="scroller1" Margin="2" >
-                                       <ImlVisualEditor  Foreground="SkyBlue" Name="editor" Background="Gray"                                          
+                                       <ImlVisualEditor  Foreground="SkyBlue" Name="editor" Background="Grey"                                          
                                                VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10"
                                                Width="512" Height="512" ContextCommands="{/Commands}"
                                                AllowDrop="true" AllowDrag="true" Focusable="true"
index 6255c96afa9cbe46fd18349fe739b5884bd3eb4b..980c68fcf9736de7d497b85ce1df16c266971175 100644 (file)
        <HorizontalStack Height="Fit">
                <Label Text="{../../editor.HoverError}" Width="Stretched"/>
                <GraphicObject Background="Red" Width="5" Height="5" Visible="{IsDirty}"/>
-               <Label Text="Hover Line:" Foreground="Gray"/>
+               <Label Text="Hover Line:" Foreground="Grey"/>
                <Label Text="{../../editor.HoverLine}"/>
                <GraphicObject Height="5" Width="10"/>
-               <Label Text="Line:" Foreground="Gray"/>
+               <Label Text="Line:" Foreground="Grey"/>
                <Label Text="{CurrentLine}"/>
                <GraphicObject Height="5" Width="10"/>
-               <Label Text="column:" Foreground="Gray"/>
+               <Label Text="column:" Foreground="Grey"/>
                <Label Text="{CurrentColumn}"/>
                <GraphicObject Height="5" Width="10"/>
-               <Label Text="ScrollX:" Foreground="Gray"/>
+               <Label Text="ScrollX:" Foreground="Grey"/>
                <Label Text="{../../editor.ScrollX}"/>
        </HorizontalStack>
 </VerticalStack>
index 3763702c4e4a5947ea7916a7d9683b062ca26b2f..582ba2bf0c91465871d495d0e44213ba042637ad 100644 (file)
@@ -3,7 +3,7 @@
        <HorizontalStack >
                <TextEditor Focusable="true" Name="editor" Font="monospace, 12" VerticalAlignment="Top" Margin="1"
                                CurrentLine="{²CurrentLine}" CurrentColumn="{²CurrentColumn}"
-                               Foreground="DimGray" Background="White" Width="Stretched" Height="Stretched"
+                               Foreground="DimGrey" Background="White" Width="Stretched" Height="Stretched"
                                ProjectNode="{}"  KeyDown="textView_KeyDown"/>
                <ScrollBar Name="scrollbarY" Value="{²../editor.ScrollY}"
                                   LargeIncrement="{../editor.VisibleLines}"
        <HorizontalStack Height="Fit">
                <GraphicObject Height="5" Width="Stretched"/>
                <GraphicObject Background="Red" Width="5" Height="5" Visible="{IsDirty}"/>
-               <Label Text="Line:" Foreground="Gray"/>
+               <Label Text="Line:" Foreground="Grey"/>
                <Label Text="{CurrentLine}"/>
                <GraphicObject Height="5" Width="10"/>
-               <Label Text="column:" Foreground="Gray"/>
+               <Label Text="column:" Foreground="Grey"/>
                <Label Text="{CurrentColumn}"/>
                <GraphicObject Height="5" Width="10"/>
-               <Label Text="ScrollX:" Foreground="Gray"/>
+               <Label Text="ScrollX:" Foreground="Grey"/>
                <Label Text="{../../editor.ScrollX}"/>
        </HorizontalStack>
 </VerticalStack>
index a310d9b48dea502e3d4e92141676ec2f5df46dc4..37d4bdd1ae2812fbeeab668ce15dd81f568f994b 100644 (file)
@@ -1,4 +1,4 @@
-<Container Margin="20" Background="DimGray">
+<Container Margin="20" Background="DimGrey">
        <ImlVisualEditor Width="80%" Height="80%" Margin="0" MinimumSize="10,10" Foreground="SkyBlue"
-                       Name="crowContainer" Background="DimGray"/>
+                       Name="crowContainer" Background="DimGrey"/>
 </Container>
index 5b36bc2d9275d1d4629191d1052571d2f53a78c8..29b5edeaa653e5a6b56f0ceea41d66d2d83b10c4 100644 (file)
@@ -4,7 +4,7 @@ MessageBox, Popper, Slider, Spinner, TextBox {
        Height = "Fit";
 }
 Border {
-       Foreground = "Gray";
+       Foreground = "Grey";
 }
 CheckBox { Caption = "CheckBox"; }
 RadioButton { Caption = "RadioButton"; }
@@ -14,13 +14,13 @@ GroupBox { Caption = "Group Box"; }
 
 ControlBorder {
        BorderWidth     = "1";
-       Foreground  = "DimGray";
+       Foreground  = "DimGrey";
        Background      = "Transparent";
 }
 ControlCaption {
-       Foreground  = "Gray";
+       Foreground  = "Grey";
        MouseEnter      = "{Foreground=White}";
-       MouseLeave      = "{Foreground=Gray}";
+       MouseLeave      = "{Foreground=Grey}";
 }
 Icon {
        Margin = "1";
@@ -42,7 +42,7 @@ Label {
 }
 Menu {
        Margin = "1";
-       Background = "vgradient|0:DimGray|1:Black";
+       Background = "vgradient|0:DimGrey|1:Black";
        Height = "Fit";
        Width = "Stretched";
        VerticalAlignment = "Top";
@@ -53,9 +53,9 @@ MenuItem {
        Width = "Stretched";
        Height = "Fit";
        Background = "Transparent";
-       Foreground = "LightGray";
+       Foreground = "LightGrey";
        MouseEnter = "{Background = vgradient|0:SteelBlue|1:Jet;Foreground=White;}";
-       MouseLeave = "{Foreground=LightGray;Background=Transparent;}";
+       MouseLeave = "{Foreground=LightGrey;Background=Transparent;}";
        SelectionBackground = "Transparent";
 }
 MessageBox {
@@ -67,18 +67,18 @@ MessageBox {
        AlwaysOnTop = "true";
 }
 Slider {
-       Background = "vgradient|0:Black|0.1:Gray|0.9:Gray|1:LightGray";
-       Foreground = "Gray";
+       Background = "vgradient|0:Black|0.1:Grey|0.9:Grey|1:LightGrey";
+       Foreground = "Grey";
        Height = "10";
        Value="5";
 }
 Splitter {
        Focusable = "true";
        Margin = "1";
-       Background = "Gray";
+       Background = "Grey";
 }
 Spinner {
-       Foreground = "DimGray";
+       Foreground = "DimGrey";
 }
 TabView {
        CacheEnabled = "false";
@@ -89,7 +89,7 @@ TabItem {
        Focusable = "true";
        CacheEnabled = "true";
        //MouseEnter = "{Background = Cobalt;Foreground=White;}";
-       //MouseLeave = "{Foreground=LightGray;Background=Jet;}";
+       //MouseLeave = "{Foreground=LightGrey;Background=Jet;}";
        AllowDrag = "true";
 }
 TextBox {
@@ -186,8 +186,8 @@ TxtInFileDialog {
 CheckBoxAlt {
        Template= "#Crow.Templates.CheckBox2.template";
        Background = "Transparent";
-       Checked="{Background=Gray;Foreground=LightGray;}";
-       Unchecked = "{Background=Transparent;Foreground=DimGray;}";
+       Checked="{Background=Grey;Foreground=LightGrey;}";
+       Unchecked = "{Background=Transparent;Foreground=DimGrey;}";
 }
 
 ArrowBut {
@@ -196,9 +196,9 @@ ArrowBut {
        Width="Fit";
        Focusable="true";
        Foreground="Onyx";
-       Background="hgradient|0:Gray|1:Jet";
+       Background="hgradient|0:Grey|1:Jet";
        MouseDown="{Background=hgradient|0:White|0.4:CornflowerBlue|1:Jet}";
-       MouseUp="{Background=hgradient|0:Gray|1:DimGray}";
+       MouseUp="{Background=hgradient|0:Grey|1:DimGrey}";
        MouseEnter="{Foreground=Black}";
        MouseLeave="{Foreground=Onyx}";
 }
@@ -208,9 +208,9 @@ HArrowBut {
        Width="Fit";
        Focusable="true";
        Foreground="Jet";
-       Background="vgradient|0:Gray|1:DimGray";
+       Background="vgradient|0:Grey|1:DimGrey";
        MouseDown="{Background=vgradient|0:White|0.4:DarkBlue|1:Jet}";
-       MouseUp="{Background=vgradient|0:Gray|1:DimGray}";
+       MouseUp="{Background=vgradient|0:Grey|1:DimGrey}";
        MouseEnter="{Foreground=Black}";
-       MouseLeave="{Foreground=DimGray}";
+       MouseLeave="{Foreground=DimGrey}";
 }
\ No newline at end of file
index aa17d2f47de779f18f0bceb6a4a775c76b8f466e..2d3bb29294f492d2e7bd129d87f36a01b914dce3 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <Border Name="Content"
-       Background="vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black" Foreground="DarkGray" 
+       Background="vgradient|0:White|0.1:LightGrey|0.9:LightGrey|1:Black" Foreground="DarkGrey" 
        MouseEnter="{Foreground=White}"
-       MouseLeave="{Foreground=DarkGray}"
-       MouseDown="{Background=vgradient|0:Black|0.1:LightGray|0.9:LightGray|1:White}"
-       MouseUp="{Background=vgradient|0:White|0.1:LightGray|0.9:LightGray|1:Black}"
+       MouseLeave="{Foreground=DarkGrey}"
+       MouseDown="{Background=vgradient|0:Black|0.1:LightGrey|0.9:LightGrey|1:White}"
+       MouseUp="{Background=vgradient|0:White|0.1:LightGrey|0.9:LightGrey|1:Black}"
        >
 </Border>
index 92ddb39cf07c729b61ff496459836b9c3dcb8764..d2f6c602e2ba9d84d71b86ac7e7dc13fe3747de8 100755 (executable)
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <Border Background="{./Background}" MinimumSize="50,20" Name="Content"
        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}"                  
+       MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black;caption.Foreground=White}"
+       MouseLeave="{Foreground=Transparent;caption.Foreground=LightGrey}"
+       MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+       MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"                  
        >
-       <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGray" Text="{./Caption}"/>
+       <Label Font="{./Font}" Name="caption" Margin="3" Foreground="LightGrey" Text="{./Caption}"/>
 </Border>
index db61dd1a676978beb9297e26757dff5f2e2f61a3..0fa0ffefb8011dc114559361ca576d4245188871 100644 (file)
@@ -1,4 +1,4 @@
-<Border Foreground="Transparent" MouseEnter="{Foreground=Gray}" MouseLeave="{Foreground=Transparent}">
+<Border Foreground="Transparent" MouseEnter="{Foreground=Grey}" MouseLeave="{Foreground=Transparent}">
        <Label Font="{./Font}" Text="{./Caption}"
                Margin="1"
                Background="{./Background}"
index 7b7e8392a5e3429a56a595a0e042f787090cad56..a6286a0c839effd34d43d3454ea50939f50850a2 100755 (executable)
@@ -3,7 +3,7 @@
        <Template>
                <CheckBox Caption="{./Caption}" IsChecked="{²./IsPopped}" Foreground="{./Foreground}" Background="{./Background}">
                        <Template>
-                               <Border CornerRadius="0" Foreground="LightGray">
+                               <Border CornerRadius="0" Foreground="LightGrey">
                                        <HorizontalStack Margin="0" Spacing="1">
                                                <TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
                                                        Text="{./Caption}"/>
@@ -16,7 +16,7 @@
                        </Template>
                </CheckBox>
        </Template>
-       <Border Background="DimGray" BorderWidth="1" Margin="1"
+       <Border Background="DimGrey" BorderWidth="1" Margin="1"
                MinimumSize="{../../MinimumPopupSize}" Fit="true">
                <Scroller Name="scroller1" Margin="2" 
                        MaximumSize="0,200"
index 06dbc4b9febb6a6aa3198e75dd53a9d002e21eec..7fc8dcc9cd836d53fa139127e6828f57344de893 100644 (file)
@@ -4,7 +4,7 @@
        Background="Red">
        <Template>
                <HorizontalStack>
-                       <Border Background="DimGray" Foreground="DimGray" CornerRadius="5">
+                       <Border Background="DimGrey" Foreground="DimGrey" CornerRadius="5">
                        <GenericStack Orientation="{./Orientation}" Name="ItemsContainer"
                                Margin="2"/>
                        </Border>
                                        <Template>
                                                <Border Name="border1"
                                                                CornerRadius="2"
-                                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                                MouseLeave="{Foreground=Transparent}"
-                                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
-                                                               MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+                                                               MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                                MinimumSize = "60,0"
                                                                Foreground="Transparent"
                                                                Background="{./Background}">
@@ -32,7 +32,7 @@
                                                                        Font="{./Font}" />
                                                </Border>
                                        </Template>
-                                       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGray">
+                                       <Border Foreground="DimGrey" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGrey">
                                                <VerticalStack Name="ItemsContainer"/>
                                        </Border>
                                </Popper>
index 2e42ae91a79b760f10e5d9dfa8ca720d58f8f99f..9faab17bb76c77c25c5f25ffd938d160f8f776a2 100755 (executable)
@@ -3,7 +3,7 @@
                SelectedItemChanged="./onSelectedItemChanged">
        <ItemTemplate DataType="System.IO.FileInfo">
                <Border CornerRadius="2" Margin="0" Focusable="true"  Height="Fit" Width="Stretched" Foreground="Transparent"
-                               MouseEnter="{Foreground=DimGray}"
+                               MouseEnter="{Foreground=DimGrey}"
                                MouseLeave="{Foreground=Transparent}">
                        <HorizontalStack>
                                <Image Margin="1" Width="14" Height="14"
                                <VerticalStack>
                                        <Border CornerRadius="2" Margin="0" Height="Fit" MouseDoubleClick="./onClickForExpand"
                                                        Foreground="Transparent"
-                                                       MouseEnter="{Foreground=DimGray}"
+                                                       MouseEnter="{Foreground=DimGrey}"
                                                        MouseLeave="{Foreground=Transparent}">
                                                <HorizontalStack Spacing="1">
                                                        <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
                                                                Path="{./Image}"
                                                                Visible="{./IsExpandable}"
                                                                SvgSub="{./IsExpanded}"
-                                                               MouseEnter="{Background=LightGray}"
+                                                               MouseEnter="{Background=LightGrey}"
                                                                MouseLeave="{Background=Transparent}"/>
                                                        <Image Margin="1" Width="14" Height="14"
                                                                Path="#Crow.Icons.folder.svg"/>
index 71685a164843903eee52457318a20c7b31fa83d5..f407502ae1db0328d9279e1477a491faedc1cf8a 100755 (executable)
@@ -5,7 +5,7 @@
                                MouseEnter="./onBorderMouseEnter"
                                MouseLeave="./onBorderMouseLeave">
        <VerticalStack Spacing="0">
-               <HorizontalStack Visible="{./IsDocked}" Height="Fit" Margin="1" Background="Gray">
+               <HorizontalStack Visible="{./IsDocked}" Height="Fit" Margin="1" Background="Grey">
                        <Label  Text="{./Caption}" TextAlignment="Left" Width="Stretched"
                                         Foreground="Black" />
                        <Image Width="10" Height="10" Focusable="true" Margin="0" Path="#Crow.Images.Icons.exit2.svg"
index a36958d554a9ad20b58c4db6cdd1b653f68c8360..20bc8f49221e94307c09faf8644ab4a3dc37f22c 100755 (executable)
@@ -3,7 +3,7 @@
        <VerticalStack>
                <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand">
                        <Container Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
-                                                                                                               MouseEnter="{Background=LightGray}"
+                                                                                                               MouseEnter="{Background=LightGrey}"
                                                                                                                MouseLeave="{Background=Transparent}">
                                <Image
                                        Path="#Crow.Images.Icons.expandable.svg"
index d896e9225f82efb6983c00b79203666bb609fa25..94995c82d484b49474f6d5d501651aae80ba2229 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="DimGray">
+<Border BorderWidth="1" Foreground="DimGrey">
        <GenericStack Orientation="{./Orientation}" Spacing="0">
                <Shape Style="HArrowBut"        MouseDown="./onScrollBack" Path="M 0.5,5.5 L 10.5,0.5 L 10.5,10.5 Z"/>
                <Slider Name="Slider"                   
@@ -10,9 +10,9 @@
                        Height="{./HeightPolicy}" Width="{./WidthPolicy}"
                        LargeIncrement="{./LargeIncrement}"
                        SmallIncrement="{./SmallIncrement}"
-                       CursorColor="vgradient|0:Gray|1:DimGray"
-                       Foreground="DimGray"
-                       Background="vgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
+                       CursorColor="vgradient|0:Grey|1:DimGrey"
+                       Foreground="DimGrey"
+                       Background="vgradient|0:DimGrey|0.1:Grey|0.95:Grey|1:White"/>
                <Shape Style="HArrowBut" MouseDown="./onScrollForth" Path="M 0.5,0.5 L 10.5,5.5 L 0.5,10.5 Z"/>
        </GenericStack>
 </Border>
\ No newline at end of file
index c0a1fbf70c7d5aa9e9bcdc9980948be410ab8f50..2c912fee2be4bc1caa07196a228ddb48232591f8 100644 (file)
@@ -6,10 +6,10 @@
                <CheckBox IsChecked="{²./IsPopped}" Caption="{./Caption}" Background="{./Background}" Foreground="{./Foreground}">
                        <Template>              
                                <Border Name="border1"
-                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                MouseLeave="{Foreground=Transparent}"
-                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
-                                               MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+                                               MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
                                                MinimumSize = "60,0"
                                                Foreground="Transparent"
                                                Background="{./Background}">
@@ -21,7 +21,7 @@
                        </Template>             
                </CheckBox>
        </Template>
-       <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Jet">
+       <Border Foreground="DimGrey" Width="{../PopWidth}" Height="{../PopHeight}" Background="Jet">
                <VerticalStack Name="ItemsContainer"/>
        </Border>
 </Popper>
index 93a09da0faeee840a2516c64e309b60a649b2f5e..c19b5680fb0e2f333c367563f71fc167b8c4db78 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="DimGray">
+<Border BorderWidth="1" Foreground="Black" >
        <GenericStack Orientation="{./Orientation}" Spacing="0">
-               <Shape Style="ArrowBut" MouseDown="./onScrollBack" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"/>
+               <Shape Style="ArrowBut" MouseDown="./onScrollBack" Path="{./ScrollBackShape}"/>
                <Slider Name="Slider"                   
                        Orientation="{./Orientation}"
                        Value="{²./Value}"
@@ -10,9 +10,9 @@
                        Height="{./HeightPolicy}" Width="{./WidthPolicy}"
                        LargeIncrement="{./LargeIncrement}"
                        SmallIncrement="{./SmallIncrement}"
-                       CursorColor="hgradient|0:Gray|1:DimGray"
-                       Foreground="DimGray"
-                       Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/>
+                       CursorColor="hgradient|0:Grey|1:Onyx"
+                       Foreground="DimGrey"
+                       Background="hgradient|0:Grey|1:White"/>
                <Shape Style="ArrowBut" MouseDown="./onScrollForth" Path="M 0.5,0.5 L 10.5,0.5 L 5.5,10.5 Z"/>
        </GenericStack>
 </Border>
\ No newline at end of file
index 55498533207d661da67537e38189e67b0d7656bd..574653ba3a8cc74d6360076939e7158108f5e27d 100644 (file)
@@ -2,13 +2,13 @@
 <GenericStack Orientation="Vertical" Spacing="0"
                Background="{./Background}"
                MouseEnter="{/caption.Foreground=White}"
-               MouseLeave="{/caption.Foreground=Gray}">
+               MouseLeave="{/caption.Foreground=Grey}">
        <HorizontalStack Margin="2" Left="{./TabOffset}"
                Name="TabTitle"
                HorizontalAlignment="Left"
                Height="{./TabHeight}"
                Width="{./TabWidth}">
-               <Label Name="caption" Text="{./Caption}" Foreground="Gray"/>
+               <Label Name="caption" Text="{./Caption}" Foreground="Grey"/>
                <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"
index f8b8c3fc53840003ff95e62cb9cfd9ca2a8833de..277ac7cd0d9eba145d26795177bbabfb7eed67db 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<Border Fit="true" Foreground="DimGray" Background="Khaki">
-       <Label Margin="3" Foreground="DimGray" Multiline="true" Text="{Tooltip}"/>
+<Border Fit="true" Foreground="DimGrey" Background="Khaki">
+       <Label Margin="3" Foreground="DimGrey" Multiline="true" Text="{Tooltip}"/>
 </Border>
index 770d5c2c85df7ded5c97b974e4dc964f66e5e661..7a2991ce3796283024d7d76cd31b6e0607fda631 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
+<Border BorderWidth="1" Foreground="Grey" CornerRadius="{./CornerRadius}"
                                Background="{./Background}"
                                MouseEnter="./onBorderMouseEnter"
                                MouseLeave="./onBorderMouseLeave">
index 5533db56ae0c537950c9262f6adea771ab9926c5..be2b16366d1875359af7edec26b842cf4a42eec3 100644 (file)
-//
-// BasicTests.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
 using System;
+using System.Runtime.InteropServices;
 using Crow;
-using System.Collections.Generic;
-using System.Linq;
-using System.IO;
-using System.Reflection;
-using System.Text;
-using System.Diagnostics;
-
+using System.Threading;
 
-namespace Tests
+namespace tests
 {
-       class BasicTests : CrowWindow
+       class MainClass
        {
-               public BasicTests ()
-                       : base(800, 600,"test: press <F3> to toogle test files")
-               {
-               }
-
-               int idx = 0;
-               string[] testFiles;
-
-               public Version CrowVersion {
-                       get {
-                               return System.Reflection.Assembly.GetAssembly(typeof(GraphicObject)).GetName().Version;
-                       }
-               }
-
-               #region Test values for Binding
-               public List<Crow.Command> Commands;
-               public int intValue = 500;
-               DirectoryInfo curDir = new DirectoryInfo (Path.GetDirectoryName(Assembly.GetEntryAssembly().Location));
-               //DirectoryInfo curDir = new DirectoryInfo (@"/mnt/data/Images");
-               public FileSystemInfo[] CurDirectory {
-                       get { return curDir.GetFileSystemInfos (); }
-               }
-               public int IntValue {
-                       get {
-                               return intValue;
-                       }
-                       set {
-                               intValue = value;
-                               NotifyValueChanged ("IntValue", intValue);
-                       }
-               }
-               void onSpinnerValueChange(object sender, ValueChangeEventArgs e){
-                       if (e.MemberName != "Value")
-                               return;
-                       intValue = Convert.ToInt32(e.NewValue);
-               }
-               void change_alignment(object sender, EventArgs e){
-                       RadioButton rb = sender as RadioButton;
-                       if (rb == null)
-                               return;
-                       NotifyValueChanged ("alignment", Enum.Parse(typeof(Alignment), rb.Caption));
-               }
-               public IList<String> List2 = new List<string>(new string[]
-                       {
-                               "string1",
-                               "string2",
-                               "string3",
-//                             "string4",
-//                             "string5",
-//                             "string6",
-//                             "string7",
-//                             "string8",
-//                             "string8",
-//                             "string8",
-//                             "string8",
-//                             "string8",
-//                             "string8",
-//                             "string9"
-                       }
-               );
-               public IList<String> TestList2 {
-                       set{
-                               List2 = value;
-                               NotifyValueChanged ("TestList2", testList);
-                       }
-                       get { return List2; }
-               }
-               List<Color> testList = Color.ColorDic.Values//.OrderBy(c=>c.Hue)
-                       //.ThenBy(c=>c.Value).ThenBy(c=>c.Saturation)
-                       .ToList();
-               public List<Color> TestList {
-                       set{
-                               testList = value;
-                               NotifyValueChanged ("TestList", testList);
-                       }
-                       get { return testList; }
-               }
-               string curSources = "";
-               public string CurSources {
-                       get { return curSources; }
-                       set {
-                               if (value == curSources)
-                                       return;
-                               curSources = value;
-                               NotifyValueChanged ("CurSources", curSources);
-                       }
-               }
-               bool boolVal = true;
-               public bool BoolVal {
-                       get { return boolVal; }
-                       set {
-                               if (boolVal == value)
-                                       return;
-                               boolVal = value;
-                               NotifyValueChanged ("BoolVal", boolVal);
-                       }
-               }
-
-               #endregion
-
-               void OnClear (object sender, MouseButtonEventArgs e) => TestList = null;
-
-               void OnLoadList (object sender, MouseButtonEventArgs e) => TestList =
-                       Color.ColorDic.Values.OrderBy(c=>c.Hue).ToList();
-
-               void command1(){
-                       Console.WriteLine("command1 triggered");
-               }
-               void command2(){
-                       Console.WriteLine("command2 triggered");
-               }
-               void command3(){
-                       Console.WriteLine("command3 triggered");
-               }
-               void command4(){
-                       Console.WriteLine("command4 triggered");
-               }
-
-               protected override void OnLoad (EventArgs e)
+               public static void Main(string[] args)
                {
-                       base.OnLoad (e);
-//
-//                     foreach (Color c in Color.ColorDic.Values) {
-//                             if (string.IsNullOrEmpty(c.htmlCode))
-//                                     Console.WriteLine ("no htmlcode for {0}", c.Name);
-//                             else if (c.htmlCode.Substring(1) != c.HtmlCode)
-//                                     Console.WriteLine ("{2} orig: {0} comp: {1}",c.htmlCode, c.HtmlCode, c.Name);
-//                     }
-
-
-                       Commands = new List<Crow.Command> (new Crow.Command[] {
-                               new Crow.Command(new Action(() => command1())) { Caption = "command1"},
-                               new Crow.Command(new Action(() => command2())) { Caption = "command2"},
-                               new Crow.Command(new Action(() => command3())) { Caption = "command3"},
-                               new Crow.Command(new Action(() => command4())) { Caption = "command4"},
-                       });
-
-                       this.KeyDown += KeyboardKeyDown1;
-
-                       //testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" };
-                       testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
-                       //testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Stack", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedContainer", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedGroup", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Wrapper", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
-                       testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/DragAndDrop", "*.crow")).ToArray ();
-                       //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Experimental", "*.crow")).ToArray ();
-
-                       Load(testFiles[idx]).DataSource = this;
-
-//                     LoadIMLFragment (@"<DockWindow Width=""150"" Height=""150"" Background=""DarkRed"" />", 0);
-//                     LoadIMLFragment (@"<DockWindow Width=""200"" Height=""150"" Background=""DarkGreen"" />", 0);
-//                     LoadIMLFragment (@"<DockWindow Width=""250"" Height=""150"" Background=""Brown"" />", 0);
-//                     LoadIMLFragment (@"<DockWindow Width=""300"" Height=""150"" Background=""DarkBlue"" />", 0);
-
-
-               }
-               void KeyboardKeyDown1 (object sender, OpenTK.Input.KeyboardKeyEventArgs e)
+                       using (Interface app = new Interface ()) {
+                               //                              XWindow win = new XWindow (app);
+                               //                              win.Show ();
+                               //app.LoadIMLFragment (@"<SimpleGauge Level='40' Margin='5' Background='Jet' Foreground='Grey' Width='30' Height='50%'/>");
+
+                               app.KeyboardKeyDown += App_KeyboardKeyDown;
+
+                               //app.AddWidget (@"Interfaces/Divers/0.crow").DataSource = app;
+                               //app.AddWidget (@"Interfaces/Splitter/1.crow").DataSource = app;
+                               app.AddWidget (@"Interfaces/Container/0.crow").DataSource = app;
+                               //app.AddWidget (@"Interfaces/Divers/colorPicker.crow").DataSource = app;
+                               //app.AddWidget ("Interfaces/Divers/perfMeasures.crow").DataSource = app;
+
+                               while (true) {
+                                       #if MEASURE_TIME
+                                       foreach (PerformanceMeasure m in app.PerfMeasures)
+                                               m.NotifyChanges ();     
+                                       #endif
+                                       Thread.Sleep(10);
+                               }
+                       }
+                       /*using (Display disp = new Display())
+            {
+                Window win = new Window(disp);
+                bool running = true;
+
+                while (running) {
+                    IntPtr evt = disp.NextEvent;
+
+                    switch ((EventType)Marshal.ReadInt32(evt))
+                    {
+                        case EventType.KeyPress:
+                            running = false;
+                            break;
+                    }
+                }
+            }*/
+               }
+
+               static void App_KeyboardKeyDown (object sender, KeyboardKeyEventArgs e)
                {
-                       try {
-                               
-                       if (e.Key == OpenTK.Input.Key.Escape) {
-                               Quit (null, null);
-                               return;
-                       } else if (e.Key == OpenTK.Input.Key.F1) {
-                               TestList.Add ("new string");
-                               NotifyValueChanged ("TestList", TestList);
-                               return;
-                       } else if (e.Key == OpenTK.Input.Key.F4) {
-                               GraphicObject w = Load ("Interfaces/TemplatedContainer/testWindow.goml");
-                               w.DataSource = this;
-                               return;
-                       } else if (e.Key == OpenTK.Input.Key.F5) {
-                               GraphicObject w = Load ("Interfaces/Divers/testFileDialog.crow");
-                               w.DataSource = this;
-                               return;
-                       }else if (e.Key == OpenTK.Input.Key.F6) {
-                               GraphicObject w = Load ("Interfaces/Divers/0.crow");
-                               w.DataSource = this;
-                               return;
-                       }else if (e.Key == OpenTK.Input.Key.F7) {
-                               GraphicObject w = Load ("Interfaces/Divers/perfMeasures.crow");
-                               w.DataSource = this.ifaceControl[0];
-                               return;
-                       } else if (e.Key == OpenTK.Input.Key.F2)
-                               idx--;
-                       else if (e.Key == OpenTK.Input.Key.F3)
-                               idx++;
-                       else
-                               return;
-
-                               ClearInterface ();
-
-                               if (idx == testFiles.Length)
-                                       idx = 0;
-                               else if (idx < 0)
-                                       idx = testFiles.Length - 1;
-
-                               this.Title = testFiles [idx] + ". Press <F3> to cycle examples.";
-
-                               GraphicObject obj = Load (testFiles[idx]);
-                               obj.DataSource = this;
-                       } catch (Exception ex) {                                
-                               MessageBox.Show (CurrentInterface, MessageBox.Type.Error, ex.Message + "\n" + ex.InnerException.Message).Modal = true;
-                       }
-               }
-//             void Tv_SelectedItemChanged (object sender, SelectionChangeEventArgs e)
-//             {
-//                     FileInfo fi = e.NewValue as FileInfo;
-//                     if (fi == null)
-//                             return;
-//                     if (fi.Extension == ".crow" || fi.Extension == ".goml") {
-//                             Instantiator i = new Instantiator(fi.FullName);
-//                             lock (ifaceControl.CrowInterface.UpdateMutex) {
-//                                     (ifaceControl.CrowInterface.FindByName ("crowContainer") as Container).SetChild
-//                                     (i.CreateInstance(ifaceControl.CrowInterface));
-//                                     //CurSources = i.GetImlSourcesCode();
-//                             }
-//                     }
-//             }
-//             void onImlSourceChanged(Object sender, TextChangeEventArgs e){
-//                     Instantiator i;
-//                     try {
-//                             i = Instantiator.CreateFromImlFragment (e.Text);
-//                     } catch (Exception ex) {
-//                             Debug.WriteLine (ex);
-//                             return;
-//                     }
-//                     lock (ifaceControl.CrowInterface.UpdateMutex) {
-//                             (ifaceControl.CrowInterface.FindByName ("crowContainer") as Container).SetChild
-//                             (i.CreateInstance(ifaceControl.CrowInterface));
-//                     }
-//             }
-               void onButClick(object send, MouseButtonEventArgs e)
-               {
-                       Console.WriteLine ("button clicked:" + send.ToString());
-               }
-               void onAddTabButClick(object sender, MouseButtonEventArgs e){
-
-                       TabView tv = FindByName("tabview1") as TabView;
-                       if (tv == null)
-                               return;
-                       //tv.AddChild (new TabItem (CurrentInterface) { Caption = "NewTab" });
-                       lock (CurrentInterface.UpdateMutex) {
-                               tv.AddChild (CurrentInterface.LoadIMLFragment
-                                       (@"<TabItem Caption='New tab' Background='Blue'><Label/></TabItem>"));
-                       }
-               }
-               [STAThread]
-               static void Main ()
-               {
-                       #if DEBUG
-                       TextWriterTraceListener listener = new TextWriterTraceListener ("debug.log");
-                       Debug.Listeners.Add (listener);
-                       #endif
-
-                       Console.WriteLine ("starting example");
-                       BasicTests win = new BasicTests ();
-                       win.VSync = OpenTK.VSyncMode.Adaptive;
-                       win.Run (30);
-                       #if DEBUG
-                       listener.Dispose ();
-                       #endif
-               }
-               protected override void OnUpdateFrame (OpenTK.FrameEventArgs e)
-               {
-                       base.OnUpdateFrame (e);
-                       string test = e.Time.ToString ();
-                       IntValue++;
-                       if (IntValue == 1000)
-                               IntValue = 0;
-                       NotifyValueChanged ("PropertyLessBinding", test);
-               }
-               void onNew(object sender, EventArgs e){
-                       Debug.WriteLine ("menu new clicked");
+                       GraphicObject obj = sender as GraphicObject;
+                       obj.IFace.AddWidget(@"Interfaces/Divers/0.crow");
                }
        }
 }
diff --git a/Tests/CrowDebugger.cs b/Tests/CrowDebugger.cs
new file mode 100644 (file)
index 0000000..7d85ff5
--- /dev/null
@@ -0,0 +1,37 @@
+//
+// CrowDebugger.cs
+//
+// Author:
+//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+
+namespace Tests
+{
+       public class CrowDebugger
+       {
+               public CrowDebugger ()
+               {
+               }
+       }
+}
+
diff --git a/Tests/CrowWindow.cs b/Tests/CrowWindow.cs
deleted file mode 100644 (file)
index 1be9bb4..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-//
-// CrowWindow.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using System.Collections.Generic;
-
-namespace Crow
-{
-       public class CrowWindow : GameWindow, IValueChange
-    {
-               #region IValueChange implementation
-               public event EventHandler<ValueChangeEventArgs> ValueChanged;
-               public virtual void NotifyValueChanged(string MemberName, object _value)
-               {
-                       if (ValueChanged != null)
-                               ValueChanged.Invoke(this, new ValueChangeEventArgs(MemberName, _value));
-               }
-               #endregion
-
-               #region FPS
-               int frameCpt = 0;
-               int _fps = 0;
-
-               public int fps {
-                       get { return _fps; }
-                       set {
-                               if (_fps == value)
-                                       return;
-
-                               _fps = value;
-                               #if MEASURE_TIME
-                               if (_fps > fpsMax) {
-                                       fpsMax = _fps;
-                                       ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMax", fpsMax));
-                               } else if (_fps < fpsMin) {
-                                       fpsMin = _fps;
-                                       ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMin", fpsMin));
-                               }
-                               #endif
-                               if (frameCpt % 3 == 0) {
-                                       ValueChanged.Raise (this, new ValueChangeEventArgs ("fps", _fps));
-                                       #if MEASURE_TIME
-                                       foreach (PerformanceMeasure m in ifaceControl[0].PerfMeasures)
-                                               m.NotifyChanges ();
-                                       #endif
-                               }
-                       }
-               }
-
-               #if MEASURE_TIME
-               public PerformanceMeasure glDrawMeasure = new PerformanceMeasure("OpenGL Draw", 10);
-
-               public int fpsMin = int.MaxValue;
-               public int fpsMax = 0;
-
-               void resetFps ()
-               {
-                       fpsMin = int.MaxValue;
-                       fpsMax = 0;
-                       _fps = 0;
-               }
-               #endif
-
-               #endregion
-
-               #region ctor
-               public CrowWindow(int _width = 800, int _height = 600, string _title="Crow",
-                       int colors = 32, int depth = 24, int stencil = 0, int samples = 1,
-                       int major=3, int minor=3)
-                       : this(_width, _height, new OpenTK.Graphics.GraphicsMode(colors, depth, stencil, samples),
-                               _title,GameWindowFlags.Default,DisplayDevice.Default,
-                               major,minor,OpenTK.Graphics.GraphicsContextFlags.Default)
-               {
-               }
-               public CrowWindow (int width, int height, OpenTK.Graphics.GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device, int major, int minor, OpenTK.Graphics.GraphicsContextFlags flags)
-                       : base(width,height,mode,title,options,device,major,minor,flags)
-               {
-               }
-
-               #endregion
-
-               protected Shader shader;
-               public List<InterfaceControler> ifaceControl = new List<InterfaceControler>();
-               int focusedIdx = -1, activeIdx = -2;
-
-               // TODO:We should be able to set the current interface programmaticaly
-               /// <summary>
-               /// Gets the currently focused interface, focus could have been given by creation of new iface controler and
-               /// not only by the mouse
-               /// </summary>
-               public Interface CurrentInterface {
-                       get {
-                               checkDefaultIFace ();
-                               return ifaceControl [focusedIdx].CrowInterface;
-                       }
-               }
-                       
-               void addInterfaceControler(InterfaceControler ifaceControler)
-               {
-                       ifaceControler.CrowInterface.Quit += Quit;
-                       ifaceControler.CrowInterface.MouseCursorChanged += CrowInterface_MouseCursorChanged;
-
-                       ifaceControl.Add (ifaceControler);
-                       focusedIdx = ifaceControl.Count - 1;
-               }
-               void openGLDraw(){
-                       //save GL states
-                       bool blend, depthTest, cullFace;
-                       GL.GetBoolean (GetPName.Blend, out blend);
-                       GL.GetBoolean (GetPName.DepthTest, out depthTest);
-                       GL.GetBoolean (GetPName.CullFace, out cullFace);
-                       GL.Enable (EnableCap.Blend);
-                       GL.Disable (EnableCap.DepthTest);
-                       GL.Disable (EnableCap.CullFace);
-
-                       #if MEASURE_TIME
-                       glDrawMeasure.StartCycle();
-                       #endif
-
-                       shader.Enable ();
-                       for (int i = 0; i < ifaceControl.Count; i++) {
-                               shader.SetMVP (ifaceControl [i].InterfaceMVP);
-                               ifaceControl [i].OpenGLDraw ();
-                       }
-
-                       #if MEASURE_TIME
-                       glDrawMeasure.StopCycle();
-                       #endif
-
-                       //restore GL states
-                       if (!blend)
-                               GL.Disable (EnableCap.Blend);
-                       if (depthTest)
-                               GL.Enable (EnableCap.DepthTest);
-                       if (cullFace)
-                               GL.Enable (EnableCap.CullFace);
-               }
-
-               public void Quit (object sender, EventArgs e)
-               {
-                       foreach (InterfaceControler ic in ifaceControl) {
-                               ic.Dispose ();
-                       }
-                       this.Exit ();
-               }
-               void CrowInterface_MouseCursorChanged (object sender, MouseCursorChangedEventArgs e)
-               {
-                       this.Cursor = new MouseCursor(
-                               (int)e.NewCursor.Xhot,
-                               (int)e.NewCursor.Yhot,
-                               (int)e.NewCursor.Width,
-                               (int)e.NewCursor.Height,
-                               e.NewCursor.data);
-               }
-
-               #region Events
-               //those events are raised only if mouse isn't in a graphic object
-               public event EventHandler<OpenTK.Input.MouseWheelEventArgs> CrowMouseWheel;
-               public event EventHandler<OpenTK.Input.MouseButtonEventArgs> CrowMouseUp;
-               public event EventHandler<OpenTK.Input.MouseButtonEventArgs> CrowMouseDown;
-               public event EventHandler<OpenTK.Input.MouseButtonEventArgs> CrowMouseClick;
-               public event EventHandler<OpenTK.Input.MouseMoveEventArgs> CrowMouseMove;
-               public event EventHandler<OpenTK.Input.KeyboardKeyEventArgs> CrowKeyDown;
-               public event EventHandler<OpenTK.Input.KeyboardKeyEventArgs> CrowKeyUp;
-
-               #endregion
-
-               public ProjectiveIFaceControler Add3DInterface(int width, int height, Matrix4 ifaceModelMat){
-                       ProjectiveIFaceControler tmp = new ProjectiveIFaceControler (new Rectangle (0, 0, width, height), ifaceModelMat);
-                       addInterfaceControler (tmp);
-                       return tmp;
-               }
-               public GraphicObject AddWidget (string path)
-               {                       
-                       GraphicObject tmp = Load (path);
-                       return tmp;
-               }
-               public GraphicObject AddWidget (GraphicObject g, int interfaceIdx = 0){
-                       checkDefaultIFace ();
-                       ifaceControl [interfaceIdx].CrowInterface.AddWidget (g);
-                       return g;
-               }
-
-               public void DeleteWidget (GraphicObject g, int interfaceIdx = 0){
-                       ifaceControl [interfaceIdx].CrowInterface.DeleteWidget (g);
-               }
-               /// <summary>
-               /// check if a default interface exists, create one if not
-               /// </summary>
-               void checkDefaultIFace (){
-                       if (ifaceControl.Count == 0) {//create default orthogonal interface
-                               addInterfaceControler (new InterfaceControler (
-                                       new Rectangle (0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height)));
-                               focusedIdx = 0;
-                       }
-               }
-               /// <summary>
-               /// Load the content of the IML file pointed by path and add it to the current interface
-               /// graphic tree.
-               /// </summary>
-               /// <param name="path">the path of the IML file to load</param>
-               /// <param name="interfaceIdx">interface index to bind to, a default one is created if none exists</param>
-               public GraphicObject Load (string path, int interfaceIdx = 0){
-                       checkDefaultIFace();
-                       return ifaceControl [interfaceIdx].CrowInterface.AddWidget (path);
-               }
-               /// <summary>
-               /// Load the content of the IML string passed as first argument and add it to the current interface
-               /// graphic tree.
-               /// </summary>
-               /// <param name="path">a valid IML string</param>
-               /// <param name="interfaceIdx">interface index to bind to, a default one is created if none exists</param>
-               public void LoadIMLFragment (string imlFragment, int interfaceIdx = 0){
-                       checkDefaultIFace();
-                       ifaceControl [interfaceIdx].CrowInterface.LoadIMLFragment (imlFragment);
-               }
-
-               public GraphicObject FindByName (string nameToFind){
-                       for (int i = 0; i < ifaceControl.Count; i++) {
-                               GraphicObject tmp = ifaceControl [i].CrowInterface.FindByName (nameToFind);
-                               if (tmp != null)
-                                       return tmp;
-                       }
-                       return null;
-               }
-               public void ClearInterface (int interfaceIdx = 0){
-                       ifaceControl [interfaceIdx].CrowInterface.ClearInterface ();
-               }
-               /// <summary>Override this method for your OpenGL rendering calls</summary>
-               public virtual void OnRender(FrameEventArgs e)
-               {
-               }
-               /// <summary>Override this method to customize clear method between frames</summary>
-               public virtual void GLClear()
-               {
-                       GL.Clear (ClearBufferMask.ColorBufferBit|ClearBufferMask.DepthBufferBit);
-               }
-
-               #region Game win overrides
-               protected override void OnLoad(EventArgs e)
-               {
-                       base.OnLoad(e);
-
-                       this.KeyPress += new EventHandler<OpenTK.KeyPressEventArgs>(OpenTKGameWindow_KeyPress);
-                       KeyDown += new EventHandler<OpenTK.Input.KeyboardKeyEventArgs>(Keyboard_KeyDown);
-                       KeyUp += new EventHandler<OpenTK.Input.KeyboardKeyEventArgs>(Keyboard_KeyUp);
-
-                       MouseWheel += new EventHandler<OpenTK.Input.MouseWheelEventArgs>(GL_Mouse_WheelChanged);
-                       MouseDown += new EventHandler<OpenTK.Input.MouseButtonEventArgs>(GL_Mouse_ButtonDown);
-                       MouseUp += new EventHandler<OpenTK.Input.MouseButtonEventArgs>(GL_Mouse_ButtonUp);
-                       MouseMove += new EventHandler<OpenTK.Input.MouseMoveEventArgs>(GL_Mouse_Move);
-
-                       #if DEBUG
-                       Console.WriteLine("\n\n*************************************");
-                       Console.WriteLine("GL version: " + GL.GetString (StringName.Version));
-                       Console.WriteLine("GL vendor: " + GL.GetString (StringName.Vendor));
-                       Console.WriteLine("GLSL version: " + GL.GetString (StringName.ShadingLanguageVersion));
-                       Console.WriteLine("*************************************\n");
-                       #endif
-
-                       shader = new Shader ();
-                       shader.Enable ();
-
-                       GL.ClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-               }
-               protected override void OnUpdateFrame(FrameEventArgs e)
-               {
-                       base.OnUpdateFrame(e);
-                       fps = (int)RenderFrequency;
-
-                       #if MEASURE_TIME
-                       if (frameCpt > 500) {
-                               resetFps ();
-                               frameCpt = 0;
-//                             #if DEBUG
-//                             GC.Collect();
-//                             GC.WaitForPendingFinalizers();
-//                             NotifyValueChanged("memory", GC.GetTotalMemory (false).ToString());
-//                             #endif
-                       }
-                       #endif
-
-                       frameCpt++;
-               }
-               protected override void OnRenderFrame(FrameEventArgs e)
-               {
-                       GLClear ();
-
-                       base.OnRenderFrame(e);
-
-                       OnRender (e);
-                       openGLDraw ();
-
-
-                       SwapBuffers ();
-               }
-               protected override void OnResize(EventArgs e)
-               {
-                       base.OnResize (e);
-                       for (int i = 0; i < ifaceControl.Count; i++) {
-                               ifaceControl[i].ProcessResize(
-                                       new Rectangle(
-                                               0,
-                                               0,
-                                               this.ClientRectangle.Width,
-                                               this.ClientRectangle.Height));
-                       }
-               }
-               #endregion
-
-               #region Mouse and Keyboard Handling
-               void update_mouseButtonStates(ref MouseState e, OpenTK.Input.MouseState otk_e){
-                       for (int i = 0; i < MouseState.MaxButtons; i++) {
-                               if (otk_e.IsButtonDown ((OpenTK.Input.MouseButton)i))
-                                       e.EnableBit (i);
-                       }
-               }
-               protected virtual void GL_Mouse_Move(object sender, OpenTK.Input.MouseMoveEventArgs otk_e)
-        {
-                       if (activeIdx == -2) {                          
-                               for (int i = 0; i < ifaceControl.Count; i++) {
-                                       if (ifaceControl [i].ProcessMouseMove (otk_e.X, otk_e.Y)) {
-                                               focusedIdx = i;
-                                               return;
-                                       }
-                               }
-                       } if (ifaceControl [focusedIdx].ProcessMouseMove (otk_e.X, otk_e.Y))
-                               return;                 
-
-                       CrowMouseMove.Raise (sender, otk_e);
-        }
-               protected virtual void GL_Mouse_ButtonUp(object sender, OpenTK.Input.MouseButtonEventArgs otk_e)
-        {
-                       activeIdx = -2;
-                       if (focusedIdx >= 0) {
-                               if (ifaceControl [focusedIdx].ProcessMouseButtonUp ((int)otk_e.Button))
-                                       return;
-                       }
-                       CrowMouseUp.Raise (sender, otk_e);
-        }
-               protected virtual void GL_Mouse_ButtonDown(object sender, OpenTK.Input.MouseButtonEventArgs otk_e)
-               {
-                       activeIdx = focusedIdx;
-                       if (focusedIdx >= 0) {
-                               if (ifaceControl [focusedIdx].ProcessMouseButtonDown ((int)otk_e.Button))
-                                       return;
-                       }
-                       CrowMouseDown.Raise (sender, otk_e);
-        }
-               protected virtual void GL_Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs otk_e)
-        {
-                       if (focusedIdx >= 0) {
-                               if (ifaceControl [focusedIdx].ProcessMouseWheelChanged (otk_e.DeltaPrecise))
-                                       return;
-                       }
-                       CrowMouseWheel.Raise (sender, otk_e);
-        }
-
-               protected virtual void Keyboard_KeyDown(object sender, OpenTK.Input.KeyboardKeyEventArgs otk_e)
-               {
-                       if (focusedIdx >= 0) {
-                               if (ifaceControl [focusedIdx].ProcessKeyDown((int)otk_e.Key))
-                                       return;
-                       }
-                       CrowKeyDown.Raise (this, otk_e);
-        }
-               protected virtual void Keyboard_KeyUp(object sender, OpenTK.Input.KeyboardKeyEventArgs otk_e)
-               {
-                       if (focusedIdx >= 0) {
-                               if (ifaceControl [focusedIdx].ProcessKeyUp((int)otk_e.Key))
-                                       return;
-                       }
-                       CrowKeyUp.Raise (this, otk_e);
-               }
-               protected virtual void OpenTKGameWindow_KeyPress (object sender, OpenTK.KeyPressEventArgs e)
-               {
-                       if (focusedIdx >= 0) {
-                               if (ifaceControl [focusedIdx].ProcessKeyPress (e.KeyChar))
-                                       return;
-                       }
-                       //TODO:create keyboardkeypress evt
-               }
-        #endregion
-    }
-}
diff --git a/Tests/Hello3D.cs b/Tests/Hello3D.cs
deleted file mode 100644 (file)
index 2730bb6..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-//
-// Hello3D.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using Crow;
-
-namespace Tests
-{
-       class Hello3D : CrowWindow
-       {
-               [STAThread]
-               static void Main ()
-               {
-                       Hello3D win = new Hello3D ();
-                       win.Run (30);
-               }
-
-               public Hello3D ()
-                       : base(800, 600,"Crow Test with OpenTK")
-               {
-               }
-
-               public Matrix4 modelview, projection;
-               public int[] viewport = new int[4];
-               public Vector3 vEyeTarget = new Vector3(0f, 0f, 0f);
-               public Vector3 vEye;
-               public Vector3 vLookInit = Vector3.Normalize(new Vector3(-1.0f, -1.0f, 1.0f));
-               public Vector3 vLook;  // Camera vLook Vector
-               public float zNear = 0.001f, zFar = 300.0f;
-               public float fovY = (float)Math.PI / 4;
-               public float eyeDist = 10.2f;
-               public float viewZangle, viewXangle;
-               public const float MoveSpeed = 0.02f;
-               public const float RotationSpeed = 0.005f;
-               public const float ZoomSpeed = 0.22f;
-
-               vaoMesh cube;
-               Texture texture;
-               ProjectiveIFaceControler iface3D;
-
-               void initGL(){
-                       GL.Enable (EnableCap.CullFace);
-                       GL.Enable (EnableCap.Blend);
-                       GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
-
-                       cube = vaoMesh.CreateCube ();
-                       texture = new Texture ("image/textest.png");
-               }
-
-               protected override void OnLoad (EventArgs e)
-               {
-                       base.OnLoad (e);
-
-                       CrowMouseMove += HelloCube_MouseMove;
-                       CrowMouseWheel += Hello3D_MouseWheelChanged;
-
-                       iface3D = Add3DInterface (800, 800,
-                               Matrix4.CreateScale (6f) *
-                               Matrix4.CreateRotationX (MathHelper.PiOver2) *
-                               Matrix4.CreateTranslation (Vector3.UnitY * -1.1f));
-                       Load (@"Interfaces/Divers/0.crow").DataSource = this;
-                       initGL ();
-                       shader.Enable ();
-               }
-
-               protected override void OnResize (EventArgs e)
-               {
-                       base.OnResize (e);
-                       UpdateViewMatrix ();
-               }
-
-               public override void OnRender (FrameEventArgs e)
-               {                       
-                       base.OnRender (e);
-
-                       shader.SetMVP(modelview * projection);
-
-                       GL.BindTexture (TextureTarget.Texture2D, texture);
-                       cube.Render (BeginMode.Triangles);
-                       GL.BindTexture (TextureTarget.Texture2D, 0);
-               }
-
-               public void UpdateViewMatrix()
-               {
-                       Rectangle r = this.ClientRectangle;
-                       GL.Viewport( r.X, r.Y, r.Width, r.Height);
-                       projection = Matrix4.CreatePerspectiveFieldOfView (fovY, r.Width / (float)r.Height, zNear, zFar);
-                       vLook = vLookInit.Transform(
-                               Matrix4.CreateRotationX (viewXangle)*
-                               Matrix4.CreateRotationZ (viewZangle));
-                       vLook.Normalize();
-                       vEye = vEyeTarget + vLook * eyeDist;
-                       modelview = Matrix4.LookAt(vEye, vEyeTarget, Vector3.UnitZ);
-                       GL.GetInteger(GetPName.Viewport, viewport);
-
-                       iface3D.UpdateView (projection, modelview, viewport, vEye);
-               }
-
-               void HelloCube_MouseMove(object sender, OpenTK.Input.MouseMoveEventArgs otk_e)
-               {
-                       if (otk_e.Mouse.MiddleButton == OpenTK.Input.ButtonState.Pressed) {
-                               viewZangle -= (float)otk_e.XDelta * RotationSpeed;
-                               viewXangle -= (float)otk_e.YDelta * RotationSpeed;
-                               UpdateViewMatrix ();
-                       } else if (otk_e.Mouse.LeftButton == OpenTK.Input.ButtonState.Pressed) {
-                               return;
-                       } else if (otk_e.Mouse.RightButton == OpenTK.Input.ButtonState.Pressed) {
-                               Vector2 v2Look = vLook.Xy.Normalized ();
-                               Vector2 disp = v2Look.PerpendicularLeft * otk_e.XDelta * MoveSpeed +
-                                       v2Look * otk_e.YDelta * MoveSpeed;
-                               vEyeTarget += new Vector3 (disp.X, disp.Y, 0);
-                               UpdateViewMatrix ();
-                       }
-               }
-               void Hello3D_MouseWheelChanged (object sender, OpenTK.Input.MouseWheelEventArgs e)
-               {
-                       float speed = ZoomSpeed;
-                       //if (Keyboard[OpenTK.Input.Key.ControlLeft])
-                       //      speed *= 20.0f;
-
-                       eyeDist -= e.Delta * speed;
-                       if (eyeDist < zNear)
-                               eyeDist = zNear;
-                       else if (eyeDist > zFar)
-                               eyeDist = zFar;
-                       UpdateViewMatrix ();
-               }
-       }
-}
\ No newline at end of file
diff --git a/Tests/HelloWorld.cs b/Tests/HelloWorld.cs
deleted file mode 100644 (file)
index 75cc9bd..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-using Tutorials;
-
-namespace Tests
-{
-       class HelloWorld : CrowWindow
-       {
-               public HelloWorld ()
-                       : base(800, 600,"Crow Test with OpenTK")
-               {
-               }
-
-               protected override void OnLoad (EventArgs e)
-               {
-                       base.OnLoad (e);
-                       LoadIMLFragment (@"<SimpleGauge Level='40' Margin='5' Background='Jet' Foreground='Gray' Width='30' Height='50%'/>");
-               }
-
-               [STAThread]
-               static void Main ()
-               {
-                       HelloWorld win = new HelloWorld ();
-                       win.Run (30);
-               }
-       }
-}
\ No newline at end of file
diff --git a/Tests/InterfaceControler.cs b/Tests/InterfaceControler.cs
deleted file mode 100644 (file)
index 034cab3..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-//
-// InterfaceControler.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using System.Threading;
-using System.Collections.Generic;
-
-namespace Crow
-{
-       public class ProjectiveIFaceControler : InterfaceControler {
-               Matrix4 modelview;
-               int[] viewport = new int[4];
-               Vector3 vEyePosition;
-
-               public Matrix4 ifaceModelMat;
-               Point localMousePos;
-
-               public ProjectiveIFaceControler(Rectangle ifaceBounds, Matrix4 _ifaceModelMat)
-                       : base(ifaceBounds){
-                       ifaceModelMat = _ifaceModelMat;
-               }
-
-               public override Matrix4 InterfaceMVP {
-                       get { return ifaceModelMat * modelview * projection; }
-               }
-
-               public override void initGL(){
-                       quad = new Crow.vaoMesh (0, 0, 0, 1, 1, 1, -1);
-                       //ifaceModelMat = Matrix4.CreateRotationX(MathHelper.PiOver2) * Matrix4.CreateTranslation(Vector3.UnitY);
-                       CrowInterface.ProcessResize(iRect);
-                       createContext ();
-                       //CrowInterface.ProcessResize (iRect);
-               }
-               public override void ProcessResize (Rectangle newSize)
-               {
-               }
-               public override void OpenGLDraw ()
-               {
-                       GL.Enable (EnableCap.DepthTest);
-                       base.OpenGLDraw ();
-                       GL.Disable (EnableCap.DepthTest);
-               }
-               public void UpdateView (Matrix4 _projection, Matrix4 _modelview, int[] _viewport, Vector3 _vEyePosition)
-               {
-                       projection = _projection;
-                       modelview = _modelview;
-                       viewport = _viewport;
-                       vEyePosition = _vEyePosition;
-               }
-               public override bool ProcessMouseMove (int x, int y)
-               {
-                       Matrix4 mv = ifaceModelMat * modelview;
-                       Vector3 vMouse = UnProject(ref projection, ref mv, viewport, new Vector2 (x, y)).Xyz;
-                       Vector3 vE = vEyePosition.Transform (ifaceModelMat.Inverted());
-                       Vector3 vMouseRay = Vector3.Normalize(vMouse - vE);
-                       float a = vE.Z / vMouseRay.Z;
-                       vMouse = vE - vMouseRay * a;
-                       //vMouse = vMouse.Transform (interfaceModelView.Inverted());
-                       localMousePos = new Point ((int)Math.Truncate ((vMouse.X + 0.5f) * iRect.Width),
-                               iRect.Height - (int)Math.Truncate ((vMouse.Y + 0.5f) * iRect.Height));
-                       mouseIsInInterface = localMousePos.X.IsInBetween (0, iRect.Width) & localMousePos.Y.IsInBetween (0, iRect.Height);
-
-                       return mouseIsInInterface ? CrowInterface.ProcessMouseMove (localMousePos.X, localMousePos.Y) : false;
-               }
-               Vector4 UnProject(ref Matrix4 projection, ref Matrix4 view, int[] viewport, Vector2 mouse)
-               {
-                       Vector4 vec;
-
-                       vec.X = 2.0f * mouse.X / (float)viewport[2] - 1;
-                       vec.Y = -(2.0f * mouse.Y / (float)viewport[3] - 1);
-                       vec.Z = 0f;
-                       vec.W = 1.0f;
-
-                       Matrix4 viewInv = Matrix4.Invert(view);
-                       Matrix4 projInv = Matrix4.Invert(projection);
-
-                       Vector4.Transform(ref vec, ref projInv, out vec);
-                       Vector4.Transform(ref vec, ref viewInv, out vec);
-
-                       if (vec.W > float.Epsilon || vec.W < float.Epsilon)
-                       {
-                               vec.X /= vec.W;
-                               vec.Y /= vec.W;
-                               vec.Z /= vec.W;
-                       }
-
-                       return vec;
-               }
-       }
-       public class InterfaceControler : IDisposable {
-               public Interface CrowInterface;
-               public int texID;
-               public vaoMesh quad;
-               public Rectangle iRect = new Rectangle(0,0,2048,2048);
-               public bool mouseIsInInterface = false;
-
-               protected Matrix4 projection;
-               public virtual Matrix4 InterfaceMVP {
-                       get { return projection; }
-               }
-
-               #if MEASURE_TIME
-               public List<PerformanceMeasure> PerfMeasures;
-               public PerformanceMeasure glDrawMeasure = new PerformanceMeasure("OpenGL Draw", 10);
-               #endif
-
-               #region CTOR
-               public InterfaceControler(Rectangle ifaceBounds){
-                       iRect = ifaceBounds;
-
-                       CrowInterface = new Interface ();
-                       CrowInterface.Init ();
-
-                       #if MEASURE_TIME
-                       PerfMeasures = new List<PerformanceMeasure> (
-                               new PerformanceMeasure[] {
-                                       this.CrowInterface.updateMeasure,
-                                       this.CrowInterface.layoutingMeasure,
-                                       this.CrowInterface.clippingMeasure,
-                                       this.CrowInterface.drawingMeasure,
-                                       this.glDrawMeasure
-                               }
-                       );
-                       #endif
-
-                       Thread t = new Thread (interfaceThread);
-                       t.IsBackground = true;
-                       t.Start ();
-
-                       initGL ();
-               }
-               #endregion
-
-               void interfaceThread()
-               {
-                       while (CrowInterface.ClientRectangle.Size.Width == 0)
-                               Thread.Sleep (5);
-
-                       while (true) {
-                               CrowInterface.Update ();
-                               Thread.Sleep (2);
-                       }
-               }
-
-               #region Mouse And Keyboard handling
-               public virtual void ProcessResize(Rectangle newSize){
-                       iRect = newSize;
-                       CrowInterface.ProcessResize(newSize);
-                       createContext ();
-                       GL.Viewport (0, 0, newSize.Width, newSize.Height);//TODO:find a better place for this
-               }
-               public virtual bool ProcessMouseMove(int x, int y){
-                       return CrowInterface.ProcessMouseMove (x, y);
-               }
-               public virtual bool ProcessMouseButtonUp(int button)
-               {
-                       return CrowInterface.ProcessMouseButtonUp (button);
-               }
-               public virtual bool ProcessMouseButtonDown(int button)
-               {
-                       return CrowInterface.ProcessMouseButtonDown (button);
-               }
-               public virtual bool ProcessMouseWheelChanged(float delta)
-               {
-                       return CrowInterface.ProcessMouseWheelChanged (delta);
-               }
-               public virtual bool ProcessKeyDown(int Key){
-                       return CrowInterface.ProcessKeyDown(Key);
-               }
-               public virtual bool ProcessKeyUp(int Key){
-                       return CrowInterface.ProcessKeyUp(Key);
-               }
-               public virtual bool ProcessKeyPress(char Key){
-                       return CrowInterface.ProcessKeyPress(Key);
-               }
-               #endregion
-
-               #region graphic context
-               public virtual void initGL(){
-                       projection = OpenTK.Matrix4.CreateOrthographicOffCenter (-0.5f, 0.5f, -0.5f, 0.5f, 1, -1);
-                       quad = new Crow.vaoMesh (0, 0, 0, 1, 1, 1, -1);
-                       createContext ();
-               }
-               /// <summary>Create the texture for the interface redering</summary>
-               public virtual void createContext()
-               {
-                       if (GL.IsTexture(texID))
-                               GL.DeleteTexture (texID);
-                       GL.GenTextures(1, out texID);
-                       GL.ActiveTexture (TextureUnit.Texture0);
-                       GL.BindTexture(TextureTarget.Texture2D, texID);
-
-                       GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba,
-                               iRect.Width, iRect.Height, 0,
-                               OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, CrowInterface.bmp);
-
-                       GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
-                       GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
-
-                       GL.BindTexture(TextureTarget.Texture2D, 0);
-               }
-               /// <summary>Rendering of the interface</summary>
-               public virtual void OpenGLDraw()
-               {
-                       #if MEASURE_TIME
-                       glDrawMeasure.StartCycle();
-                       #endif
-
-                       GL.ActiveTexture (TextureUnit.Texture0);
-                       GL.BindTexture (TextureTarget.Texture2D, texID);
-                       if (Monitor.TryEnter(CrowInterface.RenderMutex)) {
-                               if (CrowInterface.IsDirty) {
-                                       GL.TexSubImage2D (TextureTarget.Texture2D, 0,
-                                               CrowInterface.DirtyRect.Left, CrowInterface.DirtyRect.Top,
-                                               CrowInterface.DirtyRect.Width, CrowInterface.DirtyRect.Height,
-                                               OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, CrowInterface.dirtyBmp);
-                                       CrowInterface.IsDirty = false;
-                               }
-                               Monitor.Exit (CrowInterface.RenderMutex);
-                       }
-                       quad.Render (BeginMode.TriangleStrip);
-                       GL.BindTexture(TextureTarget.Texture2D, 0);
-
-                       #if MEASURE_TIME
-                       glDrawMeasure.StopCycle();
-                       #endif
-               }
-               #endregion
-
-               #region IDisposable implementation
-
-               public void Dispose ()
-               {
-                       if (GL.IsTexture(texID))
-                               GL.DeleteTexture (texID);
-                       if (quad != null)
-                               quad.Dispose ();
-               }
-
-               #endregion
-       }
-}
-
index 4cb7f5f2e640462bacfc3ee556efed835c13c1b5..c2bfe8da7edaaf7d60eb2133aad5fa277652d96d 100644 (file)
@@ -1,7 +1,7 @@
 <Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
        Margin="3"
        Background="{./Background}"
-       Foreground="DimGray"
+       Foreground="DimGrey"
        TextAlignment="Center"
        MouseEnter="{Foreground=White}"
-       MouseLeave="{Foreground=DimGray}"/>
\ No newline at end of file
+       MouseLeave="{Foreground=DimGrey}"/>
\ No newline at end of file
index 17bc958e478a119c3a326040de7563bffba9eee9..df2f4733ba92f1a9a088dc1a57b8ca969dd2482a 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Container Background="DimGray" Margin="10" Width="90%" Height="90%">
+<Container Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10"  Background="SeaGreen"
                        MinimumSize="50,50"/>
 </Container>
\ No newline at end of file
index dd8afa2867b69928f88793f3a513ad7e39a32941..94655ca3c807f4f574c358e690fc33463ddebdd4 100755 (executable)
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
-<Container Background="DimGray" Margin="10" Fit="true">
+<Container Background="DimGrey" Margin="10" Fit="true">
        <Label Text="{fps}" Margin="10" Fit="true" Background="SeaGreen"/>
 </Container>
\ No newline at end of file
index d98668c01680db4e1af8dd352b0df17fcb72558b..9a03ecef9225076e970b9cbd80ef43114a2240cf 100755 (executable)
@@ -3,10 +3,10 @@
        <HorizontalStack >
                <VerticalStack Width="30%" Margin="5">
                        <GroupBox Caption="Performance" Height="Fit">
-                               <VerticalStack Width="90%" Height="Fit" Spacing="2" >
+                               <VerticalStack DataSource="{drawingMeasure}" Width="90%" Height="Fit" Spacing="2" >
                                        <HorizontalStack Height="Fit" Tooltip="Frame per second">
                                                <Label Text="Fps:" Style="FpsLabel"/>
-                                               <Label Text="{fps}" Style="FpsDisp"/>
+                                               <Label Text="{minimum}" Style="FpsDisp"/>
                                        </HorizontalStack>
                                        <HorizontalStack Height="Fit" Tooltip="Minimum Frame per second">
                                                <Label Text="Min:" Style="FpsLabel"/>
@@ -34,9 +34,9 @@
                                        </HorizontalStack>
                                </VerticalStack>
                        </GroupBox>
-                       <Label Width="Stretched" Margin="3" Background="DimGray"/>
+                       <Label Width="Stretched" Margin="3" Background="DimGrey"/>
                        <TextBox Text="TextBox" Multiline="true" Margin="3"/>
-                       <HorizontalStack Height="Fit" Margin="5" Background="DimGray" CornerRadius="10">
+                       <HorizontalStack Height="Fit" Margin="5" Background="DimGrey" CornerRadius="10">
                                <VerticalStack Spacing="5" Width="50%">
                                        <CheckBox Fit="true" Caption="test"/>
                                        <CheckBox Fit="true"/>
                        <HorizontalStack Height="Fit" Margin="5">
                                <Label Text="MouseEvents" Width="50%" Margin="3"
                                        Background="Jet"
-                                       Foreground="DimGray"
+                                       Foreground="DimGrey"
                                        TextAlignment="Center"
                                        MouseEnter="{Foreground=White}"
-                                       MouseLeave="{Foreground=DimGray}"
+                                       MouseLeave="{Foreground=DimGrey}"
                                        MouseDown="{Background=DarkRed}"
                                        MouseClick="{Foreground=Green}"
                                        MouseDoubleClick="{Foreground=Yellow}"
                                        MouseUp="{Background=Jet}"/>
                                <Label Text="MouseEvents" Width="50%" Margin="3"
                                        Background="Jet"
-                                       Foreground="DimGray"
+                                       Foreground="DimGrey"
                                        TextAlignment="Center"
                                        MouseClick="{Foreground=Green}"
                                        MouseDoubleClick="{Foreground=Yellow}"
                                        MouseEnter="{Foreground=White}"
-                                       MouseLeave="{Foreground=DimGray}"
+                                       MouseLeave="{Foreground=DimGrey}"
                                        MouseDown="{Background=SeaGreen}"
-                                       MouseUp="{Background=DimGray}"/>
+                                       MouseUp="{Background=DimGrey}"/>
                        </HorizontalStack>
                        <GroupBox Caption="Templated controls" Height="Fit" Margin="5">
                                <HorizontalStack Height="Fit">
                                <Image Path="#Crow.Images.Icons.crow.svg"/>
                        </Expandable>
                        <Popper>
-                               <Border Fit="True" Background="DimGray" CornerRadius="0" BorderWidth="1">
+                               <Border Fit="True" Background="DimGrey" CornerRadius="0" BorderWidth="1">
                                        <Image Path="#Crow.Images.Icons.crow.svg" Width="100" Height="100" Margin="10"
-                                               MouseEnter="{Background=LightGray}"
+                                               MouseEnter="{Background=LightGrey}"
                                                MouseLeave="{Background=Transparent}"/>
                                </Border>
                        </Popper>
                        <Slider Height="10" Width="90%"/>
-                       <Container Height="Fit" Width="200" Background="DimGray" Margin="2" CornerRadius="5">
-                               <ProgressBar Background="DimGray" Height="10" Value="50"/>
+                       <Container Height="Fit" Width="200" Background="DimGrey" Margin="2" CornerRadius="5">
+                               <ProgressBar Background="DimGrey" Height="10" Value="50"/>
                        </Container>
-                       <Image Path="#Crow.Images.Icons.crow.svg" Width="60" Height="60" Background="LightGray" />
+                       <Image Path="#Crow.Images.Icons.crow.svg" Width="60" Height="60" Background="LightGrey" />
 <!--                   <TabView Name="tabview1"
                                Height="120" Orientation="Horizontal" Spacing="15">
                                <TabItem Name="TabItem1" Caption="Tab 1" Margin="0">
                                                <CheckBox/>
                                        </VerticalStack>
                                </TabItem>
-                               <TabItem Name="TabItem2" Caption="Tab 2" Background="Gray">
+                               <TabItem Name="TabItem2" Caption="Tab 2" Background="Grey">
                                        <VerticalStack Fit="true">
                                                <RadioButton/>
                                                <RadioButton/>
                                                <RadioButton/>
                                        </VerticalStack>
                                </TabItem>
-                               <TabItem Name="TabItem3" Caption="Tab 3" Background="Gray">
+                               <TabItem Name="TabItem3" Caption="Tab 3" Background="Grey">
                                        <Container Margin="5" CornerRadius="2">
                                                <TextBox Height="Stretched" Margin="5" Multiline="true" TextAlignment="TopLeft"/>
                                        </Container>
index 5ec5c69620b9ae23e0dcaa8776a38c4b230b64cd..a1f5e95df720851b2ff33208b696f3a41aa0a204 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <HorizontalStack Fit="true">   
        <VerticalStack Fit="true" Name="vsFps"  Spacing="10" >
-               <ProgressBar CornerRadius="5" Background="DimGray" Margin="1" Maximum="1000" Value="{fps}" Width="200" Height="15"/>
+               <ProgressBar CornerRadius="5" Background="DimGrey" Margin="1" Maximum="1000" Value="{fps}" Width="200" Height="15"/>
                <HorizontalStack Fit="true">
                        <Label Text="Memory:" Width="50" TextAlignment="Right"/>
                        <Label Text="{memory}" Font="droid,12" TextAlignment="Center"
index 53040f93a4564d4bcf37fece990720aba375c8ae..7489642a2c1eda27449bae6b7006015c43e6c491 100755 (executable)
                <GroupBox Caption="Group box" >
                        <Label Text="border test" Margin="3"/>
                </GroupBox>
-               <Container Fit="true" Background="DimGray" Margin="3">
-                       <GraphicObject Width="20" Height="20" Background="LightGray"/>
+               <Container Fit="true" Background="DimGrey" Margin="3">
+                       <GraphicObject Width="20" Height="20" Background="LightGrey"/>
                </Container>-->
-<!--           <ProgressBar Height="10" Width="150" Background="DimGray" Value="50" />
+<!--           <ProgressBar Height="10" Width="150" Background="DimGrey" Value="50" />
                <Slider Value="5" Width="150" Height="10"/>
                <ScrollBar Orientation="Horizontal" Maximum="100" Value="50" Height="16" Width="150"/>
                <Spinner Value="100"/>-->
                <GroupBox Caption="Group box"  Width="Stretched">
                        <Label Text="border test" Margin="3"/>
                </GroupBox>
-               <Container Height="Fit"  Width="Stretched" Background="DimGray" Margin="3">
-                       <GraphicObject Width="20" Height="20" Background="LightGray"/>
+               <Container Height="Fit"  Width="Stretched" Background="DimGrey" Margin="3">
+                       <GraphicObject Width="20" Height="20" Background="LightGrey"/>
                </Container>
-               <ProgressBar Height="10" Width="Stretched" Background="DimGray" Value="50" />
+               <ProgressBar Height="10" Width="Stretched" Background="DimGrey" Value="50" />
                <Slider Value="5" Width="Stretched" Height="10"/>
                <ScrollBar Orientation="Horizontal" Maximum="100" Value="50" Height="16" Width="Stretched"/>
                <Spinner Value="100"  Width="Stretched"/>
index c37ca360ca4a663e47d2be0ecf8fdef9e2c3e3a4..f537a71db223295e03f5a3d64d4003b5dec232e1 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<VerticalStack Fit="true" Background="DimGray" Margin="5">
+<VerticalStack Fit="true" Background="DimGrey" Margin="5">
 <!--   <RadioButton/>-->
        <Label Text="a" Width="Stretched" Background="Red"/>
        <Label Text="{fps}" HorizontalAlignment="Right" Background="LimeGreen"/>
index 8cdf459bdceee3502c0c65ae38605195dcf380e9..0dee2ef137d599aa2ff51b86cb455103adf38454 100755 (executable)
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <Container Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-               MouseEnter="{Background=Gray}"
+               MouseEnter="{Background=Grey}"
                MouseLeave="{Background=LimeGreen}">
        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="false"
-               MouseEnter="{Background=DimGray}" Width="100"
+               MouseEnter="{Background=DimGrey}" Width="100"
                MouseLeave="{Background=RoyalBlue}"
                Margin="10" Text="{drawing}" Background="RoyalBlue"/>
  </Container>
\ No newline at end of file
index 1e202d90a1d515967d38e63c7eeeb04eeb62f185..bc4c9279b0a64f8d29d4a4bbd6d74f76a9a02833 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <Container Fit="true" Margin="20" Background="SkyBlue" CacheEnabled="false"
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-               MouseEnter="{Background=LightGray}"
+               MouseEnter="{Background=LightGrey}"
                MouseLeave="{Background=SkyBlue}">
                <Container Fit="true" Margin="20" Background="Red" CacheEnabled="true"
                        HorizontalAlignment="Right" VerticalAlignment="Bottom"
                                MouseLeave="{Background=Yellow}">
                                <Container Margin="50" Background="LimeGreen" CacheEnabled="true"
                                                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-                                               MouseEnter="{Background=Gray}"
+                                               MouseEnter="{Background=Grey}"
                                                MouseLeave="{Background=LimeGreen}">
                                        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
-                                               MouseEnter="{Background=DimGray}"
+                                               MouseEnter="{Background=DimGrey}"
                                                MouseLeave="{Background=RoyalBlue}" 
                                                Margin="1" Text="{drawing}" Background="RoyalBlue"/>
                                </Container>
index 198d9113e661e8c0b204ef7ee07c50f4c8e8dfee..9292150fbc6d93b3f004ab25570dbf14ec4cff1c 100755 (executable)
@@ -1,14 +1,14 @@
 <?xml version="1.0"?>
 <Group Fit="true" Margin="50" Background="Yellow" CacheEnabled="true"
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-               MouseEnter="{Background=DimGray}"
+               MouseEnter="{Background=DimGrey}"
                MouseLeave="{Background=Yellow}">
 <Group Width="300" Height="200" Margin="50" Background="LimeGreen" CacheEnabled="false"
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-               MouseEnter="{Background=Gray}"
+               MouseEnter="{Background=Grey}"
                MouseLeave="{Background=LimeGreen}">
        <Label Left="10" HorizontalAlignment="Right" VerticalAlignment="Center" CacheEnabled="true"
-               MouseEnter="{Background=DimGray}" Width="100"
+               MouseEnter="{Background=DimGrey}" Width="100"
                MouseLeave="{Background=RoyalBlue}"
                Margin="10" Text="{drawing}" Background="RoyalBlue"/>
  </Group>
index 2bb7c357d0a3f741cdde223f42ddf05244801c8b..82a98881cd2309c22a39eb32e66d27c30bac60c7 100755 (executable)
@@ -1,32 +1,32 @@
 <?xml version="1.0"?>
 <Group Fit="true" Margin="50" Background="Yellow" CacheEnabled="true"
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-               MouseEnter="{Background=DimGray}"
+               MouseEnter="{Background=DimGrey}"
                MouseLeave="{Background=Yellow}">
        <HorizontalStack Fit="true">
                <VerticalStack Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
                                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-                               MouseEnter="{Background=Gray}"
+                               MouseEnter="{Background=Grey}"
                                MouseLeave="{Background=LimeGreen}">
                        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
-                               MouseEnter="{Background=DimGray}" Width="100"
+                               MouseEnter="{Background=DimGrey}" Width="100"
                                MouseLeave="{Background=RoyalBlue}"
                                Margin="10" Text="{fps}" Background="RoyalBlue"/>
                        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
-                               MouseEnter="{Background=DimGray}" Width="100"
+                               MouseEnter="{Background=DimGrey}" Width="100"
                                MouseLeave="{Background=RoyalBlue}"
                                Margin="10" Text="{drawing}" Background="RoyalBlue"/>
                 </VerticalStack>
                <VerticalStack Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
                                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-                               MouseEnter="{Background=Gray}"
+                               MouseEnter="{Background=Grey}"
                                MouseLeave="{Background=LimeGreen}">
                        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
-                               MouseEnter="{Background=DimGray}" Width="100"
+                               MouseEnter="{Background=DimGrey}" Width="100"
                                MouseLeave="{Background=RoyalBlue}"
                                Margin="10" Text="{fpsMax}" Background="RoyalBlue"/>
                        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
-                               MouseEnter="{Background=DimGray}" Width="100"
+                               MouseEnter="{Background=DimGrey}" Width="100"
                                MouseLeave="{Background=RoyalBlue}"
                                Margin="10" Text="{fpsMin}" Background="RoyalBlue"/>
                 </VerticalStack>
index 71a887ab9cfefca0683261c8916842d78cc30465..5caaf7715fdde038f016c2338e17f7180da3aa6f 100755 (executable)
@@ -1,38 +1,38 @@
 <?xml version="1.0"?>
 <Border Fit="true" BorderWidth="2"  >
-<Scroller CornerRadius="2" Height="200" Width="300" Background="DimGray" Margin="2">
+<Scroller CornerRadius="2" Height="200" Width="300" Background="DimGrey" Margin="2">
        <VerticalStack Margin="10" VerticalAlignment="Top" Fit="true" Background="vgradient|0:RoyalBlue|1:Black" >
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 1"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 2"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 3"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 4"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 5"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 6"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 7"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 8"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 9"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 10"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 11"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 12"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 13"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 14"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 15"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 16"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 17"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 18"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 19"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 20"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 21"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 22"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 23"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 24"/>
-                <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 25"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 1"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 2"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 3"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 4"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 5"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 6"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 7"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 8"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 9"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 10"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 11"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 12"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 13"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 14"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 15"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 16"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 17"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 18"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 19"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 20"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 21"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 22"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 23"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 24"/>
+                <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 25"/>
        </VerticalStack>
 </Scroller>
 </Border>
 <!--<VerticalStack Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
                HorizontalAlignment="Right" VerticalAlignment="Bottom"
-               MouseEnter="{Background=Gray}"
+               MouseEnter="{Background=Grey}"
                MouseLeave="{Background=LimeGreen}">
 
                <CheckBox Margin="20" Background="RoyalBlue"/>
                <CheckBox/>
 
        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
-               MouseEnter="{Background=DimGray}" Width="100"
+               MouseEnter="{Background=DimGrey}" Width="100"
                MouseLeave="{Background=RoyalBlue}"
                Margin="10" Text="{fps}" Background="RoyalBlue"/>
        <Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
-               MouseEnter="{Background=DimGray}" Width="100"
+               MouseEnter="{Background=DimGrey}" Width="100"
                MouseLeave="{Background=RoyalBlue}"
                Margin="10" Text="{drawing}" Background="RoyalBlue"/>
  </VerticalStack>-->
\ No newline at end of file
index fdfd8f3c1fa56d9b398796edd32a57b109dd7966..a081946faac19b477aadd8e432099d1fda86fa9b 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <VerticalStack>
-       <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="DimGray" Margin="5" Fit="True" />
+       <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Margin="5" Fit="True" />
        <GraphicObject Name="go" Width="100" Height="60" Background="DarkBlue"/>
        <GraphicObject Name="go" Width="100" Height="60" Background="{../colorPicker.SelectedColor}"/>
        <Label Text="{../colorPicker.SelectedColor}"/>
index c0d0d8b9a95f38cfa157f354503d50898c6f2f8a..ec13cf0e109a3187aa2cf803953c00168dbf7fac 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Window Focusable="true" Caption="Measures" Width="30%" Height="Fit" MinimumSize="100,100">
+<Window Focusable="true" Caption="Measures" Width="30%" Height="300" MinimumSize="100,100">
        <ListBox Data="{PerfMeasures}"
                ItemTemplate="#Tests.Interfaces.perfMsr.crow"/>
 </Window>
index 85a3d3b9c4f1e55b27aaba7f719bef6c63ee48e4..68d1cebbb077c27e15d9684ea00419e20ae5bd00 100644 (file)
@@ -6,8 +6,8 @@
        <Label Text="{fps}" IsEnabled="true" Font="30"/>
                <Label Text="{fps}" IsEnabled="false" Font="30" Background="SeaGreen"/>
        <Label Text="{fps}" IsEnabled="true" Font="30" Background="SeaGreen"/>
-       <Button Caption="Button" IsEnabled="true" Background="Gray"/>
-       <Button Caption="Button" IsEnabled="false" Background="Gray"/>
+       <Button Caption="Button" IsEnabled="true" Background="Grey"/>
+       <Button Caption="Button" IsEnabled="false" Background="Grey"/>
        <Button Caption="Button" IsEnabled="true" />
        <Button Caption="Button" IsEnabled="false" />
        <Spinner Fit="true"/>
index 738f2b119a612998f43f3e2a31ba888c8f78136c..22523b8ccc61085676901a4085679b59d3686fff 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Container Width="200" Height="100" Background="DimGray" Margin="5">
+<Container Width="200" Height="100" Background="DimGrey" Margin="5">
        <Container Width="Stretched" Height="800" Background="DarkBlue">
                <Label Text="{fps}" Background="RoyalBlue" VerticalAlignment="Center"/>
        </Container>
index 527424775443e8be0ff135e3d109cefc317b1b46..42282c1135812f86200d7ed38c2ee612c760324b 100755 (executable)
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<Label Margin="50" MinimumSize="10,10" Background="DimGray" Text="{PropertyLessBinding}"/>
\ No newline at end of file
+<Label Margin="50" MinimumSize="10,10" Background="DimGrey" Text="{PropertyLessBinding}"/>
\ No newline at end of file
index 4adada3912c833b8af6d86e714abf85807af8959..d1f9f3cc5e75dc70c7f5fc78799e56382d65589f 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <Container Fit="true" Background="Red" Tooltip="test tooltip" >
-       <Shape Foreground="Transparent" Background="DimGray" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"
-               MouseEnter="{Background=hgradient|0:DimGray|0.5:RoyalBlue|1:Black}"
-               MouseLeave="{Background=DimGray}"/>
+       <Shape Foreground="Transparent" Background="DimGrey" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"
+               MouseEnter="{Background=hgradient|0:DimGrey|0.5:RoyalBlue|1:Black}"
+               MouseLeave="{Background=DimGrey}"/>
 </Container>
\ No newline at end of file
index ac2cccc6355a7ab46c28fc56b00c18e0852145bf..99279cd44816856064880751fe37b370496aa2f9 100755 (executable)
@@ -1,82 +1,82 @@
 <?xml version="1.0"?>
 <Window Width="500" Height="300" MinimumSize="50,50">
-<HorizontalStack Margin="5" Background="DimGray">
-       <VerticalStack Width="200" Margin="5" Background="Gray">
-               <VerticalStack Fit="true" Background="DimGray" Margin="5">
+<HorizontalStack Margin="5" Background="DimGrey">
+       <VerticalStack Width="200" Margin="5" Background="Grey">
+               <VerticalStack Fit="true" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </VerticalStack>
-               <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+               <VerticalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue" Width="Stretched"/>
                        <TextRun Background="SkyBlue" Height="Stretched"/>
                </VerticalStack>
-               <HorizontalStack Fit="true" Background="DimGray" Margin="5">
+               <HorizontalStack Fit="true" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
-                       <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
+                       <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue" Width="Stretched"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
        </VerticalStack>
-       <VerticalStack Width="Stretched" Height="Stretched" Margin="5" Background="Gray">
-               <VerticalStack Fit="true" Background="DimGray" Margin="5">
+       <VerticalStack Width="Stretched" Height="Stretched" Margin="5" Background="Grey">
+               <VerticalStack Fit="true" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </VerticalStack>
-               <VerticalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
+               <VerticalStack Width="Stretched" Height="Stretched" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue" Width="Stretched"/>
                        <TextRun TextAlignment="Center" Background="SkyBlue" Width="Stretched" Height="Stretched"/>
                </VerticalStack>
-               <HorizontalStack Fit="true" Background="DimGray" Margin="5">
+               <HorizontalStack Fit="true" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
-                       <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+                       <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue" Width="Stretched"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
        </VerticalStack>
-       <VerticalStack Width="Fit" Margin="5" Background="Gray">
-               <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+       <VerticalStack Width="Fit" Margin="5" Background="Grey">
+               <VerticalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue" HorizontalAlignment="Left"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </VerticalStack>
-               <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+               <VerticalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue" Width="Stretched"/>
                        <TextRun Background="SkyBlue" Height="Stretched"/>
                </VerticalStack>
-               <HorizontalStack Fit="true" Background="DimGray" Margin="5">
+               <HorizontalStack Fit="true" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+               <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue"/>
                </HorizontalStack>
-                       <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
+                       <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGrey" Margin="5">
                        <TextRun Background="SkyBlue"/>
                        <TextRun Background="SkyBlue" Width="Stretched"/>
                        <TextRun Background="SkyBlue"/>
index 8a98ff84ea6b1c351a84f329b5595d3d80dddddc..d0fe0af4e669e56b17aebbf83d1f349652956cf6 100755 (executable)
@@ -1,24 +1,24 @@
 <?xml version="1.0"?>
 <VerticalStack Background="SteelBlue" Fit="true">
        <HorizontalStack Fit="true">
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="TopLeft"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Top"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="TopRight"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Left"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Center"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Right"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="BottomLeft"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Bottom"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="BottomRight"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="TopLeft"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Top"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="TopRight"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Left"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Center"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Right"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="BottomLeft"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Bottom"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="BottomRight"/>
        </HorizontalStack>
        <HorizontalStack Fit="true">
-               <TextBox Background="DarkGray" Height="30" Width="70" TextAlignment="Top" HorizontalStretch="true" Text="TopStretch"/>
-               <TextBox Background="DarkGray" Height="30" Width="60" TextAlignment="Center" HorizontalStretch="true" Text="HorizontalStretch" />
-               <TextBox Background="DarkGray" Height="30" Width="60" TextAlignment="Bottom" HorizontalStretch="true" Text="BottomStretch"/>
-               <TextBox Background="DarkGray" Height="10" Width="70" TextAlignment="Left" VerticalStretch="true" Text="LeftStretch"/>
-               <TextBox Background="DarkGray" Height="10" Width="70" TextAlignment="Center" VerticalStretch="true" Text="VerticalStretch"/>
-               <TextBox Background="DarkGray" Height="10" Width="70" TextAlignment="Right" VerticalStretch="true" Text="RightStretch"/>
-               <TextBox Background="DarkGray" Height="30" Width="50" HorizontalStretch="true" VerticalStretch="true" Text="Fit"/>
+               <TextBox Background="DarkGrey" Height="30" Width="70" TextAlignment="Top" HorizontalStretch="true" Text="TopStretch"/>
+               <TextBox Background="DarkGrey" Height="30" Width="60" TextAlignment="Center" HorizontalStretch="true" Text="HorizontalStretch" />
+               <TextBox Background="DarkGrey" Height="30" Width="60" TextAlignment="Bottom" HorizontalStretch="true" Text="BottomStretch"/>
+               <TextBox Background="DarkGrey" Height="10" Width="70" TextAlignment="Left" VerticalStretch="true" Text="LeftStretch"/>
+               <TextBox Background="DarkGrey" Height="10" Width="70" TextAlignment="Center" VerticalStretch="true" Text="VerticalStretch"/>
+               <TextBox Background="DarkGrey" Height="10" Width="70" TextAlignment="Right" VerticalStretch="true" Text="RightStretch"/>
+               <TextBox Background="DarkGrey" Height="30" Width="50" HorizontalStretch="true" VerticalStretch="true" Text="Fit"/>
        </HorizontalStack>      
        <TextBox Name="tb" Multiline="true" Font="droid,16" Margin="5" Text="A\nBB\nCCC\nDDDD"/>
        <TextBox Multiline="true" Font="droid,16" Name="tb5" Margin="5" Text="{../tb.SelectedText}"/>
index 22dfd7490d5b9074f2aaabbf90aa89bffae3979f..61e79a2837a6d16ecb42bf46f812760d342856da 100644 (file)
@@ -9,13 +9,13 @@
                        <Label Foreground="Black" Font="mono, 12" Text="."/>
                        <Label Foreground="Black" Font="mono, 12" Text="{Minor}"/>
                        <Label Foreground="Black" Font="mono, 12" Text="."/>
-                       <Label Foreground="DimGray" Font="mono, 12" Text="{Build}"/>
+                       <Label Foreground="DimGrey" Font="mono, 12" Text="{Build}"/>
                </HorizontalStack>
                <GraphicObject Height="30"/>
                <Label Font="20" Text="Press &lt;F2&gt; and &lt;F3&gt; to cycle into the examples"/>
                <Label Font="20" Text="Those are basic tests used to validate changes,"/>
                <GraphicObject Height="30"/>
-               <Label Foreground="DimGray" Font="20" Text="&lt;F5&gt; => File dialog example"/>
-               <Label Foreground="DimGray" Font="20" Text="&lt;F6&gt; => Window example"/>
+               <Label Foreground="DimGrey" Font="20" Text="&lt;F5&gt; => File dialog example"/>
+               <Label Foreground="DimGrey" Font="20" Text="&lt;F6&gt; => Window example"/>
        </VerticalStack>
 </Border>
\ No newline at end of file
index 356fa49a7d7beb75353a044ec9d00f9ae05257a0..ca1a7bb5bf5d935b31353fa125f164c8d35f0164 100755 (executable)
@@ -1,20 +1,20 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%" Spacing="100" Focusable="true">
-       <Container Name="source" StartDrag="{Background=DimGray}" EndDrag="{Background=SeaGreen}" Focusable="true" Fit="true"
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="90%" Spacing="100" Focusable="true">
+       <Container Name="source" StartDrag="{Background=DimGrey}" EndDrag="{Background=SeaGreen}" Focusable="true" Fit="true"
                        Drop="{../target.Background=Green}"
                        MouseEnter="{/txt.Foreground=Red}" MouseLeave="{/txt.Foreground=White}" MouseClick="{Background=SeaGreen}"
                        AllowDrag="true" Width="200" Height="200" Background="SeaGreen">
                <VerticalStack Margin="50">
-                       <Label Name="txt" Text="Drag me" Foreground="Gray"/>
-                       <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Gray"/>
+                       <Label Name="txt" Text="Drag me" Foreground="Grey"/>
+                       <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Grey"/>
                </VerticalStack>
        </Container>
-       <Container Name="target" DragEnter="{Background=SeaGreen}" DragLeave="{Background=DimGray}" Focusable="true" Fit="true"
+       <Container Name="target" DragEnter="{Background=SeaGreen}" DragLeave="{Background=DimGrey}" Focusable="true" Fit="true"
                        MouseEnter="{/txt.Foreground=Red}" MouseLeave="{/txt.Foreground=White}"
-                       AllowDrop="true"  Background="DimGray">
+                       AllowDrop="true"  Background="DimGrey">
                <VerticalStack Margin="50">
-                       <Label Name="txt" Text="Drop here" Foreground="Gray"/>
-                       <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Gray"/>
+                       <Label Name="txt" Text="Drop here" Foreground="Grey"/>
+                       <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Grey"/>
                </VerticalStack>
        </Container>
 </HorizontalStack>
\ No newline at end of file
index 94a936a6fb8a83280e02f3684801ac3dca6484c5..0b05e76d139f3ecb4e8e4242b82320c301848441 100644 (file)
@@ -6,11 +6,11 @@
                <DockWindow Left="450" Top="450" Width="150" Height="150" Background="Maize"/>-->
        
 
-<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
-       <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
-       <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
-       <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
-       <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></Window>
+<!--<Group Background="DimGrey" Margin = "0" Focusable="true" >
+       <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Grey}" MouseLeave="{Background=Green}"/></Window>
+       <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></Window>
+       <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></Window>
+       <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></Window>
 </Group>-->
 <!--<Docker >
        <DockWindow Resizable = "true" Top="100" Left="100" Caption="View 1" Width="300" Height="300">
@@ -20,7 +20,7 @@
                        <Label Text="{../../LogicalParent}" Background="Black"/>
                </VerticalStack>
        </DockWindow>
-       <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></DockWindow>
-       <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></DockWindow>
-       <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></DockWindow>
+       <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></DockWindow>
+       <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></DockWindow>
+       <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></DockWindow>
 </Docker>-->
\ No newline at end of file
index 700f965cb1de4fabf18ef07cb57f524cc9f7a5da..041d0d8555694a2f19bdae27ff18b7df8c9f2fb2 100644 (file)
@@ -6,11 +6,11 @@
        <DockWindow Left="400" Top="400" Width="150" Height="150" Background="DarkYellow"/>
        <DockWindow Left="500" Top="500" Width="150" Height="150" Background="Yellow"/>
 </Docker>
-<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
-       <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
-       <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
-       <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
-       <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></Window>
+<!--<Group Background="DimGrey" Margin = "0" Focusable="true" >
+       <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Grey}" MouseLeave="{Background=Green}"/></Window>
+       <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></Window>
+       <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></Window>
+       <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></Window>
 </Group>-->
 <!--<Docker >
        <DockWindow Resizable = "true" Top="100" Left="100" Caption="View 1" Width="300" Height="300">
@@ -20,7 +20,7 @@
                        <Label Text="{../../LogicalParent}" Background="Black"/>
                </VerticalStack>
        </DockWindow>
-       <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></DockWindow>
-       <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></DockWindow>
-       <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></DockWindow>
+       <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></DockWindow>
+       <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></DockWindow>
+       <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></DockWindow>
 </Docker>-->
\ No newline at end of file
index 88e309dc2bffdb6859a65091f70d9fc9a8488c3b..e17db3b123ec2cc27ac7b7d00928fccfa3e1016d 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <Window Width="600" Height="500">
-<VerticalStack Margin="20" Background="DimGray" Spacing="10">
+<VerticalStack Margin="20" Background="DimGrey" Spacing="10">
        <GraphicObject Height="100" Width="500" Background="Green"/>
        <Splitter/>
        <HorizontalStack>
        <GraphicObject Height="100" Width="500" Background="Green"/>
 </VerticalStack>
 </Window>
-<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
-       <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
-       <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
-       <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
-       <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></Window>
+<!--<Group Background="DimGrey" Margin = "0" Focusable="true" >
+       <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Grey}" MouseLeave="{Background=Green}"/></Window>
+       <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></Window>
+       <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></Window>
+       <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></Window>
 </Group>-->
 <!--<Docker >
        <DockWindow Resizable = "true" Top="100" Left="100" Caption="View 1" Width="300" Height="300">
@@ -26,7 +26,7 @@
                        <Label Text="{../../LogicalParent}" Background="Black"/>
                </VerticalStack>
        </DockWindow>
-       <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></DockWindow>
-       <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></DockWindow>
-       <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></DockWindow>
+       <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></DockWindow>
+       <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></DockWindow>
+       <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></DockWindow>
 </Docker>-->
\ No newline at end of file
index 9195ed4f2e09520f50153a9ee1acc3ace58802c8..836231de61168cb28536c3d74bdcd73580a1b068 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Group MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+<Group MinimumSize="50,50" Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        VerticalAlignment="Top"
                        MinimumSize="10,10"/>
index 4f355f9bca18c3ab1b91a1602d928b28837624c5..540d4192e31621be89dbee0638dece81cf16cf20 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Width="90%" Height="90%">
+<Group Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
index de743d3ad24929a34922465d8d697fd79a17916f..6982fc2b7a8c043735e824be724360f74b9ac93d 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Fit="true">
+<Group Background="DimGrey" Margin="10" Fit="true">
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
index e323fd082bb3357019ffa7df0cbc2fefc69f66ed..b64820630405357f637d6c43f2b0cfd8c97774df 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Width="70%" Height="50%">
+<Group Background="DimGrey" Margin="10" Width="70%" Height="50%">
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
index b7704d5bd5e0926df4b856dbc542b837ca1f6914..815ef4950c0745ffc8cb100952e15f6f7558c7c5 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Fit="true">
+<Group Background="DimGrey" Margin="10" Fit="true">
        <Label Font="droid bold,40" Text="{fps}" Margin="10"  Fit="true"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
                        VerticalAlignment="Top"
index e7eef87b3df176e9d26fa09949cb84b0b1f4544c..48c1ea1e7d58f822b25a8166fc6519646e67bada 100755 (executable)
@@ -19,7 +19,7 @@
        </Border>
        <Splitter Thickness="3"/>
        <Border Width="45%" CornerRadius="10" BorderWidth="1">
-               <VerticalStack Width="50%" Height="50%" Background="DimGray">
+               <VerticalStack Width="50%" Height="50%" Background="DimGrey">
                        <RadioButton IsChecked="false" Caption="Choice 1" Background="hgradient|0:DarkRed|1:Transparent"/>
                        <RadioButton IsChecked="false" Caption="Choice 2"  Background="hgradient|0:DarkRed|1:Transparent"/>
                        <RadioButton IsChecked="true" Caption="Choice 3"  Background="hgradient|0:DarkRed|1:Transparent"/>
index 467a063edb2495a840903907f8119c35a618fd41..1cdc498159b9f2c07d774bfba0710e03d28e281f 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<VerticalStack MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+<VerticalStack MinimumSize="50,50" Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
index 95ef13598cfc362d00189424e3ecc30eff453578..24ee8a4916022e0be538318bef694d5554fb3a86 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<HorizontalStack MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+<HorizontalStack MinimumSize="50,50" Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
index 8a6a3c3c8a945e0f2eeab73e1b71257b8368ad4b..d0e0c350b35dbc94c910ce8627a43b0597c56c17 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<VerticalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="SeaGreen"
index c8ea266d02878de93aa71cb1def301704cf4a6cc..b4cb18d29179c6816d0e3a719c6adb8e0848042d 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
                        MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="SeaGreen"
index a3f2c019c015a019cfad830733259224eea89e7e..64006cce251d0ab66d640ce0760e401ff978591d 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="100%">
+<VerticalStack Background="DimGrey" Margin="10" Width="90%" Height="100%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
index faa5956c251b67d9d7548e587191238e2846e942..3bb7d5f02bd8e6b480507533072a17b4bcd0e2e6 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="100%">
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="100%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
index b7784b908edbcccb67d159a5c79b3dc76df2c75b..b7d3543a036d35d910bf09b6214b0d6da655ecc4 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<VerticalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
index 620cdeeee686e735f6bd3154cc37f35cec9f4108..a20a284b1f051a8d10f4b0578fb0d8613a446433 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
                        MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
index 6a7f2da7fcdb4a190af59b7a5e5c12538926f05a..33d57deb4f11bf7da87ba03ae28d70c32ed35ea0 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <VerticalStack>
-       <HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="20%">
+       <HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="20%">
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
@@ -12,7 +12,7 @@
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
        </HorizontalStack>
-       <HorizontalStack Background="DimGray" Margin="10" Width="Fit" Height="20%">
+       <HorizontalStack Background="DimGrey" Margin="10" Width="Fit" Height="20%">
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
                <Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
index df580a857e68c5f331a5173fc5e2f5176bd36843..8dd0d0495d4bbf491796891087c82b18067de03a 100644 (file)
@@ -2,13 +2,13 @@
 <GenericStack Orientation="Vertical" Spacing="0"
                Background="{./Background}"
                MouseEnter="{/caption.Foreground=White}"
-               MouseLeave="{/caption.Foreground=Gray}">
+               MouseLeave="{/caption.Foreground=Grey}">
        <HorizontalStack Left="{./TabOffset}"
                Name="TabTitle"
                HorizontalAlignment="Left"
                Height="{./TabHeight}"
                Width="{./TabWidth}">
-               <Label Name="caption" Text="{./Caption}" Foreground="Gray" Width="Stretched"/>
+               <Label Name="caption" Text="{./Caption}" Foreground="Grey" Width="Stretched"/>
                <Label Text="{./ViewIndex}" Foreground="Green"/>
                <Label Text="{./TabOffset}" Foreground="Red"/>
                <Border CornerRadius="5" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
@@ -18,7 +18,7 @@
                </Border>
        </HorizontalStack>
        <Container Margin="20">
-               <Container Background="DimGray" Name="Content"/>
+               <Container Background="DimGrey" Name="Content"/>
        </Container>
 </GenericStack>
 
index e600d37cc1cedafdc611f5849c98e48d6487efeb..5b267402eb3409ce0289aad71e51350482e2cf5e 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Expandable Fit="true" Caption="Test expandable" Background="DimGray">
+<Expandable Fit="true" Caption="Test expandable" Background="DimGrey">
                <VerticalStack Margin="5" >
                        <CheckBox Name="chk1" />
                        <CheckBox Name="chk2" IsChecked="true"/>
index c1362017d4f88419993a8563d0adf35de7d83937..641d58f9e8c1cc6e53e2b79d3f7b3003ae80b747 100755 (executable)
@@ -1,8 +1,8 @@
-<Expandable Width="Stretched"  Background="Gray">
+<Expandable Width="Stretched"  Background="Grey">
                <Expandable Width="Stretched" Background="LightBlue">
                        <Expandable Width="Stretched" Background="Green">
                                <Expandable Width="Stretched" Background="LimeGreen">
-                                       <Expandable Width="Stretched" Background="DimGray">
+                                       <Expandable Width="Stretched" Background="DimGrey">
                                                <Expandable Width="Stretched" Background="Yellow">
                                                        <Expandable Width="Stretched" Background="SeaGreen">
                                                                <Expandable Width="Stretched" Background="Blue">
index 648b7a82846f2ad401c2b04701b665a0be4725c9..99a7507989c0a5e88879ffcedc8ad67b5eafdcbc 100755 (executable)
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>
 <VerticalStack Height="Fit" Width="Fit">
        <Label Width="Stretched"/>
-       <Expandable  Width="Fit" Background="Gray">
+       <Expandable  Width="Fit" Background="Grey">
                <Expandable Background="LightBlue">
                        <Expandable Background="Green">
                                <Expandable Background="LimeGreen">
-                                       <Expandable Background="DimGray">
+                                       <Expandable Background="DimGrey">
                                                <Expandable Width="Stretched" Background="Yellow">
                                                        <Expandable Background="SeaGreen">
                                                                <Expandable Width="Stretched" Background="Blue">
index 416bb217ea978d62db269340609dbd428deaa070..48581803278c64e00b90253843c62b6979a1a32f 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!--<Container Background="vgradient|0:DarkGray|1:DimGray">-->
+<!--<Container Background="vgradient|0:DarkGrey|1:DimGrey">-->
        <GroupBox Fit="true" Background="vgradient|0:SteelBlue|1:Transparent"
                Foreground="White">
 <!--           <Label/>-->
index 07e56b8029ef450865a59532bc245eff2e971ef1..7d70da96dc6d2ea5ae02e289e61304a4d40a8baf 100755 (executable)
@@ -9,7 +9,7 @@
                </VerticalStack>
        </Border>
        <GraphicObject Height="200"/>
-       <Popper Caption="TestPopper" Width="100" Background="DimGray" PopDirection="{alignment}">
+       <Popper Caption="TestPopper" Width="100" Background="DimGrey" PopDirection="{alignment}">
                <Border Fit="True" Background="SteelBlue">
                        <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>
                        <VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
index c9e211f8fcbc23cc9f8c67b31b838497f0e48b04..e3717c82cf3eb861a061dcfb337af7bc62970025 100644 (file)
@@ -5,8 +5,8 @@
                <Label Text="Selected Tab:"/>
                <Label Text="{../../tabview1.SelectedTab}"/>
        </HorizontalStack>
-       <TabView Name="tabview1" Background="DimGray" Orientation="Horizontal">
-               <TabItem Name="TabItem1" Caption="tab item 1" Background="DimGray">
+       <TabView Name="tabview1" Background="DimGrey" Orientation="Horizontal">
+               <TabItem Name="TabItem1" Caption="tab item 1" Background="DimGrey">
                        <VerticalStack Margin="20">
                                <CheckBox/>
                                <CheckBox/>
@@ -14,7 +14,7 @@
                                <CheckBox/>
                        </VerticalStack>
                </TabItem>
-               <TabItem Name="TabItem2" Caption="tab item 2" Background="DimGray">
+               <TabItem Name="TabItem2" Caption="tab item 2" Background="DimGrey">
                        <VerticalStack Height="Fit" Margin="10">
                                <RadioButton Fit="true"/>
                                <RadioButton/>
                                <RadioButton/>
                        </VerticalStack>
                </TabItem>
-               <TabItem Name="TabItem3" Background="DimGray" Caption="tab item 3">
+               <TabItem Name="TabItem3" Background="DimGrey" Caption="tab item 3">
                        <Container Margin="5" CornerRadius="2" >
                                <TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
                        </Container>
                </TabItem>
-               <TabItem Name="TabItem4" Background="DimGray" Caption="tab item 4" Margin="0">
+               <TabItem Name="TabItem4" Background="DimGrey" Caption="tab item 4" Margin="0">
                        <TextBox/>
                </TabItem>
        </TabView>
-       <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
+       <Button Background="vgradient|0:DimGrey|1:Black" HorizontalAlignment="Right"
                Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick"/>
 </VerticalStack>
 </Group>
\ No newline at end of file
index c02e991ab3f634e4d02e7c8f38c9b1a339fba617..67b87b07829c3aba91330bf94cfa9288c94ba581 100644 (file)
@@ -5,8 +5,8 @@
                        <Label Text="Selected Tab:"/>
                        <Label Text="{../../tabview1.SelectedTab}"/>
                </HorizontalStack>
-               <TabView Name="tabview1" Background="DimGray" Orientation="Horizontal" Margin="5" >
-                       <TabItem Name="TabItem1" Caption="tab-1.1" Background="DimGray">
+               <TabView Name="tabview1" Background="DimGrey" Orientation="Horizontal" Margin="5" >
+                       <TabItem Name="TabItem1" Caption="tab-1.1" Background="DimGrey">
                                <VerticalStack Margin="20">
                                        <CheckBox/>
                                        <CheckBox/>
@@ -14,7 +14,7 @@
                                        <CheckBox/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem2" Caption="tab-1.2" Background="DimGray">
+                       <TabItem Name="TabItem2" Caption="tab-1.2" Background="DimGrey">
                                <VerticalStack Height="Fit" Margin="10">
                                        <RadioButton Fit="true"/>
                                        <RadioButton/>
                                        <RadioButton/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem3" Background="DimGray" Caption="tab-1.3">
+                       <TabItem Name="TabItem3" Background="DimGrey" Caption="tab-1.3">
                                <Container Margin="5" CornerRadius="2" >
                                        <TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
                                </Container>
                        </TabItem>
                </TabView>
-               <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
+               <Button Background="vgradient|0:DimGrey|1:Black" HorizontalAlignment="Right"
                        Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick"/>    
        </VerticalStack>
        <VerticalStack Width="40%">     
@@ -36,8 +36,8 @@
                        <Label Text="Selected Tab:"/>
                        <Label Text="{../../tabview2.SelectedTab}"/>
                </HorizontalStack>
-               <TabView Name="tabview2" Background="DimGray" Orientation="Horizontal" >
-                       <TabItem Name="TabItem1" Caption="tab-2.1" Background="DimGray">
+               <TabView Name="tabview2" Background="DimGrey" Orientation="Horizontal" >
+                       <TabItem Name="TabItem1" Caption="tab-2.1" Background="DimGrey">
                                <VerticalStack Margin="20">
                                        <CheckBox/>
                                        <CheckBox/>
@@ -45,7 +45,7 @@
                                        <CheckBox/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem2" Caption="tab-2.2" Background="DimGray">
+                       <TabItem Name="TabItem2" Caption="tab-2.2" Background="DimGrey">
                                <VerticalStack Height="Fit" Margin="10">
                                        <RadioButton Fit="true"/>
                                        <RadioButton/>
                                        <RadioButton/>
                                </VerticalStack>
                        </TabItem>
-                       <TabItem Name="TabItem3" Background="DimGray" Caption="tab-2.3">
+                       <TabItem Name="TabItem3" Background="DimGrey" Caption="tab-2.3">
                                <Container Margin="5" CornerRadius="2" >
                                        <TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
                                </Container>
                        </TabItem>
                </TabView>
-               <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
+               <Button Background="vgradient|0:DimGrey|1:Black" HorizontalAlignment="Right"
                        Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick2"/>   
        </VerticalStack>
 </HorizontalStack>
index 69367eaaeeff0b1a315c4a98168f987ee0168f4e..8911619da7e31de28d096286f494e81f7457afdb 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<VerticalStack Fit="true" Background="vgradient|0:DimGray|1:Black">
+<VerticalStack Fit="true" Background="vgradient|0:DimGrey|1:Black">
        <HorizontalStack Fit="True">
                <Button Caption="but" MouseClick="onButClick"/>
                <Button Caption="but" MouseClick="onButClick" Fit="true"/>
index 5147a1513e4132d3dfeffc4654dcfd70669ff17d..7c8438c0a2cbfc63efa2aac4ab03454095a661fd 100755 (executable)
@@ -1,11 +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 Fit="true" Margin="100" Background="DimGrey" >
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+       <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
 </VerticalStack>
index 3ef27acec4293c9b4439b06aa26ecbd932ee6abe..4363986e79f4d50088f2ee72a5b0d0d79af22d5d 100755 (executable)
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
-<Container Background="DimGray" Width="300">
+<Container Background="DimGrey" Width="300">
        <ComboBox  Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem.crow"/>
 </Container>
\ No newline at end of file
index 905cdeba8ddc0c6ff8ad2253b02196e28b016688..a01d90414d3a75c82f37efabc6d17effff21fca7 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGray">
+<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGrey">
        <RadioButton Caption="Radio1"/>
        <RadioButton Caption="Radio2" IsChecked="true"/>
        <RadioButton Caption="Radio3"/>
index c494e347e65af40d9b5aaa3d185e87f31d1820b5..f8c4a9aeee78f636b97506dc7d0d33dda8d1fe88 100755 (executable)
@@ -1,5 +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"/>
+       Focusable="True" Background="Grey">
+       <ScrollBar Height="16" Orientation="Horizontal" Width="Stretched" Maximum="100"/>
 </Group>
\ No newline at end of file
index 07d62e6528f4d3dc4224a9392f187dbc675ac0ad..01d53016e34a18edeb025281ceea778bacb4d79c 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <VerticalStack Name="TopContainer" Width="400" Height="Fit"
-       Margin="20" Background="DarkGray">
+       Margin="20" Background="DarkGrey">
 
        <HorizontalStack Fit="true" Margin="5" Background="SkyBlue">
                <Spinner Name="sp1" Value="5" ValueChanged="onSpinnerValueChange"/>
index d823ea4276ea58f8f54d5cb41d330a5de6e98aea..22a62ea1e214793a30914da002ccb822c368e884 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 
-       <VerticalStack Spacing="0" Fit="true" Width="160">
-               <HorizontalStack Background="Black">
+       <VerticalStack Spacing="1" Height="Fit" Width="Stretched">
+               <HorizontalStack Background="DarkSlateGrey">
                        <Label Text="{Name}" Width="Stretched" Font="doid bold, 10" Margin="2"/>
                        <Button Caption="Reset" MouseClick="onResetClick" Height="Fit"/>
                </HorizontalStack>
@@ -21,6 +21,9 @@
                        <Label Text="Maximum:" Style="FpsLabel"/>
                        <Label Text="{maximum}" Style="FpsDisp"/>
                </HorizontalStack>
+               <Border Foreground="White" Width="Stretched" Height="60">
+                       <Trend Background="Black" NewValue="{current}" Minimum="0" Maximum="100"/>
+               </Border>
 <!--           <HorizontalStack>
                        <Label Text="Total:" Style="FpsLabel"/>
                        <Label Text="{total}" Style="FpsDisp"/>
diff --git a/Tests/OpenGL/Extensions.cs b/Tests/OpenGL/Extensions.cs
deleted file mode 100644 (file)
index 7b26f76..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-//  Extensions.cs
-//
-//  Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-//  Copyright (c) 2017 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 OpenTK;
-using Crow;
-
-namespace Crow
-{
-       public static partial class Extensions {
-               public static Vector4 ToVector4(this Color c){
-                       float[] f = c.floatArray;
-                       return new Vector4 (f [0], f [1], f [2], f [3]);
-               }
-               public static Vector3 Transform(this Vector3 v, Matrix4 m){
-                       return Vector4.Transform(new Vector4(v, 1), m).Xyz;
-               }
-               public static bool IsInBetween(this int v, int min, int max){
-                       return v >= min & v <= max;
-               }
-
-       }
-}
-
diff --git a/Tests/OpenGL/Shader.cs b/Tests/OpenGL/Shader.cs
deleted file mode 100644 (file)
index 1253ff7..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-//
-//  Shader.cs
-//
-//  Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-//  Copyright (c) 2016 jp
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-using System;
-using System.Diagnostics;
-using System.IO;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-
-namespace Crow
-{
-       public class Shader : IDisposable
-       {
-               #region CTOR
-               public Shader ()
-               {
-                       Init ();
-               }
-               public Shader (string vertResPath, string fragResPath = null, string geomResPath = null)
-               {
-                       VertSourcePath = vertResPath;
-                       FragSourcePath = fragResPath;
-                       GeomSourcePath = geomResPath;
-
-                       loadSourcesFiles ();
-
-                       Init ();
-               }
-               #endregion
-
-               public string   VertSourcePath,
-                                               FragSourcePath,
-                                               GeomSourcePath;
-               #region Sources
-               protected string _vertSource = @"
-                       #version 300 es
-                       precision lowp float;
-
-                       uniform mat4 mvp;
-
-                       layout(location = 0) in vec3 in_position;
-                       layout(location = 1) in vec2 in_tex;
-
-                       out vec2 texCoord;
-
-                       void main(void)
-                       {
-                               texCoord = in_tex;
-                               gl_Position = mvp * vec4(in_position, 1.0);
-                       }";
-
-               protected string _fragSource = @"
-                       #version 300 es
-                       precision lowp float;
-
-                       uniform sampler2D tex;
-
-                       in vec2 texCoord;
-                       out vec4 out_frag_color;
-
-                       void main(void)
-                       {
-                               out_frag_color = texture( tex, texCoord);//vec4(1,0,0,1);
-                       }";
-               string _geomSource = @"";
-//                     #version 330
-//                     layout(triangles) in;
-//                     layout(triangle_strip, max_vertices=3) out;
-//                     void main()
-//                     {
-//                             for(int i=0; i<3; i++)
-//                             {
-//                                     gl_Position = gl_in[i].gl_Position;
-//                                     EmitVertex();
-//                             }
-//                             EndPrimitive();
-//                     }";
-               #endregion
-
-               #region Private and protected fields
-               public int vsId, fsId, gsId, pgmId, mvpLocation;
-
-               Matrix4 mvp = Matrix4.Identity;
-               #endregion
-
-
-               #region Public properties
-               public virtual string vertSource
-               {
-                       get { return _vertSource;}
-                       set { _vertSource = value; }
-               }
-               public virtual string fragSource
-               {
-                       get { return _fragSource;}
-                       set { _fragSource = value; }
-               }
-               public virtual string geomSource
-               {
-                       get { return _geomSource; }
-                       set { _geomSource = value; }
-               }
-
-               public virtual Matrix4 MVP{
-                       set { mvp = value; }
-                       get { return mvp; }
-               }
-               #endregion
-
-               #region Public functions
-               /// <summary>
-               /// configure sources and compile
-               /// </summary>
-               public virtual void Init()
-               {
-                       Compile ();
-               }
-               public void Reload(){
-                       loadSourcesFiles ();
-                       Compile ();
-               }
-               public void SetSource(ShaderType shaderType, string _source){
-                       switch (shaderType) {
-                       case ShaderType.FragmentShader:
-                               fragSource = _source;
-                               return;
-                       case ShaderType.VertexShader:
-                               vertSource = _source;
-                               return;
-                       case ShaderType.GeometryShader:
-                               geomSource = _source;
-                               return;
-                       }
-               }
-               public string GetSource(ShaderType shaderType){
-                       switch (shaderType) {
-                       case ShaderType.FragmentShader:
-                               return fragSource;
-                       case ShaderType.VertexShader:
-                               return vertSource;
-                       case ShaderType.GeometryShader:
-                               return geomSource;
-                       }
-                       return "";
-               }
-               public string GetSourcePath(ShaderType shaderType){
-                       switch (shaderType) {
-                       case ShaderType.FragmentShader:
-                               return FragSourcePath;
-                       case ShaderType.VertexShader:
-                               return VertSourcePath;
-                       case ShaderType.GeometryShader:
-                               return GeomSourcePath;
-                       }
-                       return "";
-               }
-               public virtual void Compile()
-               {
-                       Dispose ();
-
-                       pgmId = GL.CreateProgram();
-
-                       if (!string.IsNullOrEmpty(vertSource))
-                       {
-                               vsId = GL.CreateShader(ShaderType.VertexShader);
-                               compileShader(vsId, vertSource);
-                       }
-                       if (!string.IsNullOrEmpty(fragSource))
-                       {
-                               fsId = GL.CreateShader(ShaderType.FragmentShader);
-                               compileShader(fsId, fragSource);
-
-                       }
-                       if (!string.IsNullOrEmpty(geomSource))
-                       {
-                               gsId = GL.CreateShader(ShaderType.GeometryShader);
-                               compileShader(gsId,geomSource);
-                       }
-
-                       if (vsId != 0)
-                               GL.AttachShader(pgmId, vsId);
-                       if (fsId != 0)
-                               GL.AttachShader(pgmId, fsId);
-                       if (gsId != 0)
-                               GL.AttachShader(pgmId, gsId);
-
-                       BindVertexAttributes ();
-
-                       string info;
-                       GL.LinkProgram(pgmId);
-                       GL.GetProgramInfoLog(pgmId, out info);
-
-                       if (!string.IsNullOrEmpty (info)) {
-                               Debug.WriteLine ("Linkage:");
-                               Debug.WriteLine (info);
-                       }
-
-                       info = null;
-
-                       GL.ValidateProgram(pgmId);
-                       GL.GetProgramInfoLog(pgmId, out info);
-                       if (!string.IsNullOrEmpty (info)) {
-                               Debug.WriteLine ("Validation:");
-                               Debug.WriteLine (info);
-                       }
-
-                       GL.UseProgram (pgmId);
-
-                       GetUniformLocations ();
-                       BindSamplesSlots ();
-
-                       Disable ();
-               }
-
-               protected virtual void BindVertexAttributes()
-               {
-                       GL.BindAttribLocation(pgmId, 0, "in_position");
-                       GL.BindAttribLocation(pgmId, 1, "in_tex");
-               }
-               protected virtual void GetUniformLocations()
-               {
-                       mvpLocation = GL.GetUniformLocation(pgmId, "mvp");
-               }
-               protected virtual void BindSamplesSlots(){
-                       GL.Uniform1(GL.GetUniformLocation (pgmId, "tex"), 0);
-               }
-               public void SetMVP(Matrix4 _mvp){
-                       GL.UniformMatrix4(mvpLocation, false, ref _mvp);
-               }
-               public virtual void Enable(){
-                       GL.UseProgram (pgmId);
-               }
-               public virtual void Disable(){
-                       GL.UseProgram (0);
-               }
-               public static void Enable(Shader s)
-               {
-                       if (s == null)
-                               return;
-                       s.Enable ();
-               }
-               public static void Disable(Shader s)
-               {
-                       if (s == null)
-                               return;
-                       s.Disable ();
-               }
-               #endregion
-
-               void loadSourcesFiles(){
-                       Stream s;
-
-                       if (!string.IsNullOrEmpty (VertSourcePath)) {
-                               s = Crow.Interface.StaticGetStreamFromPath (VertSourcePath);
-                               if (s != null) {
-                                       using (StreamReader sr = new StreamReader (s)) {
-                                               vertSource = sr.ReadToEnd ();
-                                       }
-                               }
-                       }
-
-                       if (!string.IsNullOrEmpty (FragSourcePath)) {
-                               s = Crow.Interface.StaticGetStreamFromPath (FragSourcePath);
-                               if (s != null) {
-                                       using (StreamReader sr = new StreamReader (s)) {
-                                               fragSource = sr.ReadToEnd ();
-                                       }
-                               }
-                       }
-
-                       if (!string.IsNullOrEmpty (GeomSourcePath)) {
-                               s = Crow.Interface.StaticGetStreamFromPath (GeomSourcePath);
-                               if (s != null) {
-                                       using (StreamReader sr = new StreamReader (s)) {
-                                               geomSource = sr.ReadToEnd ();
-                                       }
-                               }
-                       }                       
-               }
-               void compileShader(int shader, string source)
-               {
-                       GL.ShaderSource(shader, source);
-                       GL.CompileShader(shader);
-
-                       string info;
-                       GL.GetShaderInfoLog(shader, out info);
-                       Debug.WriteLine(info);
-
-                       int compileResult;
-                       GL.GetShader(shader, ShaderParameter.CompileStatus, out compileResult);
-                       if (compileResult != 1)
-                       {
-                               Debug.WriteLine("Compile Error!");
-                               Debug.WriteLine(source);
-                       }
-               }
-               public override string ToString ()
-               {
-                       return string.Format ("{0} {1} {2}", VertSourcePath, FragSourcePath, GeomSourcePath);
-               }
-
-               #region IDisposable implementation
-               public virtual void Dispose ()
-               {                       
-                       if (GL.IsProgram (pgmId))
-                               GL.DeleteProgram (pgmId);
-
-                       if (GL.IsShader (vsId))
-                               GL.DeleteShader (vsId);
-                       if (GL.IsShader (fsId))
-                               GL.DeleteShader (fsId);
-                       if (GL.IsShader (gsId))
-                               GL.DeleteShader (gsId);
-               }
-               #endregion
-       }
-}
-
diff --git a/Tests/OpenGL/Texture.cs b/Tests/OpenGL/Texture.cs
deleted file mode 100644 (file)
index 08215ad..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-//  Texture.cs
-//
-//  Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-//  Copyright (c) 2016 jp
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-using System;
-using System.Drawing;
-using OpenTK.Graphics.OpenGL;
-using System.Drawing.Imaging;
-using System.IO;
-using System.Diagnostics;
-
-namespace Crow
-{
-    public class Texture
-    {
-        public string Map;
-        public int texRef;
-               public int Width;
-               public int Height;
-                       
-               public Texture(string _mapPath, bool flipY = true)
-        {
-                       using (Stream s = Interface.StaticGetStreamFromPath (_mapPath)) {
-
-                               try {
-                                       Map = _mapPath;
-
-                                       Bitmap bitmap = new Bitmap (s);
-
-                                       if (flipY)
-                                               bitmap.RotateFlip (RotateFlipType.RotateNoneFlipY);
-
-                                       BitmapData data = bitmap.LockBits (new System.Drawing.Rectangle (0, 0, bitmap.Width, bitmap.Height),
-                                               ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
-
-                                       createTexture (data.Scan0, data.Width, data.Height);
-
-                                       bitmap.UnlockBits (data);
-
-                                       GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
-                                       GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
-
-                                       GL.GenerateMipmap (GenerateMipmapTarget.Texture2D);
-
-                               } catch (Exception ex) {
-                                       Debug.WriteLine ("Error loading texture: " + Map + ":" + ex.Message);
-                               }
-                       }
-               }
-
-               public Texture(int width, int height)
-               {
-                       createTexture (IntPtr.Zero, width, height);
-                       GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
-                       GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
-                       GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Clamp);
-                       GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Clamp);
-               }
-
-               void createTexture(IntPtr data, int width, int height)
-               {
-                       Width = width;
-                       Height = height;
-
-                       GL.GenTextures(1, out texRef);
-                       GL.BindTexture(TextureTarget.Texture2D, texRef);
-                       GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, width, height, 0,
-                               OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data);                 
-               }       
-                       
-        public static implicit operator int(Texture t)
-        { 
-            return t == null ? 0: t.texRef; 
-        }
-    }
-
-}
diff --git a/Tests/OpenGL/vaoMesh.cs b/Tests/OpenGL/vaoMesh.cs
deleted file mode 100644 (file)
index 19acd73..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-//
-//  vaoMesh.cs
-//
-//  Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-//  Copyright (c) 2016 jp
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-
-namespace Crow
-{
-       public class vaoMesh : IDisposable
-       {
-               public int vaoHandle,
-               positionVboHandle,
-               texVboHandle,
-               eboHandle;
-
-               public Vector3[] positions;
-               public Vector2[] texCoords;
-               public int[] indices;
-
-               public vaoMesh()
-               {
-               }
-
-               public vaoMesh (Vector3[] _positions, Vector2[] _texCoord, int[] _indices)
-               {
-                       positions = _positions;
-                       texCoords = _texCoord;
-                       indices = _indices;
-
-                       CreateBuffers ();
-               }
-
-               public vaoMesh (float x, float y, float z, float width, float height, float TileX = 1f, float TileY = 1f)
-               {
-                       positions =
-                               new Vector3[] {
-                               new Vector3 (x - width / 2, y + height / 2, z),
-                               new Vector3 (x - width / 2, y - height / 2, z),
-                               new Vector3 (x + width / 2, y + height / 2, z),
-                               new Vector3 (x + width / 2, y - height / 2, z)
-                       };
-                       texCoords =     new Vector2[] {
-                               new Vector2 (0, TileY),
-                               new Vector2 (0, 0),
-                               new Vector2 (TileX, TileY),
-                               new Vector2 (TileX, 0)
-                       };
-                       indices = new int[] { 0, 1, 2, 3 };
-
-                       CreateBuffers ();
-               }
-               public static vaoMesh CreateCube(){
-                       vaoMesh tmp = new vaoMesh ();
-                       tmp.positions = new Vector3[]
-                       {
-                               new Vector3(-1.0f, -1.0f,  -1.0f),
-                               new Vector3( -1.0f, -1.0f,  1.0f),
-                               new Vector3( 1.0f,  -1.0f,  -1.0f),
-                               new Vector3(1.0f,  -1.0f,  1.0f),
-                               new Vector3(1.0f, 1.0f, -1.0f),
-                               new Vector3( 1.0f, 1.0f, 1.0f), 
-                               new Vector3( -1.0f,  1.0f, -1.0f),
-                               new Vector3(-1.0f,  1.0f, 1.0f)
-                       };
-                       tmp.indices = new int[]
-                       {
-                               // front face
-                               0, 2, 1, 1, 2, 3,
-                               // top face
-                               2, 4, 3, 3, 4, 5,
-                               // back face
-                               4, 6, 5, 5, 6, 7,
-                               // left face
-                               6, 0, 7, 7, 0, 1,
-                               // bottom face
-                               1, 3, 7, 7, 3, 5,
-                               // right face
-//                             1, 5, 6, 6, 2, 1,
-                       };
-                       tmp.texCoords = new Vector2[]
-                       {
-                               new Vector2(0, 0),
-                               new Vector2(0, 1),
-                               new Vector2(1, 0),
-                               new Vector2(1, 1),
-                               new Vector2(0, 0),
-                               new Vector2(0, 1),
-                               new Vector2(1, 0),
-                               new Vector2(1, 1),
-                       };                      
-                       tmp.CreateBuffers ();
-                       return tmp;
-//                             Normals = new Vector3[]
-//                             {
-//                                     new Vector3(-1.0f, -1.0f,  1.0f),
-//                                     new Vector3( 1.0f, -1.0f,  1.0f),
-//                                     new Vector3( 1.0f,  1.0f,  1.0f),
-//                                     new Vector3(-1.0f,  1.0f,  1.0f),
-//                                     new Vector3(-1.0f, -1.0f, -1.0f),
-//                                     new Vector3( 1.0f, -1.0f, -1.0f),
-//                                     new Vector3( 1.0f,  1.0f, -1.0f),
-//                                     new Vector3(-1.0f,  1.0f, -1.0f),
-//                             };
-//
-//                             Colors = new int[]
-//                             {
-//                                     Utilities.ColorToRgba32(Color.DarkRed),
-//                                     Utilities.ColorToRgba32(Color.DarkRed),
-//                                     Utilities.ColorToRgba32(Color.Gold),
-//                                     Utilities.ColorToRgba32(Color.Gold),
-//                                     Utilities.ColorToRgba32(Color.DarkRed),
-//                                     Utilities.ColorToRgba32(Color.DarkRed),
-//                                     Utilities.ColorToRgba32(Color.Gold),
-//                                     Utilities.ColorToRgba32(Color.Gold),
-//                             };
-               }
-               public void CreateBuffers(){
-                       CreateVBOs ();
-                       CreateVAOs ();
-               }
-               protected void CreateVBOs()
-               {
-                       positionVboHandle = GL.GenBuffer();
-                       GL.BindBuffer(BufferTarget.ArrayBuffer, positionVboHandle);
-                       GL.BufferData<Vector3>(BufferTarget.ArrayBuffer,
-                               new IntPtr(positions.Length * Vector3.SizeInBytes),
-                               positions, BufferUsageHint.StaticDraw);
-
-                       if (texCoords != null) {
-                               texVboHandle = GL.GenBuffer ();
-                               GL.BindBuffer (BufferTarget.ArrayBuffer, texVboHandle);
-                               GL.BufferData<Vector2> (BufferTarget.ArrayBuffer,
-                                       new IntPtr (texCoords.Length * Vector2.SizeInBytes),
-                                       texCoords, BufferUsageHint.StaticDraw);
-                       }
-
-                       GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
-
-                       if (indices != null) {
-                               eboHandle = GL.GenBuffer ();
-                               GL.BindBuffer (BufferTarget.ElementArrayBuffer, eboHandle);
-                               GL.BufferData (BufferTarget.ElementArrayBuffer,
-                                       new IntPtr (sizeof(uint) * indices.Length),
-                                       indices, BufferUsageHint.StaticDraw);
-                               GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);
-                       }
-               }
-               protected void CreateVAOs()
-               {
-                       vaoHandle = GL.GenVertexArray();
-                       GL.BindVertexArray(vaoHandle);
-
-                       GL.EnableVertexAttribArray(0);
-                       GL.BindBuffer(BufferTarget.ArrayBuffer, positionVboHandle);
-                       GL.VertexAttribPointer(0, 3, VertexAttribPointerType.Float, true, Vector3.SizeInBytes, 0);
-
-                       if (texCoords != null) {
-                               GL.EnableVertexAttribArray (1);
-                               GL.BindBuffer (BufferTarget.ArrayBuffer, texVboHandle);
-                               GL.VertexAttribPointer (1, 2, VertexAttribPointerType.Float, true, Vector2.SizeInBytes, 0);
-                       }
-                       if (indices != null)
-                               GL.BindBuffer(BufferTarget.ElementArrayBuffer, eboHandle);
-
-                       GL.BindVertexArray(0);
-               }
-
-               public void Render(BeginMode _primitiveType){
-                       GL.BindVertexArray(vaoHandle);
-                       if (indices == null)
-                               GL.DrawArrays (_primitiveType, 0, positions.Length);
-                       else
-                               GL.DrawElements(_primitiveType, indices.Length,
-                                       DrawElementsType.UnsignedInt, IntPtr.Zero);
-                       GL.BindVertexArray (0);
-               }
-               public void Render(BeginMode _primitiveType, int[] _customIndices){
-                       GL.BindVertexArray(vaoHandle);
-                       GL.DrawElements(_primitiveType, _customIndices.Length,
-                               DrawElementsType.UnsignedInt, _customIndices);
-                       GL.BindVertexArray (0);
-               }
-               public void Render(BeginMode _primitiveType, int instances){
-
-                       GL.BindVertexArray(vaoHandle);
-                       GL.DrawElementsInstanced(_primitiveType, indices.Length,
-                               DrawElementsType.UnsignedInt, IntPtr.Zero, instances);
-                       GL.BindVertexArray (0);
-               }
-
-               #region IDisposable implementation
-               public void Dispose ()
-               {
-                       GL.DeleteBuffer (positionVboHandle);
-                       GL.DeleteBuffer (texVboHandle);
-                       GL.DeleteBuffer (eboHandle);
-                       GL.DeleteVertexArray (vaoHandle);
-               }
-               #endregion
-
-       }
-}
\ No newline at end of file
index da9b99dc89b5f4cec7ec40e8c0fcfe3c7092fc1c..e5a9316efb4b304960bc9ac85e9aa24ce0679439 100644 (file)
@@ -25,8 +25,6 @@
 // THE SOFTWARE.
 
 using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
 using Crow;
 using System.IO;
 using System.Collections.Generic;
@@ -37,44 +35,41 @@ using Crow.IML;
 
 namespace Tests
 {
-       class Showcase : CrowWindow
+       class Showcase : Interface
        {
+               public Container crowContainer;
+
                [STAThread]
                static void Main ()
                {
-                       Showcase win = new Showcase ();
-                       win.Run (30);
-               }
+                       using (Showcase app = new Showcase ()) {
+                               app.KeyboardKeyDown += App_KeyboardKeyDown;
 
-               public Showcase ()
-                       : base(1024, 800,"Showcase")
-               {
-               }
+                               GraphicObject g = app.AddWidget ("#Tests.ui.showcase.crow");
+                               g.DataSource = app;
+                               app.crowContainer = g.FindByName ("CrowContainer") as Container;
+                               //I set an empty object as datasource at this level to force update when new
+                               //widgets are added to the interface
+                               app.crowContainer.DataSource = new object ();
+                               app.hideError ();
+
+                               while (true)
+                                       System.Threading.Thread.Sleep (10);
 
-               Container crowContainer;
+                       }
+               }
 
-               protected override void OnLoad (EventArgs e)
+               static void App_KeyboardKeyDown (object sender, KeyboardKeyEventArgs e)
                {
-                       base.OnLoad (e);
-
-                       this.CrowKeyDown += Showcase_CrowKeyDown;
-                       GraphicObject g = Load ("#Tests.ui.showcase.crow");
-                       g.DataSource = this;
-                       crowContainer = g.FindByName ("CrowContainer") as Container;
-                       //I set an empty object as datasource at this level to force update when new
-                       //widgets are added to the interface
-                       crowContainer.DataSource = new object ();
-                       hideError ();
+                       
                }
 
-               void Showcase_CrowKeyDown (object sender, OpenTK.Input.KeyboardKeyEventArgs e)
+               public Showcase ()
+                       : base(1024, 800)
                {
-                       if (e.Key == OpenTK.Input.Key.Escape) {
-                               Quit (null, null);
-                               return;
-                       }
                }
 
+
                void Dv_SelectedItemChanged (object sender, SelectionChangeEventArgs e)
                {
                        FileSystemInfo fi = e.NewValue as FileSystemInfo;
@@ -83,9 +78,9 @@ namespace Tests
                        if (fi is DirectoryInfo)
                                return;
                        hideError();
-                       lock (this.CurrentInterface.UpdateMutex) {
+                       lock (UpdateMutex) {
                                try {
-                                       GraphicObject g = this.CurrentInterface.Load (fi.FullName);
+                                       GraphicObject g = Load (fi.FullName);
                                        crowContainer.SetChild (g);
                                        g.DataSource = this;
                                } catch (InstantiatorException ex) {
@@ -115,10 +110,10 @@ namespace Tests
                        hideError();
                        GraphicObject g = null;
                        try {
-                               lock (this.ifaceControl [0].CrowInterface.UpdateMutex) {
+                               lock (UpdateMutex) {
                                        Instantiator inst = null;
                                        using (MemoryStream ms = new MemoryStream (Encoding.UTF8.GetBytes (e.Text))){
-                                               inst = new Instantiator (this.ifaceControl [0].CrowInterface, ms);
+                                               inst = new Instantiator (this, ms);
                                        }
                                        g = inst.CreateInstance ();
                                        crowContainer.SetChild (g);
@@ -129,10 +124,7 @@ namespace Tests
                                showError (ex);
                        }
                }
-               public override void OnRender (FrameEventArgs e)
-               {
-                       base.OnRender (e);
-               }
+
 
                #region Test values for Binding
                public int intValue = 500;
index c86ff9cb203835ef88bdc57effb1bf92cb111a43..7bae42b0dbc6f178dc151eedba9328a425108454 100644 (file)
@@ -8,7 +8,7 @@
     <OutputType>Exe</OutputType>
     <RootNamespace>Tests</RootNamespace>
     <AssemblyName>Tests</AssemblyName>
-    <StartupObject>Tests.BasicTests</StartupObject>
+    <StartupObject>Tests.Showcase</StartupObject>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ReleaseVersion>0.5</ReleaseVersion>
     <Optimize>false</Optimize>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
     <DefineConstants>DEBUG;TRACE;MEASURE_TIME</DefineConstants>
     <IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
     <OutputPath>$(SolutionDir)build\Debug</OutputPath>
+    <EnvironmentVariables>
+      <EnvironmentVariables>
+        <Variable name="MONO_CAIRO_DEBUG_DISPOSE" value="1" />
+      </EnvironmentVariables>
+    </EnvironmentVariables>
+    <ConsolePause>false</ConsolePause>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>none</DebugType>
     <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
     <ConsolePause>false</ConsolePause>
   </PropertyGroup>
+  <PropertyGroup Condition=" '$(RunConfiguration)' == 'Custom Command' ">
+    <StartAction>Program</StartAction>
+    <StartProgram>%24{TargetName}</StartProgram>
+    <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
     <Reference Include="System.Drawing" />
-    <Reference Include="OpenTK">
-      <HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
-    </Reference>
+    <Reference Include="Mono.Posix" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
     <Compile Include="BasicTests.cs" />
-    <Compile Include="OpenGL\Shader.cs" />
-    <Compile Include="OpenGL\vaoMesh.cs" />
-    <Compile Include="OpenGL\Texture.cs" />
-    <Compile Include="HelloWorld.cs" />
-    <Compile Include="CrowWindow.cs" />
-    <Compile Include="Hello3D.cs" />
-    <Compile Include="OpenGL\Extensions.cs" />
-    <Compile Include="InterfaceControler.cs" />
     <Compile Include="Showcase.cs" />
     <Compile Include="GraphicObjects\ColorCircleSelector.cs" />
     <Compile Include="GraphicObjects\SimpleGauge.cs" />
-    <Compile Include="Tutorials\T1_HelloWorld.cs" />
-    <Compile Include="Tutorials\T3_OpenGLCube.cs" />
-    <Compile Include="Tutorials\T4_Gauge.cs" />
-    <Compile Include="Tutorials\T2_IML.cs" />
     <Compile Include="GraphicObjects\HexaContainer.cs" />
     <Compile Include="GraphicObjects\TechBorder.cs" />
+    <Compile Include="testCairoXLib.cs" />
+    <Compile Include="CrowDebugger.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="image\u.svg">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <None Include="OpenTK.dll.config" />
-    <None Include="packages.config" />
     <None Include="Interfaces\Divers\testShape.crow">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <Folder Include="Interfaces\TemplatedContainer\" />
     <Folder Include="Interfaces\TemplatedGroup\" />
     <Folder Include="GraphicObjects\" />
-    <Folder Include="Tutorials\" />
     <Folder Include="Interfaces\DragAndDrop\" />
     <Folder Include="Interfaces\Experimental\" />
   </ItemGroup>
     <EmbeddedResource Include="Interfaces\CheckBox2.imlt" />
     <EmbeddedResource Include="Interfaces\perfMsr.crow" />
     <EmbeddedResource Include="ui\showcase.crow" />
-    <EmbeddedResource Include="Tutorials\test.crow">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </EmbeddedResource>
     <EmbeddedResource Include="Interfaces\TabItem.template">
       <LogicalName>Crow.TabItem.template</LogicalName>
     </EmbeddedResource>
diff --git a/Tests/Tutorials/T1_HelloWorld.cs b/Tests/Tutorials/T1_HelloWorld.cs
deleted file mode 100644 (file)
index 539085d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-
-namespace Tutorials
-{
-       class T1_HelloWorld : CrowWindow
-       {
-               public T1_HelloWorld ()
-                       : base(800, 600,"Hello World")
-               {
-               }
-
-               protected override void OnLoad (EventArgs e)
-               {
-                       base.OnLoad (e);
-                       AddWidget (new Label (CurrentInterface) { Text = "Hello World" });
-               }
-
-               [STAThread]
-               static void Main ()
-               {
-                       T1_HelloWorld win = new T1_HelloWorld ();
-                       win.Run (30);
-               }
-       }
-}
\ No newline at end of file
diff --git a/Tests/Tutorials/T2_IML.cs b/Tests/Tutorials/T2_IML.cs
deleted file mode 100644 (file)
index 57eea83..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-
-namespace Tutorials
-{
-       class T2_IML : CrowWindow
-       {
-               public T2_IML ()
-                       : base(800, 600,"First app with OpenTK")
-               {
-               }
-
-               protected override void OnLoad (EventArgs e)
-               {
-                       base.OnLoad (e);
-                       Load ("#Tests.Tutorials.test.crow");
-               }
-
-               [STAThread]
-               static void Main ()
-               {
-                       T2_IML win = new T2_IML ();
-                       win.Run (30);
-               }
-       }
-}
\ No newline at end of file
diff --git a/Tests/Tutorials/T3_OpenGLCube.cs b/Tests/Tutorials/T3_OpenGLCube.cs
deleted file mode 100644 (file)
index 2cada66..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// HelloCube.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using Crow;
-
-namespace Tutorials
-{
-       class T3_OpenGLCube : CrowWindow
-       {
-               [STAThread]
-               static void Main ()
-               {
-                       T3_OpenGLCube win = new T3_OpenGLCube ();
-                       win.Run (30);
-               }
-
-               public T3_OpenGLCube ()
-                       : base(800, 600,"Crow Test with OpenTK")
-               {
-               }
-
-               vaoMesh cube;
-               Texture texture;
-               Matrix4 projection, modelview;
-
-               protected override void OnLoad (EventArgs e)
-               {
-                       base.OnLoad (e);
-
-                       GL.Enable (EnableCap.CullFace);
-                       GL.Enable (EnableCap.Blend);
-                       GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
-
-                       cube = vaoMesh.CreateCube ();
-                       texture = new Texture ("image/textest.png");
-
-                       projection =
-                               Matrix4.CreatePerspectiveFieldOfView (
-                                       MathHelper.PiOver4,
-                                       ClientRectangle.Width / (float)ClientRectangle.Height, 1.0f, 10.0f);
-                       modelview = Matrix4.LookAt(new Vector3(5,5,5), Vector3.Zero, Vector3.UnitZ);
-
-                       AddWidget(
-                               new Window (this.CurrentInterface)
-                               {
-                                       Caption = "Hello World"
-                               }
-                       );
-               }
-               public override void OnRender (FrameEventArgs e)
-               {                       
-                       base.OnRender (e);
-
-                       shader.SetMVP(modelview * projection);
-
-                       GL.BindTexture (TextureTarget.Texture2D, texture);
-                       cube.Render (BeginMode.Triangles);
-                       GL.BindTexture (TextureTarget.Texture2D, 0);
-               }
-       }
-}
\ No newline at end of file
diff --git a/Tests/Tutorials/T4_Gauge.cs b/Tests/Tutorials/T4_Gauge.cs
deleted file mode 100644 (file)
index d909843..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-
-namespace Tutorials
-{
-       class T4_Gauge : CrowWindow
-       {
-               public T4_Gauge ()
-                       : base(800, 600,"Simple Gauge Tutorial")
-               {
-               }
-
-               protected override void OnLoad (EventArgs e)
-               {
-                       base.OnLoad (e);
-                       AddWidget (new SimpleGauge (CurrentInterface) {
-                               Level = 40,
-                               Width = 30, Height = "50%",
-                               Foreground = Color.DarkBlue, Background = Color.DimGray
-                       });
-               }
-
-               [STAThread]
-               static void Main ()
-               {
-                       T4_Gauge win = new T4_Gauge ();
-                       win.Run (30);
-               }
-       }
-}
\ No newline at end of file
diff --git a/Tests/Tutorials/test.crow b/Tests/Tutorials/test.crow
deleted file mode 100755 (executable)
index a1299e7..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<Window Height="400" Width="50%" Caption="My first Window">
-       <Label Text="Hello World"/>
-</Window>
\ No newline at end of file
diff --git a/Tests/packages.config b/Tests/packages.config
deleted file mode 100644 (file)
index b371766..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="OpenTK" version="2.0.0" targetFramework="net45" />
-</packages>
\ No newline at end of file
index 5539b3d02d47d2e111a67dca2db651f449543d0a..926910f6441fc879c955a40b89be77b49001cbba 100644 (file)
@@ -3,7 +3,7 @@
        Font = "droid, 10";
        Margin = "0";
        TextAlignment = "Center";
-       Background = "DimGray";
+       Background = "DimGrey";
 }
 FpsDisp {
        Font = "droid bold, 10";
diff --git a/Tests/testCairoXLib.cs b/Tests/testCairoXLib.cs
new file mode 100644 (file)
index 0000000..7d62a28
--- /dev/null
@@ -0,0 +1,143 @@
+using System;
+using System.Runtime.InteropServices;
+using Crow;
+using Mono.Unix.Native;
+using System.Diagnostics;
+using System.Threading;
+
+namespace testsCairoXLib
+{
+       class MainClass
+       {
+               static internal IntPtr xHandle, xwinHnd;
+               static internal Int32 xScreen;
+               static IntPtr xLastEvent;
+               static XLib.XErrorHandler errorHnd;
+
+               static Pollfd[] pollfds;
+
+               static Cairo.Surface surf;
+
+               static void init() {
+                       XLib.NativeMethods.XInitThreads ();
+                       xHandle = XLib.NativeMethods.XOpenDisplay(IntPtr.Zero);
+                       if (xHandle == IntPtr.Zero)
+                               throw new NotSupportedException("[XLib] Failed to open display.");
+
+                       xScreen = XLib.NativeMethods.XDefaultScreen(xHandle);
+                       xLastEvent = Marshal.AllocHGlobal(96);
+
+                       int x = 0, y = 0;
+                       int width = 800, height = 600;
+
+                       xwinHnd = XLib.NativeMethods.XCreateSimpleWindow (xHandle, XLib.NativeMethods.XDefaultRootWindow(xHandle),
+                               x, y, (uint)width, (uint)height, 0, IntPtr.Zero, IntPtr.Zero);
+                       if (xwinHnd == IntPtr.Zero)
+                               throw new NotSupportedException("[XLib] Failed to create window.");
+
+                       XLib.NativeMethods.XSelectInput (xHandle, xwinHnd, XLib.EventMask.ExposureMask | XLib.EventMask.KeyPressMask
+                               | XLib.EventMask.PointerMotionMask | XLib.EventMask.ButtonPressMask | XLib.EventMask.ButtonReleaseMask);
+
+                       XLib.NativeMethods.XMapWindow (xHandle, xwinHnd);
+
+                       surf = new Cairo.XlibSurface (xHandle, xwinHnd, XLib.NativeMethods.XDefaultVisual (xHandle, xScreen), (int)width, (int)height);
+
+                       pollfds = new Pollfd [1];
+                       pollfds [0] = new Pollfd ();
+                       pollfds [0].fd = XLib.NativeMethods.XConnectionNumber (xHandle);
+                       pollfds [0].events = PollEvents.POLLIN;
+
+                       errorHnd = new XLib.XErrorHandler (HandleError);
+                       XLib.NativeMethods.XSetErrorHandler (errorHnd);
+               }
+               static int HandleError (IntPtr display, ref XLib.XErrorEvent error_event)
+               {
+                       /*if (ErrorExceptions)
+                               throw new X11Exception (error_event.display, error_event.resourceid,
+                                       error_event.serial, error_event.error_code,
+                                       error_event.request_code, error_event.minor_code);
+                       else
+                               Console.WriteLine ("X11 Error encountered: {0}{1}\n",
+                                       X11Exception.GetMessage(error_event.display, error_event.resourceid,
+                                               error_event.serial, error_event.error_code,
+                                               error_event.request_code, error_event.minor_code),
+                                       WhereString());*/
+                       Debug.WriteLine ("XERROR {0}", error_event.error_code);
+                       return 0;
+               }
+
+               static Stopwatch timer;
+
+               static Point mousePos;
+
+               static void draw() {
+                       using (Cairo.Context ctx = new Cairo.Context (surf)) {
+                               ctx.SetSourceRGBA (1, 0, 0, 1);
+                               ctx.Paint ();
+                               ctx.MoveTo (100, 100);
+                               ctx.SetSourceRGBA (1, 1, 1, 1);
+                               ctx.SetFontSize (20);
+                               ctx.ShowText (string.Format("{0,10}",timer.ElapsedMilliseconds.ToString()));
+                               ctx.MoveTo (mousePos + new Point(10,0));
+                               ctx.Arc (mousePos.X, mousePos.Y, 10, 0, Math.PI * 2.0);
+                               ctx.Stroke ();
+                       }
+                       XLib.NativeMethods.XSync (xHandle, 0);
+               }
+
+               static void interfaceThread()
+               {
+                       timer = Stopwatch.StartNew ();
+
+                       while (true) {
+                               //pollfds [0].fd = XLib.NativeMethods.XConnectionNumber (xHandle);
+                               //Syscall.poll (pollfds, 1U, 0);
+
+                               draw ();
+
+                               if (XLib.NativeMethods.XPending (xHandle) > 0) {
+                                       XLib.XEvent xevent = new XLib.XEvent ();
+                                       XLib.NativeMethods.XNextEvent (xHandle, ref xevent);
+
+                                       switch (xevent.type) {
+                                       case XLib.XEventName.KeyPress:
+                                               Debug.WriteLine ("keypress: {0}", xevent.KeyEvent.keycode);
+                                               break;
+                                       case XLib.XEventName.MotionNotify:
+                                               Debug.WriteLine ("motion: ({0},{1})", xevent.MotionEvent.x, xevent.MotionEvent.y);
+                                               mousePos = new Point(xevent.MotionEvent.x, xevent.MotionEvent.y);
+                                               break;
+                                       case XLib.XEventName.ButtonPress:
+                                               Debug.WriteLine ("button press: {0}", xevent.ButtonEvent.button);
+                                               break;
+                                       case XLib.XEventName.ButtonRelease:
+                                               Debug.WriteLine ("button release: {0}", xevent.ButtonEvent.button);
+                                               break;
+
+                                       }
+                               }
+                       }
+               }
+
+               public static void Main(string[] args)
+               {
+                       /*using (Interface app = new Interface ()) {
+                                                               XWindow win = new XWindow (app);
+                                                               win.Show ();
+                               app.LoadIMLFragment (@"<SimpleGauge Level='40' Margin='5' Background='Jet' Foreground='Grey' Width='30' Height='50%'/>");
+                               app.AddWidget(@"Interfaces/Divers/0.crow");
+                               System.Threading.Thread.Sleep (10000);
+                       }*/
+
+                       init ();
+
+                       Thread t = new Thread (interfaceThread);
+                       t.IsBackground = true;
+                       t.Start ();
+
+                       while (true)
+                               continue;
+               }
+
+       }
+}
index 7182d8682b0a1bb49e69774e386a2ced2600c22d..4e61c38b8d6075eba03687a8a65e15a3cc2c0842 100644 (file)
@@ -1,8 +1,8 @@
-MouseEnter = "{Background = Gray;Foreground = White;}";
+MouseEnter = "{Background = Grey;Foreground = White;}";
 Fit = "true";
-MouseLeave = "{Background=Transparent;Foreground=Gray;}";
+MouseLeave = "{Background=Transparent;Foreground=Grey;}";
 MouseDown = "{Background=Red;Foreground=White;}";
-MouseUp = "{Background=Gray;Foreground=White;}";
-Foreground="Gray";
+MouseUp = "{Background=Grey;Foreground=White;}";
+Foreground="Grey";
 Margin="5";
 CornerRadius="5";
index 969a4abc27d5b830c836acf09ee804f69c802fd0..15778e687da5a09e4d94bf6f063424003d748080 100644 (file)
@@ -4,8 +4,8 @@ MinimumSize="60;10";
 Margin="2";
 CornerRadius="0";
 TextAlignment="Left";
-Foreground="Gray";
+Foreground="Grey";
 MouseEnter = "{Background=SeaGreen;Foreground=White;}";
-MouseLeave = "{Background=Transparent;Foreground=Gray;}";
-MouseDown = "{Background=White;Foreground=DimGray;}";
+MouseLeave = "{Background=Transparent;Foreground=Grey;}";
+MouseDown = "{Background=White;Foreground=DimGrey;}";
 MouseUp = "{Background=SeaGreen;Foreground=White;}";
index 956e236d9722d76c3b4e345c5b41f9701bfb7608..f14e965caffd83869e6586158d64f490212f5860 100755 (executable)
@@ -3,7 +3,7 @@
        <DirectoryView Name="dv" CurrentDirectory="Interfaces" Width="25%" SelectedItemChanged="Dv_SelectedItemChanged"/>
        <Splitter Width="6"/>
        <VerticalStack>
-               <Container Name="CrowContainer" Height="60%" Background="DimGray"/>
+               <Container Name="CrowContainer" Height="60%" Background="DimGrey"/>
                <Splitter/>
                <HorizontalStack>
                        <Scroller Name="scroller1" Background="White"
index 64ba349e11a8b60dc700ae7f76548e8426bcc72f..663fd9342d8c5591a08594c9c6b1668d34946be5 100755 (executable)
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <Window Font="droid bold, 10" Caption="Open GL" HorizontalAlignment="Left" Width="30%" Height="90%">
        <VerticalStack>
-               <HorizontalStack Background="DimGray" Height="Fit" Width="Stretched"  Margin="2">
+               <HorizontalStack Background="DimGrey" Height="Fit" Width="Stretched"  Margin="2">
                        <Popper Caption="File" Template="#Tests.ui.Popper.template" Width="Fit">
-                               <Border Fit="True" Foreground="Gray" Background="DimGray">
+                               <Border Fit="True" Foreground="Grey" Background="DimGrey">
                                        <VerticalStack Height="Fit" Width="Fit" Margin="2">
                                                <Label Text="New File" Style="#Tests.ui.MenuItem.style" />
                                                <Label Text="Open..." Style="#Tests.ui.MenuItem.style"/>
index 44060259b301448a19bcf4ecd2423c26dd6bed8b..3b771c3800042b809c892184a04b2327e3e767c2 100644 (file)
@@ -107,7 +107,7 @@ namespace Crow
             gr.LineTo(r.TopRight);
             gr.Stroke();
 
-                       gr.SetSourceColor(Color.DarkGray);
+                       gr.SetSourceColor(Color.DarkGrey);
             gr.MoveTo(r.TopRight);
             gr.LineTo(r.BottomRight);
             gr.LineTo(r.BottomLeft);
@@ -120,7 +120,7 @@ namespace Crow
             gr.Save();
             r.Inflate((int)-width / 2, (int)-width / 2);
             gr.LineWidth = width;
-                       gr.SetSourceColor(Color.DarkGray);
+                       gr.SetSourceColor(Color.DarkGrey);
             gr.MoveTo(r.BottomLeft);
             gr.LineTo(r.TopLeft);
             gr.LineTo(r.TopRight);
index 0b1b3ad7383fbcf988cb438a18482da50e0f8675..8e501b336c14255332ecefb55a845183e37d9b37 100644 (file)
@@ -202,7 +202,7 @@ namespace Crow
                                double max = Math.Max (R, Math.Max (G, B));     //Max. value of RGB
                                double diff = max - min;                                                        //Delta RGB value
 
-                               if ( diff == 0 )//This is a gray, no chroma...
+                               if ( diff == 0 )//This is a grey, no chroma...
                                        return 0;
 
                                double h = 0.0, s = diff / max;
@@ -302,7 +302,6 @@ namespace Crow
                public static readonly Color DarkBlue = new Color(0,0,139,"DarkBlue","#00008B");
                public static readonly Color DarkCyan = new Color(0,139,139,"DarkCyan","#008B8B");
                public static readonly Color DarkGoldenRod = new Color(184,134,11,"DarkGoldenRod","#B8860B");
-               public static readonly Color DarkGray = new Color(169,169,169,"DarkGray","#A9A9A9");
                public static readonly Color DarkGrey = new Color(169,169,169,"DarkGrey","#A9A9A9");
                public static readonly Color DarkGreen = new Color(0,100,0,"DarkGreen","#006400");
                public static readonly Color DarkKhaki = new Color(189,183,107,"DarkKhaki","#BDB76B");
@@ -314,13 +313,11 @@ namespace Crow
                public static readonly Color DarkSalmon = new Color(233,150,122,"DarkSalmon","#E9967A");
                public static readonly Color DarkSeaGreen = new Color(143,188,143,"DarkSeaGreen","#8FBC8F");
                public static readonly Color DarkSlateBlue = new Color(72,61,139,"DarkSlateBlue","#483D8B");
-               public static readonly Color DarkSlateGray = new Color(47,79,79,"DarkSlateGray","#2F4F4F");
                public static readonly Color DarkSlateGrey = new Color(47,79,79,"DarkSlateGrey","#2F4F4F");
                public static readonly Color DarkTurquoise = new Color(0,206,209,"DarkTurquoise","#00CED1");
                public static readonly Color DarkViolet = new Color(148,0,211,"DarkViolet","#9400D3");
                public static readonly Color DeepPink = new Color(255,20,147,"DeepPink","#FF1493");
                public static readonly Color DeepSkyBlue = new Color(0,191,255,"DeepSkyBlue","#00BFFF");
-               public static readonly Color DimGray = new Color(105,105,105,"DimGray","#696969");
                public static readonly Color DimGrey = new Color(105,105,105,"DimGrey","#696969");
                public static readonly Color DodgerBlue = new Color(30,144,255,"DodgerBlue","#1E90FF");
                public static readonly Color FireBrick = new Color(178,34,34,"FireBrick","#B22222");
@@ -331,7 +328,6 @@ namespace Crow
                public static readonly Color GhostWhite = new Color(248,248,255,"GhostWhite","#F8F8FF");
                public static readonly Color Gold = new Color(255,215,0,"Gold","#FFD700");
                public static readonly Color GoldenRod = new Color(218,165,32,"GoldenRod","#DAA520");
-               public static readonly Color Gray = new Color(128,128,128,"Gray","#808080");
                public static readonly Color Grey = new Color(128,128,128,"Grey","#808080");
                public static readonly Color Green = new Color(0,128,0,"Green","#008000");
                public static readonly Color GreenYellow = new Color(173,255,47,"GreenYellow","#ADFF2F");
@@ -350,14 +346,12 @@ namespace Crow
                public static readonly Color LightCoral = new Color(240,128,128,"LightCoral","#F08080");
                public static readonly Color LightCyan = new Color(224,255,255,"LightCyan","#E0FFFF");
                public static readonly Color LightGoldenRodYellow = new Color(250,250,210,"LightGoldenRodYellow","#FAFAD2");
-               public static readonly Color LightGray = new Color(211,211,211,"LightGray","#D3D3D3");
                public static readonly Color LightGrey = new Color(211,211,211,"LightGrey","#D3D3D3");
                public static readonly Color LightGreen = new Color(144,238,144,"LightGreen","#90EE90");
                public static readonly Color LightPink = new Color(255,182,193,"LightPink","#FFB6C1");
                public static readonly Color LightSalmon = new Color(255,160,122,"LightSalmon","#FFA07A");
                public static readonly Color LightSeaGreen = new Color(32,178,170,"LightSeaGreen","#20B2AA");
                public static readonly Color LightSkyBlue = new Color(135,206,250,"LightSkyBlue","#87CEFA");
-               public static readonly Color LightSlateGray = new Color(119,136,153,"LightSlateGray","#778899");
                public static readonly Color LightSlateGrey = new Color(119,136,153,"LightSlateGrey","#778899");
                public static readonly Color LightSteelBlue = new Color(176,196,222,"LightSteelBlue","#B0C4DE");
                public static readonly Color LightYellow = new Color(255,255,224,"LightYellow","#FFFFE0");
@@ -412,7 +406,6 @@ namespace Crow
                public static readonly Color Silver = new Color(192,192,192,"Silver","#C0C0C0");
                public static readonly Color SkyBlue = new Color(135,206,235,"SkyBlue","#87CEEB");
                public static readonly Color SlateBlue = new Color(106,90,205,"SlateBlue","#6A5ACD");
-               public static readonly Color SlateGray = new Color(112,128,144,"SlateGray","#708090");
                public static readonly Color SlateGrey = new Color(112,128,144,"SlateGrey","#708090");
                public static readonly Color Snow = new Color(255,250,250,"Snow","#FFFAFA");
                public static readonly Color SpringGreen = new Color(0,255,127,"SpringGreen","#00FF7F");
index adeb32e70a9903abbc784cfce03af5b9cfe6a435..63f2c68fded33629b5ef13e2819b477e3d33328d 100644 (file)
@@ -54,8 +54,8 @@ namespace Crow
                #region private fields
                int _borderWidth;
                BorderStyle _borderStyle;
-               Fill raisedColor = Color.Gray;
-               Fill sunkenColor = Color.DimGray;
+               Fill raisedColor = Color.Grey;
+               Fill sunkenColor = Color.DimGrey;
                #endregion
 
                #region public properties
index bc955368194a78cd5b9eef983216a730d65e4fcb..49decd8d307dd9c6547ad168962a9a8b7d55cdea 100644 (file)
@@ -1411,7 +1411,7 @@ namespace Crow
                                        (Parent as GraphicObject).ChildrenLayoutingConstraints (ref layoutType);
 
 //                             //prevent queueing same LayoutingType for this
-//                             layoutType &= (~RegisteredLayoutings);
+                               layoutType &= (~RegisteredLayoutings);
 
                                if (layoutType == LayoutingType.None)
                                        return;
@@ -1626,9 +1626,8 @@ namespace Crow
                        Debug.WriteLine (string.Format("RecreateCache -> {0}", this.ToString ()));
                        #endif
                        IsDirty = false;
-                       if (bmp != null)
-                               bmp.Dispose ();
-                       bmp = new ImageSurface (Format.Argb32, Slot.Width, Slot.Height);
+                       bmp?.Dispose ();
+                       bmp = IFace.surf.CreateSimilar(Content.ColorAlpha, Slot.Width, Slot.Height);
                        using (Context gr = new Context (bmp)) {
                                gr.Antialias = Interface.Antialias;
                                onDraw (gr);
@@ -1701,13 +1700,13 @@ namespace Crow
 
         #region Keyboard handling
                public virtual void onKeyDown(object sender, KeyboardKeyEventArgs e){
-                       KeyDown.Raise (sender, e);
+                       KeyDown.Raise (this, e);
                }
                public virtual void onKeyUp(object sender, KeyboardKeyEventArgs e){
-                       KeyUp.Raise (sender, e);
+                       KeyUp.Raise (this, e);
                }
                public virtual void onKeyPress(object sender, KeyPressEventArgs e){
-                       KeyPress.Raise (sender, e);
+                       KeyPress.Raise (this, e);
                }
         #endregion
 
@@ -1719,7 +1718,9 @@ namespace Crow
                /// <returns>return true, if point is in the bounds of this control</returns>
                /// <param name="m">by ref point to test, init value is not kept</param>
                public virtual bool PointIsIn(ref Point m)
-               {                       
+               {
+                       if (parent == null)
+                               return false;
                        if (!(Visible & isEnabled)||IsDragged)
                                return false;
                        if (!parent.PointIsIn(ref m))
index 5dac20e17fd4447b25bbf9ec12acad9a082e35bd..f7f0307307f14c95ddeb9993d85b07a25af7488f 100644 (file)
@@ -54,6 +54,10 @@ namespace Crow
                                        return;
                                _orientation = value;
                                NotifyValueChanged ("Orientation", _orientation);
+                               if (_orientation == Orientation.Horizontal)
+                                       NotifyValueChanged ("ScrollBackShape", "M 0.5,5.5 L 10.5, 0.5 L 10.5,0.5 Z");
+                               else
+                                       NotifyValueChanged ("ScrollBackShape", "M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z");
                                RegisterForGraphicUpdate ();
                        }
                }
index 2bdd5b8ab0c2c8e5693ea39f30384152e19464e8..64668c48ab7e62066d955dca60c6d87872cfd9d7 100644 (file)
@@ -68,7 +68,7 @@ namespace Crow
                protected double unity;
 
                #region Public properties
-               [DefaultValue("vgradient|0:White|0,1:LightGray|0,9:LightGray|1:DimGray")]
+               [DefaultValue("vgradient|0:White|0,1:LightGrey|0,9:LightGrey|1:DimGrey")]
                public virtual Fill CursorColor {
                        get { return _cursorColor; }
                        set {
@@ -121,6 +121,7 @@ namespace Crow
                protected override void onDraw (Context gr)
                {
                        base.onDraw (gr);
+
                        if (Maximum <= 0)
                                return;
 
@@ -141,6 +142,10 @@ namespace Crow
                                pEnd.X += 0.5;
 
                        }
+                               
+                       Background.SetAsSource (gr,r);
+                       gr.Rectangle (r);
+                       gr.Fill ();
 
                        DrawGraduations (gr, pStart,pEnd);
 
@@ -184,7 +189,7 @@ namespace Crow
                                cursor.TopLeft = new Point ((int)(p1.X - r.Width / 2),
                                        r.Top + (int)((Value - Minimum) * unity));                              
                        }
-                       cursor.Inflate (-1);
+                       //cursor.Inflate (-1);
         }
                Point mouseDownInit;
                double mouseDownInitValue;
index 84e1ade0199913164ccd580a03fc9eae7b28efe4..3a12b784c80cca6b845d0650117eeb001c16f6c5 100644 (file)
@@ -141,7 +141,7 @@ namespace Crow
                {
                        base.onMouseMove (sender, e);
 
-                       if (!IsActive)
+                       if (!IsActive || go1 == null || go2 == null)
                                return;
 
                        GenericStack gs = Parent as GenericStack;
index e9d3c2d3d08a84631abe51b958417388308c317e..10c5422c03accd22b4b96f56f2a147781968f256 100644 (file)
@@ -60,7 +60,7 @@ namespace Crow
                                AddValue (value);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(100)]
+               [XmlAttributeAttribute()][DefaultValue(400)]
                public virtual int NbValues {
                        get { return nbValues; }
                        set {
@@ -97,7 +97,7 @@ namespace Crow
                                RegisterForRedraw ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(20.0)]
+               [XmlAttributeAttribute()][DefaultValue(1.0)]
                public virtual double LowThreshold {
                        get { return lowThreshold; }
                        set {
index cc62a1aa82f02518d51d010d22c2c672802e58e6..69fa36f8fa7605fc1cf4112a78c7e609d34d22a1 100644 (file)
@@ -36,6 +36,9 @@ using System.Xml.Serialization;
 using Cairo;
 using System.Globalization;
 using Crow.IML;
+using System.Runtime.InteropServices;
+
+
 
 namespace Crow
 {
@@ -63,8 +66,22 @@ namespace Crow
        /// The resulting surface (a byte array in the OpenTK renderer) is made available and protected with the
        /// RenderMutex of the interface.
        /// </remarks>
-       public class Interface : ILayoutable
+       public class Interface : ILayoutable, IDisposable ,IValueChange
        {
+               #region IValueChange implementation
+               public event EventHandler<ValueChangeEventArgs> ValueChanged;
+               public virtual void NotifyValueChanged(string MemberName, object _value)
+               {
+                       //Debug.WriteLine ("Value changed: {0}->{1} = {2}", this, MemberName, _value);
+                       ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value));
+               }
+               #endregion
+
+               internal IntPtr xHandle, xwinHnd, xDefaultRootWin, xDefaultVisual;
+               internal UInt32 xDefaultDepth;
+               internal Int32 xScreen;
+               XLib.XErrorHandler errorHnd;
+
                #region CTOR
                static Interface(){
                        if (Type.GetType ("Mono.Runtime") == null) {
@@ -94,18 +111,159 @@ namespace Crow
                        FontRenderingOptions.HintStyle = HintStyle.Full;
                        FontRenderingOptions.SubpixelOrder = SubpixelOrder.Rgb;
                }
-               public Interface(){
-                       CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
+
+               public Interface(int width=800, int height=600){
+
+                       clientRectangle = new Rectangle (0, 0, width, height);
+
+                       Init ();
+
+                       initX ();
+               }
+               private int HandleError (IntPtr display, ref XLib.XErrorEvent error_event)
+               {
+                       /*if (ErrorExceptions)
+                               throw new X11Exception (error_event.display, error_event.resourceid,
+                                       error_event.serial, error_event.error_code,
+                                       error_event.request_code, error_event.minor_code);
+                       else
+                               Console.WriteLine ("X11 Error encountered: {0}{1}\n",
+                                       X11Exception.GetMessage(error_event.display, error_event.resourceid,
+                                               error_event.serial, error_event.error_code,
+                                               error_event.request_code, error_event.minor_code),
+                                       WhereString());*/
+                       Debug.WriteLine ("XERROR {0}", error_event.error_code);
+                       return 0;
+               }
+               #endregion
+
+               void interfaceThread()
+               {                       
+                       while (true) {
+                               Update ();
+
+                               if (XLib.NativeMethods.XPending (xHandle) > 0) {
+                                       XLib.XEvent xevent = new XLib.XEvent ();
+                                       XLib.NativeMethods.XNextEvent (xHandle, ref xevent);
+
+                                       switch (xevent.type) {
+                                       case XLib.XEventName.Expose:
+                                               ProcessResize (new Rectangle (0, 0, xevent.ExposeEvent.width, xevent.ExposeEvent.height));
+                                               break;
+                                       case XLib.XEventName.KeyPress:
+                                               ProcessKeyDown (xevent.KeyEvent.keycode);
+                                               //Debug.WriteLine ("keypress: {0}", xevent.KeyEvent.keycode);
+                                               break;
+                                       case XLib.XEventName.KeyRelease:
+                                               ProcessKeyUp (xevent.KeyEvent.keycode);
+                                               //Debug.WriteLine ("keypress: {0}", xevent.KeyEvent.keycode);
+                                               break;
+                                       case XLib.XEventName.MotionNotify:
+                                               //Debug.WriteLine ("motion: ({0},{1})", xevent.MotionEvent.x, xevent.MotionEvent.y);
+                                               ProcessMouseMove (xevent.MotionEvent.x, xevent.MotionEvent.y);
+                                               break;
+                                       case XLib.XEventName.ButtonPress:
+                                               //Debug.WriteLine ("button press: {0}", xevent.ButtonEvent.button);
+                                               if (xevent.ButtonEvent.button == 4)
+                                                       ProcessMouseWheelChanged (WheelIncrement);
+                                               else if(xevent.ButtonEvent.button == 5)
+                                                       ProcessMouseWheelChanged (-WheelIncrement);
+                                               else
+                                                       ProcessMouseButtonDown (xevent.ButtonEvent.button - 1);
+                                               break;
+                                       case XLib.XEventName.ButtonRelease:
+                                               //Debug.WriteLine ("button release: {0}", xevent.ButtonEvent.button);
+                                               ProcessMouseButtonUp (xevent.ButtonEvent.button - 1);
+                                               break;
+
+                                       }
+                               }
+                       }
+               }
+
+               #region IDisposable Support
+               private bool disposedValue = false; // To detect redundant calls
+
+               protected virtual void Dispose(bool disposing)
+               {
+                       if (!disposedValue)
+                       {
+                               if (disposing)
+                               {
+                                       // TODO: dispose managed state (managed objects).
+                               }
+
+                               //Marshal.FreeHGlobal (lastEvent);
+                               XLib.NativeMethods.XCloseDisplay (xHandle);
+
+                               disposedValue = true;
+                       }
+               }
+
+               // TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
+               ~Interface() {
+                       // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
+                       Dispose(false);
+               }
+
+               // This code added to correctly implement the disposable pattern.
+               public void Dispose()
+               {
+                       Dispose(true);
+                       GC.SuppressFinalize(this);
                }
                #endregion
 
                public void Init () {
+                       CultureInfo.DefaultThreadCurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
+
                        CurrentInterface = this;
-                       loadCursors ();
+                       //loadCursors ();
                        loadStyling ();
                        findAvailableTemplates ();
-                       initTooltip ();
-                       initContextMenus ();
+                       //initTooltip ();
+                       //initContextMenus ();
+
+                       #if MEASURE_TIME
+                       PerfMeasures.Add (updateMeasure);
+                       PerfMeasures.Add (drawingMeasure);
+                       PerfMeasures.Add (layoutingMeasure);
+                       PerfMeasures.Add (clippingMeasure);
+                       #endif
+               }
+
+               protected virtual void initX() {
+                       XLib.NativeMethods.XInitThreads ();
+                       xHandle = XLib.NativeMethods.XOpenDisplay(IntPtr.Zero);
+                       if (xHandle == IntPtr.Zero)
+                               throw new NotSupportedException("[XLib] Failed to open display.");
+
+                       xScreen = XLib.NativeMethods.XDefaultScreen(xHandle);
+
+                       xDefaultRootWin = XLib.NativeMethods.XDefaultRootWindow (xHandle);
+                       xDefaultVisual = XLib.NativeMethods.XDefaultVisual (xHandle, xScreen);
+                       xDefaultDepth = XLib.NativeMethods.XDefaultDepth (xHandle, xScreen);
+
+                       xwinHnd = XLib.NativeMethods.XCreateSimpleWindow (xHandle, xDefaultRootWin,
+                               0, 0, (uint)clientRectangle.Width, (uint)clientRectangle.Height, 0, IntPtr.Zero, IntPtr.Zero);
+                       if (xwinHnd == IntPtr.Zero)
+                               throw new NotSupportedException("[XLib] Failed to create window.");
+
+                       XLib.NativeMethods.XSelectInput (xHandle, xwinHnd, XLib.EventMask.ExposureMask | 
+                               XLib.EventMask.KeyPressMask     | XLib.EventMask.KeyReleaseMask | 
+                               XLib.EventMask.PointerMotionMask | XLib.EventMask.ButtonPressMask | XLib.EventMask.ButtonReleaseMask);
+
+                       XLib.NativeMethods.XMapWindow (xHandle, xwinHnd);
+
+                       surf = new Cairo.XlibSurface (xHandle, xwinHnd, xDefaultVisual, clientRectangle.Width, clientRectangle.Height);
+
+                       errorHnd = new XLib.XErrorHandler (HandleError);
+                       XLib.NativeMethods.XSetErrorHandler (errorHnd);
+
+                       Thread t = new Thread (interfaceThread);
+                       t.IsBackground = true;
+                       t.Start ();
+
                }
 
                #region Static and constants
@@ -125,6 +283,7 @@ namespace Crow
                public static int DeviceRepeatDelay = 700;
                /// <summary> Time interval in millisecond between device event repeat</summary>
                public static int DeviceRepeatInterval = 40;
+               public static float WheelIncrement = 1;
                /// <summary>Tabulation size in Text controls</summary>
                public static int TabSize = 4;
                public static string LineBreak = "\n";
@@ -178,6 +337,9 @@ namespace Crow
                public event EventHandler<KeyboardKeyEventArgs> KeyboardKeyUp;
                #endregion
 
+               /// <summary>Main Cairo surface</summary>
+               public Surface surf;
+
                #region Public Fields
                /// <summary>Graphic Tree of this interface</summary>
                public List<GraphicObject> GraphicTree = new List<GraphicObject>();
@@ -229,13 +391,11 @@ namespace Crow
 
                #region Private Fields
                /// <summary>Client rectangle in the host context</summary>
-               Rectangle clientRectangle;
+               protected Rectangle clientRectangle;
                /// <summary>Clipping rectangles on the root context</summary>
                Region clipping = new Region();
                /// <summary>Main Cairo context</summary>
                Context ctx;
-               /// <summary>Main Cairo surface</summary>
-               Surface surf;
                #endregion
 
                #region Default values and Style loading
@@ -335,7 +495,7 @@ namespace Crow
                        if (path.StartsWith ("#")) {
                                string resId = path.Substring (1);
                                //try/catch added to prevent nunit error
-                               try {
+                               try {                                   
                                        stream = System.Reflection.Assembly.GetEntryAssembly ().GetManifestResourceStream (resId);
                                } catch{}
                                if (stream == null)//try to find ressource in Crow assembly
@@ -644,80 +804,57 @@ namespace Crow
                        #endif
                        if (DragImage != null)
                                clipping.UnionRectangle(new Rectangle (DragImageX, DragImageY, DragImageWidth, DragImageHeight));
-                       using (surf = new ImageSurface (bmp, Format.Argb32, ClientRectangle.Width, ClientRectangle.Height, ClientRectangle.Width * 4)) {
-                               using (ctx = new Context (surf)){
-                                       if (!clipping.IsEmpty) {
-
-                                               for (int i = 0; i < clipping.NumRectangles; i++)
-                                                       ctx.Rectangle(clipping.GetRectangle(i));
-                                               
-                                               ctx.ClipPreserve();
-                                               ctx.Operator = Operator.Clear;
-                                               ctx.Fill();
-                                               ctx.Operator = Operator.Over;
-
-                                               for (int i = GraphicTree.Count -1; i >= 0 ; i--){
-                                                       GraphicObject p = GraphicTree[i];
-                                                       if (!p.Visible)
-                                                               continue;
-                                                       if (clipping.Contains (p.Slot) == RegionOverlap.Out)
-                                                               continue;
+                       //using (surf = new ImageSurface (bmp, Format.Argb32, ClientRectangle.Width, ClientRectangle.Height, ClientRectangle.Width * 4)) {
+                       using (ctx = new Context (surf)){
+                               if (!clipping.IsEmpty) {
+                                       IsDirty = true;
 
+                                       for (int i = 0; i < clipping.NumRectangles; i++)
+                                               ctx.Rectangle(clipping.GetRectangle(i));
+                                       
+                                       ctx.ClipPreserve();
+                                       ctx.Operator = Operator.Clear;
+                                       ctx.Fill();
+                                       ctx.Operator = Operator.Over;
+
+                                       for (int i = GraphicTree.Count -1; i >= 0 ; i--){
+                                               GraphicObject p = GraphicTree[i];
+                                               if (!p.Visible)
+                                                       continue;
+                                               if (clipping.Contains (p.Slot) == RegionOverlap.Out)
+                                                       continue;
+
+                                               ctx.Save ();
+                                               p.Paint (ref ctx);
+                                               ctx.Restore ();
+                                       }
+
+                                       if (DragAndDropOperation != null) {
+                                               if (DragImage != null) {
+                                                       DirtyRect += new Rectangle (DragImageX, DragImageY, DragImageWidth, DragImageHeight);
+                                                       DragImageX = Mouse.X - DragImageWidth / 2;
+                                                       DragImageY = Mouse.Y - DragImageHeight / 2;
                                                        ctx.Save ();
-                                                       p.Paint (ref ctx);
+                                                       ctx.ResetClip ();
+                                                       ctx.SetSourceSurface (DragImage, DragImageX, DragImageY);
+                                                       ctx.PaintWithAlpha (0.8);
                                                        ctx.Restore ();
-                                               }
-
-                                               if (DragAndDropOperation != null) {
-                                                       if (DragImage != null) {
-                                                               DirtyRect += new Rectangle (DragImageX, DragImageY, DragImageWidth, DragImageHeight);
-                                                               DragImageX = Mouse.X - DragImageWidth / 2;
-                                                               DragImageY = Mouse.Y - DragImageHeight / 2;
-                                                               ctx.Save ();
-                                                               ctx.ResetClip ();
-                                                               ctx.SetSourceSurface (DragImage, DragImageX, DragImageY);
-                                                               ctx.PaintWithAlpha (0.8);
-                                                               ctx.Restore ();
-                                                               DirtyRect += new Rectangle (DragImageX, DragImageY, DragImageWidth, DragImageHeight);
-                                                               IsDirty = true;
-                                                               //Console.WriteLine ("dragimage drawn: {0},{1}", DragImageX, DragImageY);
-                                                       }
-                                               }
-
-                                               #if DEBUG_CLIP_RECTANGLE
-                                               clipping.stroke (ctx, Color.Red.AdjustAlpha(0.5));
-                                               #endif
-                                               lock (RenderMutex) {
-//                                                     Array.Copy (bmp, dirtyBmp, bmp.Length);
-
-                                                       if (IsDirty)
-                                                               DirtyRect += clipping.Extents;
-                                                       else
-                                                               DirtyRect = clipping.Extents;
+                                                       DirtyRect += new Rectangle (DragImageX, DragImageY, DragImageWidth, DragImageHeight);
                                                        IsDirty = true;
-
-                                                       DirtyRect.Left = Math.Max (0, DirtyRect.Left);
-                                                       DirtyRect.Top = Math.Max (0, DirtyRect.Top);
-                                                       DirtyRect.Width = Math.Min (ClientRectangle.Width - DirtyRect.Left, DirtyRect.Width);
-                                                       DirtyRect.Height = Math.Min (ClientRectangle.Height - DirtyRect.Top, DirtyRect.Height);
-                                                       DirtyRect.Width = Math.Max (0, DirtyRect.Width);
-                                                       DirtyRect.Height = Math.Max (0, DirtyRect.Height);
-
-                                                       if (DirtyRect.Width > 0 && DirtyRect.Height >0) {
-                                                               dirtyBmp = new byte[4 * DirtyRect.Width * DirtyRect.Height];
-                                                               for (int y = 0; y < DirtyRect.Height; y++) {
-                                                                       Array.Copy (bmp,
-                                                                               ((DirtyRect.Top + y) * ClientRectangle.Width * 4) + DirtyRect.Left * 4,
-                                                                               dirtyBmp, y * DirtyRect.Width * 4, DirtyRect.Width * 4);
-                                                               }
-
-                                                       } else
-                                                               IsDirty = false;
+                                                       //Console.WriteLine ("dragimage drawn: {0},{1}", DragImageX, DragImageY);
                                                }
-                                               clipping.Dispose ();
-                                               clipping = new Region ();
                                        }
+
+                                       #if DEBUG_CLIP_RECTANGLE
+                                       clipping.stroke (ctx, Color.Red.AdjustAlpha(0.5));
+                                       #endif
+
+                                       clipping.Dispose ();
+                                       clipping = new Region ();
+                                       //}
                                        //surf.WriteToPng (@"/mnt/data/test.png");
+
+                                       //XLib.NativeMethods.XSync (xHandle, 0);
                                }
                        }
                        #if MEASURE_TIME
@@ -728,7 +865,7 @@ namespace Crow
 
                #region GraphicTree handling
                /// <summary>Add widget to the Graphic tree of this interface and register it for layouting</summary>
-               public void AddWidget(GraphicObject g)
+               public GraphicObject AddWidget(GraphicObject g)
                {
                        g.Parent = this;
                        int ptr = 0;
@@ -749,6 +886,8 @@ namespace Crow
 
                        g.RegisteredLayoutings = LayoutingType.None;
                        g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren);
+
+                       return g;
                }
                /// <summary>Set visible state of widget to false and delete if from the graphic tree</summary>
                public void DeleteWidget(GraphicObject g)
@@ -837,13 +976,14 @@ namespace Crow
                /// when window resize event occurs. 
                /// </summary>
                /// <param name="bounds">bounding box of the interface</param>
-               public void ProcessResize(Rectangle bounds){
+               public virtual void ProcessResize(Rectangle bounds){
                        lock (UpdateMutex) {
                                clientRectangle = bounds;
-                               int stride = 4 * ClientRectangle.Width;
-                               int bmpSize = Math.Abs (stride) * ClientRectangle.Height;
-                               bmp = new byte[bmpSize];
-                               dirtyBmp = new byte[bmpSize];
+
+                               /*surf.Dispose ();
+                               surf = new Cairo.XlibSurface (xHandle, xwinHnd, xDefaultVisual, clientRectangle.Width, clientRectangle.Height);*/
+                               (surf as XlibSurface).SetSize (clientRectangle.Width, clientRectangle.Height);
+
 
                                foreach (GraphicObject g in GraphicTree)
                                        g.RegisterForLayouting (LayoutingType.All);
@@ -1051,6 +1191,7 @@ namespace Crow
                        lastKeyDownEvt.IsRepeat = true;
                        _focusedWidget.onKeyDown (this, e);
 
+                       KeyboardKeyDown.Raise (this, e);
 //                     keyboardRepeatThread = new Thread (keyboardRepeatThreadFunc);
 //                     keyboardRepeatThread.IsBackground = true;
 //                     keyboardRepeatThread.Start ();
@@ -1070,6 +1211,8 @@ namespace Crow
 
                        _focusedWidget.onKeyUp (this, e);
 
+                       KeyboardKeyUp.Raise (this, e);
+
 //                     if (keyboardRepeatThread != null) {
 //                             keyboardRepeatOn = false;
 //                             keyboardRepeatThread.Abort();
@@ -1246,10 +1389,11 @@ namespace Crow
                #endregion
 
                #if MEASURE_TIME
-               public PerformanceMeasure clippingMeasure = new PerformanceMeasure("Clipping", 100);
-               public PerformanceMeasure layoutingMeasure = new PerformanceMeasure("Layouting", 100);
-               public PerformanceMeasure updateMeasure = new PerformanceMeasure("Update", 100);
-               public PerformanceMeasure drawingMeasure = new PerformanceMeasure("Drawing", 100);
+               public PerformanceMeasure clippingMeasure = new PerformanceMeasure("Clipping", 1);
+               public PerformanceMeasure layoutingMeasure = new PerformanceMeasure("Layouting", 1);
+               public PerformanceMeasure updateMeasure = new PerformanceMeasure("Update", 1);
+               public PerformanceMeasure drawingMeasure = new PerformanceMeasure("Drawing", 1);
+               public List<PerformanceMeasure> PerfMeasures = new List<PerformanceMeasure>();
                #endif
                #if DEBUG_LAYOUTING
                public List<LQIList> LQIsTries = new List<LQIList>();
index 9ea64f75ca3dd57b09c39f145f91cdc9fccc1337..6c932f08edc2ca4923ade13375c0bbd91a7902d8 100644 (file)
@@ -37,7 +37,7 @@ namespace Cairo
        {
                Default,
                None,
-               Gray,
+               Grey,
                Subpixel,
        }
 }
index 458b785663268d577ebb08a216a3fca76c1dba4d..c50083eb6af6d61242fafa07aa9b14f0594da132 100644 (file)
@@ -182,19 +182,5 @@ namespace Crow
                                }
                        }
                }
-
-//             public override int Read ()
-//             {                       
-//                     int tmp = base.Read ();
-//                     char c = (char)tmp;
-//                     if (c == '\n') {
-//                             line++;
-//                             column = 1;
-//                     } else if (c == '\t')
-//                             column += Interface.TabSize;
-//                     else if (c != '\r')
-//                             column++;
-//                     return tmp;
-//             }
        }
 }
diff --git a/src/XLib/Display.cs b/src/XLib/Display.cs
new file mode 100644 (file)
index 0000000..7e973b8
--- /dev/null
@@ -0,0 +1,64 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace XLib
+{
+    public class Display : IDisposable
+    {
+        internal IntPtr handle;
+        internal Int32 screen;
+        IntPtr lastEvent;
+
+        public Display()
+        {
+            handle = NativeMethods.XOpenDisplay(IntPtr.Zero);
+            if (handle == IntPtr.Zero)
+                throw new NotSupportedException("[XLib] Failed to open display.");
+
+            screen = NativeMethods.XDefaultScreen(handle);
+            lastEvent = Marshal.AllocHGlobal(96);
+        }
+
+        /*public IntPtr NextEvent {
+            get {                
+                NativeMethods.XNextEvent(handle, lastEvent);
+                return lastEvent;
+            }
+        }*/
+
+               #region IDisposable Support
+               private bool disposedValue = false; // To detect redundant calls
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (!disposedValue)
+            {
+                if (disposing)
+                {
+                    // TODO: dispose managed state (managed objects).
+                }
+
+                //Marshal.FreeHGlobal (lastEvent);
+                NativeMethods.XCloseDisplay (handle);
+
+                disposedValue = true;
+            }
+        }
+
+        // TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
+        ~Display() {
+           // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
+            Dispose(false);
+        }
+
+        // This code added to correctly implement the disposable pattern.
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+        #endregion
+
+
+    }
+}
diff --git a/src/XLib/NativeMethods.cs b/src/XLib/NativeMethods.cs
new file mode 100644 (file)
index 0000000..ed6fa7d
--- /dev/null
@@ -0,0 +1,48 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace XLib
+{
+    public static class NativeMethods
+    {
+               #region pinvoke
+               [DllImportAttribute("X11")]
+               public static extern int XInitThreads();
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XOpenDisplay(IntPtr displayName);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XCloseDisplay(IntPtr disp);
+               [DllImportAttribute("X11")]
+               public static extern Int32 XDefaultScreen(IntPtr disp);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XDefaultRootWindow(IntPtr disp);
+               [DllImportAttribute("X11")]
+               public static extern UInt32 XDefaultDepth (IntPtr disp, Int32 screen);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XDefaultVisual(IntPtr disp, Int32 screen);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XCreateSimpleWindow(IntPtr disp, IntPtr rootWindow, Int32 x, Int32 y, UInt32 width, UInt32 height,
+                                                                 UInt32 borderWidth, IntPtr border, IntPtr background);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XCreatePixmap(IntPtr disp, IntPtr rootWindow, UInt32 width, UInt32 height, UInt32 depth);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XFreePixmap(IntPtr disp, IntPtr pixmap);
+               [DllImportAttribute("X11")]
+               public static extern Int32 XSelectInput(IntPtr disp, IntPtr win, EventMask eventMask);
+               [DllImportAttribute("X11")]
+               public static extern Int32 XMapWindow(IntPtr disp, IntPtr win);
+               [DllImportAttribute("X11")]
+               public static extern int XPending (IntPtr disp);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XNextEvent(IntPtr disp, ref XEvent xevent);
+               [DllImportAttribute("X11")]
+               public static extern Int32 XSync(IntPtr disp, int discard);
+               [DllImportAttribute("X11")]
+               public static extern int XConnectionNumber(IntPtr disp);
+               [DllImportAttribute("X11")]
+               public static extern IntPtr XSetErrorHandler(XErrorHandler error_handler);
+               #endregion
+
+
+       }
+}
diff --git a/src/XLib/Window.cs b/src/XLib/Window.cs
new file mode 100644 (file)
index 0000000..f74a5fd
--- /dev/null
@@ -0,0 +1,62 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace XLib
+{
+    
+    public enum EventType {
+        KeyPress = 2,
+        KeyRelease,
+        ButtonPress,
+        ButtonRelease,
+        MotionNotify,
+        EnterNotify,
+        LeaveNotify,
+        FocusIn,
+        FocusOut,
+        KeymapNotify,
+        Expose,
+        GraphicsExpose,
+        NoExpose,
+        VisibilityNotify,
+        CreateNotify,
+        DestroyNotify,
+        UnmapNotify,
+        MapNotify,
+        MapRequest,
+        ReparentNotify,
+        ConfigureNotify,
+        ConfigureRequest,
+        GravityNotify,
+        ResizeRequest,
+        CirculateNotify,
+        CirculateRequest,
+        PropertyNotify,
+        SelectionClear,
+        SelectionRequest,
+        SelectionNotify,
+        ColormapNotify,
+        ClientMessage,
+        MappingNotify,
+        GenericEvent,
+        LASTEvent = 36  /* must be bigger than any event # */
+       }
+    public class Window 
+    {
+        IntPtr handle;
+        Display disp;
+
+               public Window (Display display, UInt32 width = 800, UInt32 height = 600, Int32 x = 0, Int32 y = 0) {
+            disp = display;
+            handle = NativeMethods.XCreateSimpleWindow (disp.handle, NativeMethods.XDefaultRootWindow(disp.handle), x, y, width, height,
+                                                                                                                  0, IntPtr.Zero, IntPtr.Zero);
+                       if (handle == IntPtr.Zero)
+                               throw new NotSupportedException("[XLib] Failed to create window.");
+
+            NativeMethods.XSelectInput (disp.handle, handle, EventMask.ExposureMask | EventMask.KeyPressMask);
+
+            NativeMethods.XMapWindow (disp.handle, handle);
+               }
+
+    }
+}
diff --git a/src/XLib/X11Structs.cs b/src/XLib/X11Structs.cs
new file mode 100644 (file)
index 0000000..8cf70ab
--- /dev/null
@@ -0,0 +1,1822 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software",, to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2004 Novell, Inc.
+//
+// Authors:
+//     Peter Bartok    pbartok@novell.com
+//
+
+
+// NOT COMPLETE
+
+using System;
+using System.ComponentModel;
+using System.Collections;
+using System.Drawing;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Threading;
+
+/// X11 Version
+namespace XLib {
+       //
+       // In the structures below, fields of type long are mapped to IntPtr.
+       // This will work on all platforms where sizeof(long)==sizeof(void*), which
+       // is almost all platforms except WIN64.
+       //
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XAnyEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XKeyEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           root;
+               public IntPtr           subwindow;
+               public IntPtr           time;
+               public int              x;
+               public int              y;
+               public int              x_root;
+               public int              y_root;
+               public int              state;
+               public int              keycode;
+               public bool             same_screen;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XButtonEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           root;
+               public IntPtr           subwindow;
+               public IntPtr           time;
+               public int              x;
+               public int              y;
+               public int              x_root;
+               public int              y_root;
+               public int              state;
+               public int              button;
+               public bool             same_screen;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XMotionEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           root;
+               public IntPtr           subwindow;
+               public IntPtr           time;
+               public int              x;
+               public int              y;
+               public int              x_root;
+               public int              y_root;
+               public int              state;
+               public byte             is_hint;
+               public bool             same_screen;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XCrossingEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           root;
+               public IntPtr           subwindow;
+               public IntPtr           time;
+               public int              x;
+               public int              y;
+               public int              x_root;
+               public int              y_root;
+               public NotifyMode       mode;
+               public NotifyDetail     detail;
+               public bool             same_screen;
+               public bool             focus;
+               public int              state;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XFocusChangeEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public int              mode;
+               public NotifyDetail     detail;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XKeymapEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public byte             key_vector0;
+               public byte             key_vector1;
+               public byte             key_vector2;
+               public byte             key_vector3;
+               public byte             key_vector4;
+               public byte             key_vector5;
+               public byte             key_vector6;
+               public byte             key_vector7;
+               public byte             key_vector8;
+               public byte             key_vector9;
+               public byte             key_vector10;
+               public byte             key_vector11;
+               public byte             key_vector12;
+               public byte             key_vector13;
+               public byte             key_vector14;
+               public byte             key_vector15;
+               public byte             key_vector16;
+               public byte             key_vector17;
+               public byte             key_vector18;
+               public byte             key_vector19;
+               public byte             key_vector20;
+               public byte             key_vector21;
+               public byte             key_vector22;
+               public byte             key_vector23;
+               public byte             key_vector24;
+               public byte             key_vector25;
+               public byte             key_vector26;
+               public byte             key_vector27;
+               public byte             key_vector28;
+               public byte             key_vector29;
+               public byte             key_vector30;
+               public byte             key_vector31;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XExposeEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public int              x;
+               public int              y;
+               public int              width;
+               public int              height;
+               public int              count;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XGraphicsExposeEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           drawable;
+               public int              x;
+               public int              y;
+               public int              width;
+               public int              height;
+               public int              count;
+               public int              major_code;
+               public int              minor_code;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XNoExposeEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           drawable;
+               public int              major_code;
+               public int              minor_code;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XVisibilityEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public int              state;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XCreateWindowEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           parent;
+               public IntPtr           window;
+               public int              x;
+               public int              y;
+               public int              width;
+               public int              height;
+               public int              border_width;
+               public bool             override_redirect;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XDestroyWindowEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           xevent;
+               public IntPtr           window;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XUnmapEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           xevent;
+               public IntPtr           window;
+               public bool             from_configure;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XMapEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           xevent;
+               public IntPtr           window;
+               public bool             override_redirect;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XMapRequestEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           parent;
+               public IntPtr           window;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XReparentEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           xevent;
+               public IntPtr           window;
+               public IntPtr           parent;
+               public int              x;
+               public int              y;
+               public bool             override_redirect;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XConfigureEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           xevent;
+               public IntPtr           window;
+               public int              x;
+               public int              y;
+               public int              width;
+               public int              height;
+               public int              border_width;
+               public IntPtr           above;
+               public bool             override_redirect;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XGravityEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           xevent;
+               public IntPtr           window;
+               public int              x;
+               public int              y;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XResizeRequestEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public int              width;
+               public int              height;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XConfigureRequestEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           parent;
+               public IntPtr           window;
+               public int              x;
+               public int              y;
+               public int              width;
+               public int              height;
+               public int              border_width;
+               public IntPtr           above;
+               public int              detail;
+               public IntPtr           value_mask;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XCirculateEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           xevent;
+               public IntPtr           window;
+               public int              place;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XCirculateRequestEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           parent;
+               public IntPtr           window;
+               public int              place;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XPropertyEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           atom;
+               public IntPtr           time;
+               public int              state;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XSelectionClearEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           selection;
+               public IntPtr           time;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XSelectionRequestEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           owner;
+               public IntPtr           requestor;
+               public IntPtr           selection;
+               public IntPtr           target;
+               public IntPtr           property;
+               public IntPtr           time;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XSelectionEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           requestor;
+               public IntPtr           selection;
+               public IntPtr           target;
+               public IntPtr           property;
+               public IntPtr           time;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XColormapEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           colormap;
+               public bool             c_new;
+               public int              state;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XClientMessageEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public IntPtr           message_type;
+               public int              format;
+               public IntPtr           ptr1;
+               public IntPtr           ptr2;
+               public IntPtr           ptr3;
+               public IntPtr           ptr4;
+               public IntPtr           ptr5;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XMappingEvent {
+               public XEventName       type;
+               public IntPtr           serial;
+               public bool             send_event;
+               public IntPtr           display;
+               public IntPtr           window;
+               public int              request;
+               public int              first_keycode;
+               public int              count;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XErrorEvent {
+               public XEventName       type;
+               public IntPtr           display;
+               public IntPtr           resourceid;
+               public IntPtr           serial;
+               public byte             error_code;
+               public XRequest request_code;
+               public byte             minor_code;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XEventPad {
+               public IntPtr pad0;
+               public IntPtr pad1;
+               public IntPtr pad2;
+               public IntPtr pad3;
+               public IntPtr pad4;
+               public IntPtr pad5;
+               public IntPtr pad6;
+               public IntPtr pad7;
+               public IntPtr pad8;
+               public IntPtr pad9;
+               public IntPtr pad10;
+               public IntPtr pad11;
+               public IntPtr pad12;
+               public IntPtr pad13;
+               public IntPtr pad14;
+               public IntPtr pad15;
+               public IntPtr pad16;
+               public IntPtr pad17;
+               public IntPtr pad18;
+               public IntPtr pad19;
+               public IntPtr pad20;
+               public IntPtr pad21;
+               public IntPtr pad22;
+               public IntPtr pad23;
+       }
+
+       [StructLayout(LayoutKind.Explicit)]
+       public struct XEvent {
+               [ FieldOffset(0) ] public XEventName type;
+               [ FieldOffset(0) ] public XAnyEvent AnyEvent;
+               [ FieldOffset(0) ] public XKeyEvent KeyEvent;
+               [ FieldOffset(0) ] public XButtonEvent ButtonEvent;
+               [ FieldOffset(0) ] public XMotionEvent MotionEvent;
+               [ FieldOffset(0) ] public XCrossingEvent CrossingEvent;
+               [ FieldOffset(0) ] public XFocusChangeEvent FocusChangeEvent;
+               [ FieldOffset(0) ] public XExposeEvent ExposeEvent;
+               [ FieldOffset(0) ] public XGraphicsExposeEvent GraphicsExposeEvent;
+               [ FieldOffset(0) ] public XNoExposeEvent NoExposeEvent;
+               [ FieldOffset(0) ] public XVisibilityEvent VisibilityEvent;
+               [ FieldOffset(0) ] public XCreateWindowEvent CreateWindowEvent;
+               [ FieldOffset(0) ] public XDestroyWindowEvent DestroyWindowEvent;
+               [ FieldOffset(0) ] public XUnmapEvent UnmapEvent;
+               [ FieldOffset(0) ] public XMapEvent MapEvent;
+               [ FieldOffset(0) ] public XMapRequestEvent MapRequestEvent;
+               [ FieldOffset(0) ] public XReparentEvent ReparentEvent;
+               [ FieldOffset(0) ] public XConfigureEvent ConfigureEvent;
+               [ FieldOffset(0) ] public XGravityEvent GravityEvent;
+               [ FieldOffset(0) ] public XResizeRequestEvent ResizeRequestEvent;
+               [ FieldOffset(0) ] public XConfigureRequestEvent ConfigureRequestEvent;
+               [ FieldOffset(0) ] public XCirculateEvent CirculateEvent;
+               [ FieldOffset(0) ] public XCirculateRequestEvent CirculateRequestEvent;
+               [ FieldOffset(0) ] public XPropertyEvent PropertyEvent;
+               [ FieldOffset(0) ] public XSelectionClearEvent SelectionClearEvent;
+               [ FieldOffset(0) ] public XSelectionRequestEvent SelectionRequestEvent;
+               [ FieldOffset(0) ] public XSelectionEvent SelectionEvent;
+               [ FieldOffset(0) ] public XColormapEvent ColormapEvent;
+               [ FieldOffset(0) ] public XClientMessageEvent ClientMessageEvent;
+               [ FieldOffset(0) ] public XMappingEvent MappingEvent;
+               [ FieldOffset(0) ] public XErrorEvent ErrorEvent;
+               [ FieldOffset(0) ] public XKeymapEvent KeymapEvent;
+
+               //[MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst=24)]
+               //[ FieldOffset(0) ] public int[] pad;
+               [ FieldOffset(0) ] public XEventPad Pad;
+               public override string ToString() {
+                       switch (type)
+                       {
+                               case XEventName.ButtonPress:
+                               case XEventName.ButtonRelease:
+                                       return ToString (ButtonEvent);
+                               case XEventName.CirculateNotify:
+                               case XEventName.CirculateRequest:
+                                       return ToString (CirculateEvent);
+                               case XEventName.ClientMessage:
+                                       return ToString (ClientMessageEvent);
+                               case XEventName.ColormapNotify:
+                                       return ToString (ColormapEvent);
+                               case XEventName.ConfigureNotify:
+                                       return ToString (ConfigureEvent);
+                               case XEventName.ConfigureRequest:
+                                       return ToString (ConfigureRequestEvent);
+                               case XEventName.CreateNotify:
+                                       return ToString (CreateWindowEvent);
+                               case XEventName.DestroyNotify:
+                                       return ToString (DestroyWindowEvent);
+                               case XEventName.Expose:
+                                       return ToString (ExposeEvent);
+                               case XEventName.FocusIn:
+                               case XEventName.FocusOut:
+                                       return ToString (FocusChangeEvent);
+                               case XEventName.GraphicsExpose:
+                                       return ToString (GraphicsExposeEvent);
+                               case XEventName.GravityNotify:
+                                       return ToString (GravityEvent);
+                               case XEventName.KeymapNotify:
+                                       return ToString (KeymapEvent);
+                               case XEventName.MapNotify:
+                                       return ToString (MapEvent);
+                               case XEventName.MappingNotify:
+                                       return ToString (MappingEvent);
+                               case XEventName.MapRequest:
+                                       return ToString (MapRequestEvent);
+                               case XEventName.MotionNotify:
+                                       return ToString (MotionEvent);
+                               case XEventName.NoExpose:
+                                       return ToString (NoExposeEvent);
+                               case XEventName.PropertyNotify:
+                                       return ToString (PropertyEvent);
+                               case XEventName.ReparentNotify:
+                                       return ToString (ReparentEvent);
+                               case XEventName.ResizeRequest:
+                                       return ToString (ResizeRequestEvent);
+                               case XEventName.SelectionClear:
+                                       return ToString (SelectionClearEvent);
+                               case XEventName.SelectionNotify:
+                                       return ToString (SelectionEvent);
+                               case XEventName.SelectionRequest:
+                                       return ToString (SelectionRequestEvent);
+                               case XEventName.UnmapNotify:
+                                       return ToString (UnmapEvent);
+                               case XEventName.VisibilityNotify:
+                                       return ToString (VisibilityEvent);
+                               case XEventName.EnterNotify:
+                               case XEventName.LeaveNotify:
+                                       return ToString (CrossingEvent);
+                               default:
+                                       return type.ToString ();
+                       }
+               }
+               
+               public static string ToString (object ev)
+               {
+                       string result = string.Empty;
+                       Type type = ev.GetType ();
+                       System.Reflection.FieldInfo [] fields = type.GetFields (System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Instance);
+                       for (int i = 0; i < fields.Length; i++) {
+                               if (result != string.Empty) {
+                                       result += ", ";
+                               }
+                               object value = fields [i].GetValue (ev);
+                               result += fields [i].Name + "=" + (value == null ? "<null>" : value.ToString ());
+                       }
+                       return type.Name + " (" + result + ")";
+               }
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XSetWindowAttributes {
+               public IntPtr           background_pixmap;
+               public IntPtr           background_pixel;
+               public IntPtr           border_pixmap;
+               public IntPtr           border_pixel;
+               public Gravity  bit_gravity;
+               public Gravity  win_gravity;
+               public int              backing_store;
+               public IntPtr           backing_planes;
+               public IntPtr           backing_pixel;
+               public bool             save_under;
+               public IntPtr           event_mask;
+               public IntPtr           do_not_propagate_mask;
+               public bool             override_redirect;
+               public IntPtr           colormap;
+               public IntPtr           cursor;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XWindowAttributes {
+               public int              x;
+               public int              y;
+               public int              width;
+               public int              height;
+               public int              border_width;
+               public int              depth;
+               public IntPtr           visual;
+               public IntPtr           root;
+               public int              c_class;
+               public Gravity  bit_gravity;
+               public Gravity  win_gravity;
+               public int              backing_store;
+               public IntPtr           backing_planes;
+               public IntPtr           backing_pixel;
+               public bool             save_under;
+               public IntPtr           colormap;
+               public bool             map_installed;
+               public MapState map_state;
+               public IntPtr           all_event_masks;
+               public IntPtr           your_event_mask;
+               public IntPtr           do_not_propagate_mask;
+               public bool             override_direct;
+               public IntPtr           screen;
+
+               public override string ToString ()
+               {
+                       return XEvent.ToString (this);
+               }
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XTextProperty {
+               public string           value;
+               public IntPtr           encoding;
+               public int              format;
+               public IntPtr           nitems;
+       }
+
+       public enum XWindowClass {
+               InputOutput     = 1,
+               InputOnly       = 2
+       }
+
+       public enum XEventName {
+               KeyPress                = 2,
+               KeyRelease              = 3,
+               ButtonPress             = 4,
+               ButtonRelease           = 5,
+               MotionNotify            = 6,
+               EnterNotify             = 7,
+               LeaveNotify             = 8,
+               FocusIn                 = 9,
+               FocusOut                = 10,
+               KeymapNotify            = 11,
+               Expose                  = 12,
+               GraphicsExpose          = 13,
+               NoExpose                = 14,
+               VisibilityNotify        = 15,
+               CreateNotify            = 16,
+               DestroyNotify           = 17,
+               UnmapNotify             = 18,
+               MapNotify               = 19,
+               MapRequest              = 20,
+               ReparentNotify          = 21,
+               ConfigureNotify         = 22,
+               ConfigureRequest        = 23,
+               GravityNotify           = 24,
+               ResizeRequest           = 25,
+               CirculateNotify         = 26,
+               CirculateRequest        = 27,
+               PropertyNotify          = 28,
+               SelectionClear          = 29,
+               SelectionRequest        = 30,
+               SelectionNotify         = 31,
+               ColormapNotify          = 32,
+               ClientMessage           = 33,
+               MappingNotify           = 34,
+
+               LASTEvent
+       }
+
+       [Flags]
+       public enum SetWindowValuemask {
+               Nothing         = 0,
+               BackPixmap      = 1,
+               BackPixel       = 2,
+               BorderPixmap    = 4,
+               BorderPixel     = 8,
+               BitGravity      = 16,
+               WinGravity      = 32,
+               BackingStore    = 64,
+               BackingPlanes   = 128,
+               BackingPixel    = 256,
+               OverrideRedirect = 512,
+               SaveUnder       = 1024,
+               EventMask       = 2048,
+               DontPropagate   = 4096,
+               ColorMap        = 8192,
+               Cursor          = 16384
+       }
+       
+       public enum SendEventValues {
+               PointerWindow = 0,
+               InputFocus = 1
+       }
+
+       public enum CreateWindowArgs {
+               CopyFromParent  = 0,
+               ParentRelative  = 1,
+               InputOutput     = 1,
+               InputOnly       = 2
+       }
+
+       public enum Gravity {
+               ForgetGravity   = 0,
+               NorthWestGravity= 1,
+               NorthGravity    = 2,
+               NorthEastGravity= 3,
+               WestGravity     = 4,
+               CenterGravity   = 5,
+               EastGravity     = 6,
+               SouthWestGravity= 7,
+               SouthGravity    = 8,
+               SouthEastGravity= 9,
+               StaticGravity   = 10
+       }
+
+       public enum XKeySym : uint {
+               XK_BackSpace    = 0xFF08,
+               XK_Tab          = 0xFF09,
+               XK_Clear        = 0xFF0B,
+               XK_Return       = 0xFF0D,
+               XK_Home         = 0xFF50,
+               XK_Left         = 0xFF51,
+               XK_Up           = 0xFF52,
+               XK_Right        = 0xFF53,
+               XK_Down         = 0xFF54,
+               XK_Page_Up      = 0xFF55,
+               XK_Page_Down    = 0xFF56,
+               XK_End          = 0xFF57,
+               XK_Begin        = 0xFF58,
+               XK_Menu         = 0xFF67,
+               XK_Shift_L      = 0xFFE1,
+               XK_Shift_R      = 0xFFE2,
+               XK_Control_L    = 0xFFE3,
+               XK_Control_R    = 0xFFE4,
+               XK_Caps_Lock    = 0xFFE5,
+               XK_Shift_Lock   = 0xFFE6,       
+               XK_Meta_L       = 0xFFE7,
+               XK_Meta_R       = 0xFFE8,
+               XK_Alt_L        = 0xFFE9,
+               XK_Alt_R        = 0xFFEA,
+               XK_Super_L      = 0xFFEB,
+               XK_Super_R      = 0xFFEC,
+               XK_Hyper_L      = 0xFFED,
+               XK_Hyper_R      = 0xFFEE,
+       }
+
+       [Flags]
+       public enum EventMask {
+               NoEventMask             = 0,
+               KeyPressMask            = 1<<0,
+               KeyReleaseMask          = 1<<1,
+               ButtonPressMask         = 1<<2,
+               ButtonReleaseMask       = 1<<3,
+               EnterWindowMask         = 1<<4,
+               LeaveWindowMask         = 1<<5,
+               PointerMotionMask       = 1<<6,
+               PointerMotionHintMask   = 1<<7,
+               Button1MotionMask       = 1<<8,
+               Button2MotionMask       = 1<<9,
+               Button3MotionMask       = 1<<10,
+               Button4MotionMask       = 1<<11,
+               Button5MotionMask       = 1<<12,
+               ButtonMotionMask        = 1<<13,
+               KeymapStateMask         = 1<<14,
+               ExposureMask            = 1<<15,
+               VisibilityChangeMask    = 1<<16,
+               StructureNotifyMask     = 1<<17,
+               ResizeRedirectMask      = 1<<18,
+               SubstructureNotifyMask  = 1<<19,
+               SubstructureRedirectMask= 1<<20,
+               FocusChangeMask         = 1<<21,
+               PropertyChangeMask      = 1<<22,
+               ColormapChangeMask      = 1<<23,
+               OwnerGrabButtonMask     = 1<<24
+       }
+
+       public enum GrabMode {
+               GrabModeSync            = 0,
+               GrabModeAsync           = 1
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XStandardColormap {
+               public IntPtr           colormap;
+               public IntPtr           red_max;
+               public IntPtr           red_mult;
+               public IntPtr           green_max;
+               public IntPtr           green_mult;
+               public IntPtr           blue_max;
+               public IntPtr           blue_mult;
+               public IntPtr           base_pixel;
+               public IntPtr           visualid;
+               public IntPtr           killid;
+       }
+
+       [StructLayout(LayoutKind.Sequential, Pack=2)]
+       public struct XColor {
+               public IntPtr           pixel;
+               public ushort           red;
+               public ushort           green;
+               public ushort           blue;
+               public byte             flags;
+               public byte             pad;
+       }
+
+       public enum Atom {
+               AnyPropertyType         = 0,
+               XA_PRIMARY              = 1,
+               XA_SECONDARY            = 2,
+               XA_ARC                  = 3,
+               XA_ATOM                 = 4,
+               XA_BITMAP               = 5,
+               XA_CARDINAL             = 6,
+               XA_COLORMAP             = 7,
+               XA_CURSOR               = 8,
+               XA_CUT_BUFFER0          = 9,
+               XA_CUT_BUFFER1          = 10,
+               XA_CUT_BUFFER2          = 11,
+               XA_CUT_BUFFER3          = 12,
+               XA_CUT_BUFFER4          = 13,
+               XA_CUT_BUFFER5          = 14,
+               XA_CUT_BUFFER6          = 15,
+               XA_CUT_BUFFER7          = 16,
+               XA_DRAWABLE             = 17,
+               XA_FONT                 = 18,
+               XA_INTEGER              = 19,
+               XA_PIXMAP               = 20,
+               XA_POINT                = 21,
+               XA_RECTANGLE            = 22,
+               XA_RESOURCE_MANAGER     = 23,
+               XA_RGB_COLOR_MAP        = 24,
+               XA_RGB_BEST_MAP         = 25,
+               XA_RGB_BLUE_MAP         = 26,
+               XA_RGB_DEFAULT_MAP      = 27,
+               XA_RGB_GRAY_MAP         = 28,
+               XA_RGB_GREEN_MAP        = 29,
+               XA_RGB_RED_MAP          = 30,
+               XA_STRING               = 31,
+               XA_VISUALID             = 32,
+               XA_WINDOW               = 33,
+               XA_WM_COMMAND           = 34,
+               XA_WM_HINTS             = 35,
+               XA_WM_CLIENT_MACHINE    = 36,
+               XA_WM_ICON_NAME         = 37,
+               XA_WM_ICON_SIZE         = 38,
+               XA_WM_NAME              = 39,
+               XA_WM_NORMAL_HINTS      = 40,
+               XA_WM_SIZE_HINTS        = 41,
+               XA_WM_ZOOM_HINTS        = 42,
+               XA_MIN_SPACE            = 43,
+               XA_NORM_SPACE           = 44,
+               XA_MAX_SPACE            = 45,
+               XA_END_SPACE            = 46,
+               XA_SUPERSCRIPT_X        = 47,
+               XA_SUPERSCRIPT_Y        = 48,
+               XA_SUBSCRIPT_X          = 49,
+               XA_SUBSCRIPT_Y          = 50,
+               XA_UNDERLINE_POSITION   = 51,
+               XA_UNDERLINE_THICKNESS  = 52,
+               XA_STRIKEOUT_ASCENT     = 53,
+               XA_STRIKEOUT_DESCENT    = 54,
+               XA_ITALIC_ANGLE         = 55,
+               XA_X_HEIGHT             = 56,
+               XA_QUAD_WIDTH           = 57,
+               XA_WEIGHT               = 58,
+               XA_POINT_SIZE           = 59,
+               XA_RESOLUTION           = 60,
+               XA_COPYRIGHT            = 61,
+               XA_NOTICE               = 62,
+               XA_FONT_NAME            = 63,
+               XA_FAMILY_NAME          = 64,
+               XA_FULL_NAME            = 65,
+               XA_CAP_HEIGHT           = 66,
+               XA_WM_CLASS             = 67,
+               XA_WM_TRANSIENT_FOR     = 68,
+
+               XA_LAST_PREDEFINED      = 68
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XScreen {
+               public IntPtr           ext_data;
+               public IntPtr           display;
+               public IntPtr           root;
+               public int              width;
+               public int              height;
+               public int              mwidth;
+               public int              mheight;
+               public int              ndepths;
+               public IntPtr           depths;
+               public int              root_depth;
+               public IntPtr           root_visual;
+               public IntPtr           default_gc;
+               public IntPtr           cmap;
+               public IntPtr           white_pixel;
+               public IntPtr           black_pixel;
+               public int              max_maps;
+               public int              min_maps;
+               public int              backing_store;
+               public bool             save_unders;
+               public IntPtr       root_input_mask;
+       }
+
+       [Flags]
+       public enum ChangeWindowFlags {
+               CWX                     = 1<<0,
+               CWY                     = 1<<1,
+               CWWidth                 = 1<<2,
+               CWHeight                = 1<<3,
+               CWBorderWidth           = 1<<4,
+               CWSibling               = 1<<5,
+               CWStackMode             = 1<<6
+       }
+
+       public enum StackMode {
+               Above                   = 0,
+               Below                   = 1,
+               TopIf                   = 2,
+               BottomIf                = 3,
+               Opposite                = 4
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XWindowChanges {
+               public int              x;
+               public int              y;
+               public int              width;
+               public int              height;
+               public int              border_width;
+               public IntPtr           sibling;
+               public StackMode        stack_mode;
+       }       
+
+       [Flags]
+       public enum ColorFlags {
+               DoRed                   = 1<<0,
+               DoGreen                 = 1<<1,
+               DoBlue                  = 1<<2
+       }
+
+       public enum NotifyMode {
+               NotifyNormal            = 0,
+               NotifyGrab              = 1,
+               NotifyUngrab            = 2
+       }
+
+       public enum NotifyDetail {
+               NotifyAncestor          = 0,
+               NotifyVirtual           = 1,
+               NotifyInferior          = 2,
+               NotifyNonlinear         = 3,
+               NotifyNonlinearVirtual  = 4,
+               NotifyPointer           = 5,
+               NotifyPointerRoot       = 6,
+               NotifyDetailNone        = 7
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct MotifWmHints {
+               public IntPtr           flags;
+               public IntPtr           functions;
+               public IntPtr       decorations;
+               public IntPtr           input_mode;
+               public IntPtr           status;
+
+               public override string ToString ()
+               {
+                       return string.Format("MotifWmHints <flags={0}, functions={1}, decorations={2}, input_mode={3}, status={4}", (MotifFlags) flags.ToInt32 (), (MotifFunctions) functions.ToInt32 (), (MotifDecorations) decorations.ToInt32 (), (MotifInputMode) input_mode.ToInt32 (), status.ToInt32 ());
+               }
+       }
+
+       [Flags]
+       public enum MotifFlags {
+               Functions               = 1,
+               Decorations             = 2,
+               InputMode               = 4,
+               Status                  = 8
+       }
+
+       [Flags]
+       public enum MotifFunctions {
+               All                     = 0x01,
+               Resize                  = 0x02,
+               Move                    = 0x04,
+               Minimize                = 0x08,
+               Maximize                = 0x10,
+               Close                   = 0x20
+       }
+
+       [Flags]
+       public enum MotifDecorations {
+               All                     = 0x01,
+               Border                  = 0x02,
+               ResizeH                 = 0x04,
+               Title                   = 0x08,
+               Menu                    = 0x10,
+               Minimize                = 0x20,
+               Maximize                = 0x40,
+               
+       }
+
+       [Flags]
+       public enum MotifInputMode {
+               Modeless                = 0,
+               ApplicationModal        = 1,
+               SystemModal             = 2,
+               FullApplicationModal    = 3
+       }
+
+       [Flags]
+       public enum KeyMasks {
+               ShiftMask               = (1 << 0),
+               LockMask                = (1 << 1),
+               ControlMask             = (1 << 2),
+               Mod1Mask                = (1 << 3),
+               Mod2Mask                = (1 << 4),
+               Mod3Mask                = (1 << 5),
+               Mod4Mask                = (1 << 6),
+               Mod5Mask                = (1 << 7),
+
+               ModMasks                = Mod1Mask | Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask
+       }
+
+       [Flags]
+       public enum MouseKeyMasks {
+               Button1Mask             = (1 << 8),
+               Button2Mask             = (1 << 9),
+               Button3Mask             = (1 << 10),
+               Button4Mask             = (1 << 11),
+               Button5Mask             = (1 << 12),
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       public struct XModifierKeymap {
+               public int max_keypermod;
+               public IntPtr modifiermap;
+       } 
+
+       public enum PropertyMode {
+               Replace                 = 0,
+               Prepend                 = 1,
+               Append                  = 2
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       public struct XKeyBoardState {
+               public int key_click_percent;
+               public int bell_percent;
+               public uint bell_pitch, bell_duration;
+               public IntPtr led_mask;
+               public int global_auto_repeat;
+               public AutoRepeats auto_repeats;
+
+               [StructLayout (LayoutKind.Explicit)]
+                       public struct AutoRepeats {
+                       [FieldOffset (0)]
+                       public byte first;
+                               
+                       [FieldOffset (31)]
+                       public byte last;
+               }
+       }
+
+       [Flags]
+       public enum GCFunction {
+               GCFunction              = 1<<0,
+               GCPlaneMask             = 1<<1,
+               GCForeground            = 1<<2,
+               GCBackground            = 1<<3,
+               GCLineWidth             = 1<<4,
+               GCLineStyle             = 1<<5,
+               GCCapStyle              = 1<<6,
+               GCJoinStyle             = 1<<7,
+               GCFillStyle             = 1<<8,
+               GCFillRule              = 1<<9, 
+               GCTile                  = 1<<10,
+               GCStipple               = 1<<11,
+               GCTileStipXOrigin       = 1<<12,
+               GCTileStipYOrigin       = 1<<13,
+               GCFont                  = 1<<14,
+               GCSubwindowMode         = 1<<15,
+               GCGraphicsExposures     = 1<<16,
+               GCClipXOrigin           = 1<<17,
+               GCClipYOrigin           = 1<<18,
+               GCClipMask              = 1<<19,
+               GCDashOffset            = 1<<20,
+               GCDashList              = 1<<21,
+               GCArcMode               = 1<<22
+       }
+
+       public enum GCJoinStyle {
+               JoinMiter               = 0,
+               JoinRound               = 1,
+               JoinBevel               = 2
+       }
+
+       public enum GCLineStyle {
+               LineSolid               = 0,
+               LineOnOffDash           = 1,
+               LineDoubleDash          = 2
+       }
+
+       public enum GCCapStyle {
+               CapNotLast              = 0,
+               CapButt                 = 1,
+               CapRound                = 2,
+               CapProjecting           = 3
+       }
+
+       public enum GCFillStyle {
+               FillSolid               = 0,
+               FillTiled               = 1,
+               FillStippled            = 2,
+               FillOpaqueStppled       = 3
+       }
+
+       public enum GCFillRule {
+               EvenOddRule             = 0,
+               WindingRule             = 1
+       }
+
+       public enum GCArcMode {
+               ArcChord                = 0,
+               ArcPieSlice             = 1
+       }
+
+       public enum GCSubwindowMode {
+               ClipByChildren          = 0,
+               IncludeInferiors        = 1
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       public struct XGCValues {
+               public GXFunction               function;
+               public IntPtr                   plane_mask;
+               public IntPtr                   foreground;
+               public IntPtr                   background;
+               public int                      line_width;
+               public GCLineStyle              line_style;
+               public GCCapStyle               cap_style;
+               public GCJoinStyle              join_style;
+               public GCFillStyle              fill_style;
+               public GCFillRule               fill_rule;
+               public GCArcMode                arc_mode;
+               public IntPtr                   tile;
+               public IntPtr                   stipple;
+               public int                      ts_x_origin;
+               public int                      ts_y_origin;
+               public IntPtr                   font;
+               public GCSubwindowMode  subwindow_mode;
+               public bool                     graphics_exposures;
+               public int                      clip_x_origin;
+               public int                      clib_y_origin;
+               public IntPtr                   clip_mask;
+               public int                      dash_offset;
+               public byte                     dashes;
+       }
+
+       public enum GXFunction {
+               GXclear                         = 0x0,          /* 0 */
+               GXand                           = 0x1,          /* src AND dst */
+               GXandReverse                    = 0x2,          /* src AND NOT dst */
+               GXcopy                          = 0x3,          /* src */
+               GXandInverted                   = 0x4,          /* NOT src AND dst */
+               GXnoop                          = 0x5,          /* dst */
+               GXxor                           = 0x6,          /* src XOR dst */
+               GXor                            = 0x7,          /* src OR dst */
+               GXnor                           = 0x8,          /* NOT src AND NOT dst */
+               GXequiv                         = 0x9,          /* NOT src XOR dst */
+               GXinvert                        = 0xa,          /* NOT dst */
+               GXorReverse                     = 0xb,          /* src OR NOT dst */
+               GXcopyInverted                  = 0xc,          /* NOT src */
+               GXorInverted                    = 0xd,          /* NOT src OR dst */
+               GXnand                          = 0xe,          /* NOT src OR NOT dst */
+               GXset                           = 0xf           /* 1 */
+       }
+
+       public enum NetWindowManagerState {
+               Remove                          = 0,
+               Add                             = 1,
+               Toggle                          = 2
+       }
+
+       public enum RevertTo {
+               None                            = 0,
+               PointerRoot                     = 1,
+               Parent                          = 2
+       }
+
+       public enum MapState {
+               IsUnmapped                      = 0,
+               IsUnviewable                    = 1,
+               IsViewable                      = 2
+       }
+
+       public enum CursorFontShape {
+               XC_X_cursor                     = 0,
+               XC_arrow                        = 2,
+               XC_based_arrow_down             = 4,
+               XC_based_arrow_up               = 6,
+               XC_boat                         = 8,
+               XC_bogosity                     = 10,
+               XC_bottom_left_corner           = 12,
+               XC_bottom_right_corner          = 14,
+               XC_bottom_side                  = 16,
+               XC_bottom_tee                   = 18,
+               XC_box_spiral                   = 20,
+               XC_center_ptr                   = 22,
+
+               XC_circle                       = 24,
+               XC_clock                        = 26,
+               XC_coffee_mug                   = 28,
+               XC_cross                        = 30,
+               XC_cross_reverse                = 32,
+               XC_crosshair                    = 34,
+               XC_diamond_cross                = 36,
+               XC_dot                          = 38,
+               XC_dotbox                       = 40,
+               XC_double_arrow                 = 42,
+               XC_draft_large                  = 44,
+               XC_draft_small                  = 46,
+
+               XC_draped_box                   = 48,
+               XC_exchange                     = 50,
+               XC_fleur                        = 52,
+               XC_gobbler                      = 54,
+               XC_gumby                        = 56,
+               XC_hand1                        = 58,
+               XC_hand2                        = 60,
+               XC_heart                        = 62,
+               XC_icon                         = 64,
+               XC_iron_cross                   = 66,
+               XC_left_ptr                     = 68,
+               XC_left_side                    = 70,
+
+               XC_left_tee                     = 72,
+               XC_left_button                  = 74,
+               XC_ll_angle                     = 76,
+               XC_lr_angle                     = 78,
+               XC_man                          = 80,
+               XC_middlebutton                 = 82,
+               XC_mouse                        = 84,
+               XC_pencil                       = 86,
+               XC_pirate                       = 88,
+               XC_plus                         = 90,
+               XC_question_arrow               = 92,
+               XC_right_ptr                    = 94,
+
+               XC_right_side                   = 96,
+               XC_right_tee                    = 98,
+               XC_rightbutton                  = 100,
+               XC_rtl_logo                     = 102,
+               XC_sailboat                     = 104,
+               XC_sb_down_arrow                = 106,
+               XC_sb_h_double_arrow            = 108,
+               XC_sb_left_arrow                = 110,
+               XC_sb_right_arrow               = 112,
+               XC_sb_up_arrow                  = 114,
+               XC_sb_v_double_arrow            = 116,
+               XC_sb_shuttle                   = 118,
+
+               XC_sizing                       = 120,
+               XC_spider                       = 122,
+               XC_spraycan                     = 124,
+               XC_star                         = 126,
+               XC_target                       = 128,
+               XC_tcross                       = 130,
+               XC_top_left_arrow               = 132,
+               XC_top_left_corner              = 134,
+               XC_top_right_corner             = 136,
+               XC_top_side                     = 138,
+               XC_top_tee                      = 140,
+               XC_trek                         = 142,
+
+               XC_ul_angle                     = 144,
+               XC_umbrella                     = 146,
+               XC_ur_angle                     = 148,
+               XC_watch                        = 150,
+               XC_xterm                        = 152,
+               XC_num_glyphs                   = 154
+       }
+
+       public enum SystrayRequest {
+               SYSTEM_TRAY_REQUEST_DOCK        = 0,
+               SYSTEM_TRAY_BEGIN_MESSAGE       = 1,
+               SYSTEM_TRAY_CANCEL_MESSAGE      = 2
+       }
+
+       public enum NetWmStateRequest {
+               _NET_WM_STATE_REMOVE            = 0,
+               _NET_WM_STATE_ADD               = 1,
+               _NET_WM_STATE_TOGGLE            = 2
+       }
+
+       public enum NetWmMoveResize {
+               _NET_WM_MOVERESIZE_SIZE_TOPLEFT =       0,
+               _NET_WM_MOVERESIZE_SIZE_TOP =           1,
+               _NET_WM_MOVERESIZE_SIZE_TOPRIGHT =      2,
+               _NET_WM_MOVERESIZE_SIZE_RIGHT =         3,
+               _NET_WM_MOVERESIZE_SIZE_BOTTOMRIGHT =   4,
+               _NET_WM_MOVERESIZE_SIZE_BOTTOM =        5,
+               _NET_WM_MOVERESIZE_SIZE_BOTTOMLEFT =    6,
+               _NET_WM_MOVERESIZE_SIZE_LEFT =          7,
+               _NET_WM_MOVERESIZE_MOVE =               8,
+               _NET_WM_MOVERESIZE_SIZE_KEYBOARD =      9,
+               _NET_WM_MOVERESIZE_MOVE_KEYBOARD =      10,
+               _NET_WM_MOVERESIZE_CANCEL =             11
+       }
+
+       [Flags]
+       public enum XSizeHintsFlags  {
+               USPosition                      = (1 << 0),
+               USSize                          = (1 << 1),
+               PPosition                       = (1 << 2),
+               PSize                           = (1 << 3),
+               PMinSize                        = (1 << 4),
+               PMaxSize                        = (1 << 5),
+               PResizeInc                      = (1 << 6),
+               PAspect                         = (1 << 7),
+               PAllHints                       = (PPosition | PSize | PMinSize | PMaxSize | PResizeInc | PAspect),
+               PBaseSize                       = (1 << 8),
+               PWinGravity                     = (1 << 9),
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XSizeHints {
+               public IntPtr                   flags;
+               public int                      x;
+               public int                      y;
+               public int                      width;
+               public int                      height;
+               public int                      min_width;
+               public int                      min_height;
+               public int                      max_width;
+               public int                      max_height;
+               public int                      width_inc;
+               public int                      height_inc;
+               public int                      min_aspect_x;
+               public int                      min_aspect_y;
+               public int                      max_aspect_x;
+               public int                      max_aspect_y;
+               public int                      base_width;
+               public int                      base_height;
+               public int                      win_gravity;
+       }
+
+       [Flags]
+       public enum XWMHintsFlags {
+               InputHint                       = (1 << 0),
+               StateHint                       = (1 << 1),
+               IconPixmapHint                  = (1 << 2),
+               IconWindowHint                  = (1 << 3),
+               IconPositionHint                = (1 << 4),
+               IconMaskHint                    = (1 << 5),
+               WindowGroupHint                 = (1 << 6),
+               AllHints                        = (InputHint | StateHint | IconPixmapHint | IconWindowHint | IconPositionHint | IconMaskHint | WindowGroupHint)
+       }
+
+       public enum XInitialState {
+               DontCareState                   = 0,
+               NormalState                     = 1,
+               ZoomState                       = 2,
+               IconicState                     = 3,
+               InactiveState                   = 4
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XWMHints {
+               public IntPtr                   flags;
+               public bool                     input;
+               public XInitialState            initial_state;
+               public IntPtr                   icon_pixmap;
+               public IntPtr                   icon_window;
+               public int                      icon_x;
+               public int                      icon_y;
+               public IntPtr                   icon_mask;
+               public IntPtr                   window_group;
+       }
+
+       [StructLayout(LayoutKind.Sequential)]
+       public struct XIconSize {
+               public int                      min_width;
+               public int                      min_height;
+               public int                      max_width;
+               public int                      max_height;
+               public int                      width_inc;
+               public int                      height_inc;
+       }
+
+       public struct CaretStruct {
+               public Timer    Timer;                          // Blink interval
+               public IntPtr   Hwnd;                           // Window owning the caret
+               public IntPtr   Window;                         // Actual X11 handle of the window
+               public int      X;                              // X position of the caret
+               public int      Y;                              // Y position of the caret
+               public int      Width;                          // Width of the caret; if no image used
+               public int      Height;                         // Height of the caret, if no image used
+               public bool     Visible;                        // Is caret visible?
+               public bool     On;                             // Caret blink display state: On/Off
+               public IntPtr   gc;                             // Graphics context
+               public bool     Paused;                         // Don't update right now
+       }
+
+       public struct HoverStruct {
+               public Timer    Timer;                          // for hovering
+               public IntPtr   Window;                         // Last window we entered; used to generate WM_MOUSEHOVER (handle is X11 handle)
+               public int      X;                              // Last MouseMove X coordinate; used to generate WM_MOUSEHOVER
+               public int      Y;                              // Last MouseMove Y coordinate; used to generate WM_MOUSEHOVER
+               public Size     Size;                           // Size of the rectangle the mouse has to stay in to generate hover
+               public int      Interval;                       // in milliseconds, how long to hold before hover is generated
+               public IntPtr   Atom;                           // X Atom
+       }
+
+       /*public struct ClickStruct {
+               public IntPtr   Hwnd;                           // 
+               public Msg      Message;                        // 
+               public IntPtr   wParam;                         // 
+               public IntPtr   lParam;                         // 
+               public long     Time;                           // Last time we received a mouse click
+               public bool     Pending;                        // True if we haven't sent the last mouse click
+       }*/
+
+       public struct GrabStruct {
+               public bool             Confined;               // Is the current grab (if any) confined to grab_area?
+               public IntPtr           Hwnd;                   // The window that is grabbed
+               public Rectangle        Area;                   // The area the current grab is confined to
+       }
+
+       public delegate int  XErrorHandler(IntPtr DisplayHandle, ref XErrorEvent error_event);
+
+       public enum XRequest : byte {
+               X_CreateWindow                  = 1,
+               X_ChangeWindowAttributes        = 2,
+               X_GetWindowAttributes           = 3,
+               X_DestroyWindow                 = 4,
+               X_DestroySubwindows             = 5,
+               X_ChangeSaveSet                 = 6,
+               X_ReparentWindow                = 7,
+               X_MapWindow                     = 8,
+               X_MapSubwindows                 = 9,
+               X_UnmapWindow                   = 10,
+               X_UnmapSubwindows               = 11,
+               X_ConfigureWindow               = 12,
+               X_CirculateWindow               = 13,
+               X_GetGeometry                   = 14,
+               X_QueryTree                     = 15,
+               X_InternAtom                    = 16,
+               X_GetAtomName                   = 17,
+               X_ChangeProperty                = 18,
+               X_DeleteProperty                = 19,
+               X_GetProperty                   = 20,
+               X_ListProperties                = 21,
+               X_SetSelectionOwner             = 22,
+               X_GetSelectionOwner             = 23,
+               X_ConvertSelection              = 24,
+               X_SendEvent                     = 25,
+               X_GrabPointer                   = 26,
+               X_UngrabPointer                 = 27,
+               X_GrabButton                    = 28,
+               X_UngrabButton                  = 29,
+               X_ChangeActivePointerGrab       = 30,
+               X_GrabKeyboard                  = 31,
+               X_UngrabKeyboard                = 32,
+               X_GrabKey                       = 33,
+               X_UngrabKey                     = 34,
+               X_AllowEvents                   = 35,
+               X_GrabServer                    = 36,
+               X_UngrabServer                  = 37,
+               X_QueryPointer                  = 38,
+               X_GetMotionEvents               = 39,
+               X_TranslateCoords               = 40,
+               X_WarpPointer                   = 41,
+               X_SetInputFocus                 = 42,
+               X_GetInputFocus                 = 43,
+               X_QueryKeymap                   = 44,
+               X_OpenFont                      = 45,
+               X_CloseFont                     = 46,
+               X_QueryFont                     = 47,
+               X_QueryTextExtents              = 48,
+               X_ListFonts                     = 49,
+               X_ListFontsWithInfo             = 50,
+               X_SetFontPath                   = 51,
+               X_GetFontPath                   = 52,
+               X_CreatePixmap                  = 53,
+               X_FreePixmap                    = 54,
+               X_CreateGC                      = 55,
+               X_ChangeGC                      = 56,
+               X_CopyGC                        = 57,
+               X_SetDashes                     = 58,
+               X_SetClipRectangles             = 59,
+               X_FreeGC                        = 60,
+               X_ClearArea                     = 61,
+               X_CopyArea                      = 62,
+               X_CopyPlane                     = 63,
+               X_PolyPoint                     = 64,
+               X_PolyLine                      = 65,
+               X_PolySegment                   = 66,
+               X_PolyRectangle                 = 67,
+               X_PolyArc                       = 68,
+               X_FillPoly                      = 69,
+               X_PolyFillRectangle             = 70,
+               X_PolyFillArc                   = 71,
+               X_PutImage                      = 72,
+               X_GetImage                      = 73,
+               X_PolyText8                     = 74,
+               X_PolyText16                    = 75,
+               X_ImageText8                    = 76,
+               X_ImageText16                   = 77,
+               X_CreateColormap                = 78,
+               X_FreeColormap                  = 79,
+               X_CopyColormapAndFree           = 80,
+               X_InstallColormap               = 81,
+               X_UninstallColormap             = 82,
+               X_ListInstalledColormaps        = 83,
+               X_AllocColor                    = 84,
+               X_AllocNamedColor               = 85,
+               X_AllocColorCells               = 86,
+               X_AllocColorPlanes              = 87,
+               X_FreeColors                    = 88,
+               X_StoreColors                   = 89,
+               X_StoreNamedColor               = 90,
+               X_QueryColors                   = 91,
+               X_LookupColor                   = 92,
+               X_CreateCursor                  = 93,
+               X_CreateGlyphCursor             = 94,
+               X_FreeCursor                    = 95,
+               X_RecolorCursor                 = 96,
+               X_QueryBestSize                 = 97,
+               X_QueryExtension                = 98,
+               X_ListExtensions                = 99,
+               X_ChangeKeyboardMapping         = 100,
+               X_GetKeyboardMapping            = 101,
+               X_ChangeKeyboardControl         = 102,
+               X_GetKeyboardControl            = 103,
+               X_Bell                          = 104,
+               X_ChangePointerControl          = 105,
+               X_GetPointerControl             = 106,
+               X_SetScreenSaver                = 107,
+               X_GetScreenSaver                = 108,
+               X_ChangeHosts                   = 109,
+               X_ListHosts                     = 110,
+               X_SetAccessControl              = 111,
+               X_SetCloseDownMode              = 112,
+               X_KillClient                    = 113,
+               X_RotateProperties              = 114,
+               X_ForceScreenSaver              = 115,
+               X_SetPointerMapping             = 116,
+               X_GetPointerMapping             = 117,
+               X_SetModifierMapping            = 118,
+               X_GetModifierMapping            = 119,
+               X_NoOperation                   = 127
+       }
+
+       [Flags]
+       public enum XIMProperties {
+               XIMPreeditArea          = 0x0001,
+               XIMPreeditCallbacks     = 0x0002,
+               XIMPreeditPosition      = 0x0004,
+               XIMPreeditNothing       = 0x0008,
+               XIMPreeditNone          = 0x0010,
+               XIMStatusArea           = 0x0100,
+               XIMStatusCallbacks      = 0x0200,
+               XIMStatusNothing        = 0x0400,
+               XIMStatusNone           = 0x0800,
+       }
+
+       [Flags]
+       public enum WindowType {
+               Client                  = 1,
+               Whole                   = 2,
+               Both                    = 3
+       }
+
+       public enum XEmbedMessage {
+               EmbeddedNotify = 0,
+               WindowActivate = 1,
+               WindowDeactivate = 2,
+               RequestFocus = 3,
+               FocusIn = 4,
+               FocusOut = 5,
+               FocusNext = 6,
+               FocusPrev = 7,
+               /* 8-9 were used for XEMBED_GRAB_KEY/XEMBED_UNGRAB_KEY */
+               ModalityOn = 10,
+               ModalityOff = 11,
+               RegisterAccelerator = 12,
+               UnregisterAccelerator = 13,
+               ActivateAccelerator = 14
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       public struct XcursorImage
+       {
+               private int version;
+               public int size;       /* nominal size for matching */
+               public int width;      /* actual width */
+               public int height;     /* actual height */
+               public int xhot;       /* hot spot x (must be inside image) */
+               public int yhot;       /* hot spot y (must be inside image) */
+               public int delay;       /* hot spot y (must be inside image) */
+               public IntPtr pixels;    /* pointer to pixels */
+
+               public override string ToString ()
+               {
+                       return string.Format ("XCursorImage (version: {0}, size: {1}, width: {2}, height: {3}, xhot: {4}, yhot: {5}, delay: {6}, pixels: {7}", 
+                               version, size, width, height, xhot, yhot, delay, pixels);
+               }
+       } ;
+
+       [StructLayout (LayoutKind.Sequential)]
+       public struct XcursorImages
+       {
+               public int nimage;     /* number of images */
+               public IntPtr images;   /* array of XcursorImage pointers */
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       public struct XIMStyles
+       {
+               public ushort count_styles;
+               public IntPtr supported_styles;
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       [Serializable]
+       public class XPoint
+       {
+               public short X;
+               public short Y;
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       [Serializable]
+       public class XIMCallback
+       {
+               public IntPtr client_data;
+               public XIMProc callback;
+               [NonSerialized]
+               GCHandle gch;
+
+               public XIMCallback (IntPtr clientData, XIMProc proc)
+               {
+                       this.client_data = clientData;
+                       this.gch = GCHandle.Alloc (proc);
+                       this.callback = proc;
+               }
+
+               ~XIMCallback ()
+               {
+                       gch.Free ();
+               }
+       }
+       
+       public enum XIMFeedback
+       {
+               Reverse = 1,
+               Underline = 2,
+               Highlight = 4,
+               Primary = 32,
+               Secondary = 64,
+               Tertiary = 128,
+       }
+
+       public struct XIMFeedbackStruct
+       {
+               public byte FeedbackMask; // one or more of XIMFeedback enum
+       }
+       
+       public struct XIMText
+       {
+               public ushort Length;
+               public IntPtr Feedback; // to XIMFeedbackStruct
+               public bool EncodingIsWChar;
+               public IntPtr String; // it could be either char* or wchar_t*
+       }
+
+       public struct XIMPreeditDrawCallbackStruct
+       {
+               public int Caret;
+               public int ChangeFirst;
+               public int ChangeLength;
+               public IntPtr Text; // to XIMText
+       }
+
+       public enum XIMCaretDirection
+       {
+               XIMForwardChar,
+               XIMBackwardChar,
+               XIMForwardWord,
+               XIMBackwardWord,
+               XIMCaretUp,
+               XIMCaretDown,
+               XIMNextLine,
+               XIMPreviousLine,
+               XIMLineStart,
+               XIMLineEnd,
+               XIMAbsolutePosition,
+               XIMDontChange
+       }
+
+       public enum XIMCaretStyle
+       {
+               IsInvisible,
+               IsPrimary,
+               IsSecondary
+       }
+
+       public struct XIMPreeditCaretCallbackStruct
+       {
+               public int Position;
+               public XIMCaretDirection Direction;
+               public XIMCaretStyle Style;
+       }
+
+       // only PreeditStartCallback requires return value though.
+       public delegate int XIMProc (IntPtr xim, IntPtr clientData, IntPtr callData);
+
+       public static class XNames
+       {
+               public const string XNVaNestedList = "XNVaNestedList";
+               public const string XNQueryInputStyle = "queryInputStyle";
+               public const string XNClientWindow = "clientWindow";
+               public const string XNInputStyle = "inputStyle";
+               public const string XNFocusWindow = "focusWindow";
+
+               // XIMPreeditCallbacks delegate names.
+               public const string XNPreeditStartCallback = "preeditStartCallback";
+               public const string XNPreeditDoneCallback = "preeditDoneCallback";
+               public const string XNPreeditDrawCallback = "preeditDrawCallback";
+               public const string XNPreeditCaretCallback = "preeditCaretCallback";
+               public const string XNPreeditStateNotifyCallback = "preeditStateNotifyCallback";
+               public const string XNPreeditAttributes = "preeditAttributes";
+               // XIMStatusCallbacks delegate names.
+               public const string XNStatusStartCallback = "statusStartCallback";
+               public const string XNStatusDoneCallback = "statusDoneCallback";
+               public const string XNStatusDrawCallback = "statusDrawCallback";
+               public const string XNStatusAttributes = "statusAttributes";
+
+               public const string XNArea = "area";
+               public const string XNAreaNeeded = "areaNeeded";
+               public const string XNSpotLocation = "spotLocation";
+               public const string XNFontSet = "fontSet";
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
+       public struct XineramaScreenInfo
+       {
+               public int screen_number;
+               public short x_org;
+               public short y_org;
+               public short width;
+               public short height;
+       }
+}