]> O.S.I.I.S - jp/crow.git/commitdiff
basic styling ok, need handler and expression now.
authorjpbruyere <jp.bruyere@hotmail.com>
Sat, 30 Jul 2016 13:32:52 +0000 (15:32 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Sat, 30 Jul 2016 13:32:52 +0000 (15:32 +0200)
45 files changed:
Styles/Label.style
Templates/Button.crow
Templates/ComboBox.goml
Templates/GroupBox.goml
Templates/ListBox.goml
Templates/ScrollingListBox.goml
Templates/Spinner.goml
Templates/TreeView.crow
Templates/Window.goml
Templates/imgItemTemplate.goml
Tests/BasicTests.cs
Tests/Interfaces/Container/0.crow
Tests/Interfaces/Container/1.crow
Tests/Interfaces/Container/2.crow
Tests/Interfaces/Divers/5.crow
Tests/Interfaces/Divers/fps.crow
Tests/Interfaces/Divers/testGrid.crow
Tests/Interfaces/Divers/testStacks.crow
Tests/Interfaces/Divers/testWindow.goml
Tests/Interfaces/Divers/testWindow2.goml
Tests/Interfaces/Divers/testWindow3.goml
Tests/Interfaces/Divers/test_Listbox.crow
Tests/Interfaces/GraphicObject/0.crow
Tests/Interfaces/GraphicObject/1.crow
Tests/Interfaces/GraphicObject/2.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/Nouveau dossier/testColorList.crow
Tests/Interfaces/Nouveau dossier/testDirViewer.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/basicTests/0.crow
src/Colors.cs
src/GraphicObjects/GraphicObject.cs
src/GraphicObjects/Label.cs
src/GraphicObjects/TextRun.cs

index 8a165c2aa18e73f50d113c9d36a4fab1a3fc06ad..1f000247094561dfc40d226123bfdc0f421fb527 100644 (file)
@@ -1 +1,2 @@
 Fit = true;
+Margin = 2;
index a9e45dc36cad773513eb4721ae006dd46fc1a1ad..8919f7dccf9106424c5c145963d2099e13583178 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border Background="{../Background}" MinimumSize="50;20" Height="{../HeightPolicy}" Width="{../WidthPolicy}"
+<Border Background="{../Background}" MinimumSize="50,20" Height="{../HeightPolicy}" Width="{../WidthPolicy}"
                Foreground="Transparent" CornerRadius="{../CornerRadius}" BorderWidth="1" 
        MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black;caption.Foreground=White}"
        MouseLeave="{Foreground=Transparent;caption.Foreground=LightGray}"
index 9a5addaf430dccfd8651687453be8a55bab27ed9..9688721a794a29021b1f3bc8217f59443833f50d 100755 (executable)
@@ -1,10 +1,10 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Popper Name="popper" PopDirection="Bottom" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
        <Template>
                <Border CornerRadius="0" Foreground="LightGray" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
                        <HorizontalStack Margin="0
                                                " Spacing="1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}">
-                               <TextBox MinimumSize="80;10" Margin="1" Foreground="Black" Background="White"
+                               <TextBox MinimumSize="80,10" Margin="1" Foreground="Black" Background="White"
                                        Text="{../../../../SelectedItem}"
                                        Height="{../../../../HeightPolicy}" Width="{../../../../WidthPolicy}"/>
                                <Button Width="14" Height="14" Focusable="false"
@@ -17,7 +17,7 @@
        <Border Background="DimGray" BorderWidth="1" Margin="1"
                MinimumSize="{../../MinimumPopupSize}" Fit="true">
                <Scroller Name="scroller1" Margin="2" VerticalScrolling="true"
-                       MaximumSize="0;200"
+                       MaximumSize="0,200"
                        Height="{../HeightPolicy}" Width="{../WidthPolicy}"
                        HorizontalAlignment="Left"
                        ValueChanged="../../../_scroller_ValueChanged">
index b00af82d6cea709cf14c91f35f48129880ede915..d3a16613450e6653efe699e711bf70d7c3053c16 100755 (executable)
@@ -1,8 +1,8 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Group Height="{../HeightPolicy}" Width="{../WidthPolicy}">
        <Border CornerRadius="5" BorderWidth="1" Margin="6" Foreground="{../../Foreground}"
                Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
-               <Container Name="Content" Margin="10" MinimumSize="70;10"
+               <Container Name="Content" Margin="10" MinimumSize="70,10"
                                Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}"/>
        </Border>
        <Label Text="{../../Caption}" VerticalAlignment="Top" Left="15"
index 8a8ec0d77b05154673df7de2be593f4a709141a9..7ea306a9ced0ea3fb0dd55a0c53f4077d02d7f12 100755 (executable)
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
-<Border BorderWidth="1" Margin="1" MinimumSize="10;10" Height="{../HeightPolicy}" Width="{../WidthPolicy}" >
+<?xml version="1.0"?>
+<Border BorderWidth="1" Margin="1" MinimumSize="10,10" Height="{../HeightPolicy}" Width="{../WidthPolicy}" >
        <Scroller  Name="scroller1" Margin="1" VerticalScrolling="true"
                Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"
                ValueChanged="../../_scroller_ValueChanged">
index 7976e3d73b0afe2e6b8ca7b5e40a6999c93a0a96..5d9a572d59db31cf8a9122448d475617911b4b03 100644 (file)
@@ -1,10 +1,10 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Border BorderWidth="1" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
        <HorizontalStack Margin="1" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}" >
                <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" 
                                Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
                                ValueChanged="../../../_scroller_ValueChanged">
-                       <VerticalStack Width="{../../../../WidthPolicy}" Height="-1" MinimumSize="10;10"
+                       <VerticalStack Width="{../../../../WidthPolicy}" Height="-1" MinimumSize="10,10"
                                Name="List" Margin="0" VerticalAlignment="Top"
                                LayoutChanged="../../../../_list_LayoutChanged"/>
                </Scroller>
index 039861750994d6d0a1412771ac4f2d1df201e30c..0669b22880374e456573eaecf3ad42651d3e709e 100755 (executable)
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
-<HorizontalStack MinimumSize="40;10" Name="hstack" Margin="0" Spacing="0" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
+<?xml version="1.0"?>
+<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
        <Border BorderWidth="1" Height="{../../HeightPolicy}" Width="80%"  Background="White" 
                Foreground="DimGray" Margin="0">
                <Label Foreground="DimGray" Height="{../../../HeightPolicy}" Width="Stretched"
index 165cea1c91f20ae33b2811b65c5fff329d7e122e..32e3db2189ee9be062fdfb9b5a4b6d8483eaa6fe 100644 (file)
@@ -1,4 +1,4 @@
-<Border Background="DimGray" BorderWidth="1" Margin="1" MinimumSize="100;100"
+<Border Background="DimGray" BorderWidth="1" Margin="1" MinimumSize="100,100"
                Width="{../WidthPolicy}" Height="{../HeightPolicy}">
        <VerticalStack
                        Height="0" Width="0" Name="List" Margin="0" VerticalAlignment="Top"/>
index 01f88a22efae2d5eacc05fdf80c8188c13e8c52f..42bc29766bbf683d9975164560158e0ca63cf634 100755 (executable)
@@ -18,6 +18,6 @@
                                <GraphicObject Width="5"/>
                        </HorizontalStack>
                </Border>
-               <Container Name="Content" MinimumSize="50;50" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
+               <Container Name="Content" MinimumSize="50,50" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
        </VerticalStack>
 </Border>
\ No newline at end of file
index 792d27586421c514ad446128837b8933ce276ea5..c08f390e30cf37fbe34e0150c7d653c16e59dbab 100755 (executable)
@@ -2,7 +2,7 @@
        <VerticalStack Width="0" Height="-1" Focusable="true"                   
                        MouseEnter="{Background=BlueCrayola}"
                        MouseLeave="{Background=Transparent}">
-               <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80;80"/>
+               <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/>
                <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/>
        </VerticalStack>
 
index 0cc2c555d2d72dc44d841e00e5e3d3dff2a38a76..b081b00c61990e8cdbc267618130a3af5646c27e 100644 (file)
@@ -78,8 +78,8 @@ namespace Tests
 
                        KeyboardKeyDown += GOLIBTests_KeyboardKeyDown1;
 
-
-                       testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
+                       testFiles = new string [] { @"Interfaces/Divers/5.crow" };
+                       //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
                        //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/basicTests", "*.crow")).ToArray ();
index eec3a76f159b0b53914f2ffc68acc7e4cd6adf3b..a69e6f6937a281157a4f0954033487602c70b5b7 100755 (executable)
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Container Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
-                       MinimumSize="50;50"/>
+                       MinimumSize="50,50"/>
 </Container>
\ No newline at end of file
index 081c87151de7c0aed4ecf9de2f66960dc288b56f..c75ad4f7672b04eb2bca2516bdceff471a80c4be 100755 (executable)
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Container Background="Lust" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="50%" Height="50%" Background="Maize"
-                       MinimumSize="50;50"/>
+                       MinimumSize="50,50"/>
 </Container>
\ No newline at end of file
index 839a0fee6949550b428414f858dc4f70a47803c5..a8425272a196440c9b1c913179b833a1c5ba5f41 100755 (executable)
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Container Background="Teal" Margin="10" Fit="true">
        <GraphicObject Margin="10" Width="50%" Height="50%" Background="Malachite"
-                       MinimumSize="50;50"/>
+                       MinimumSize="50,50"/>
 </Container>
\ No newline at end of file
index 305639d65d98ecb01fe14a6cc09d881aa117747f..34ee42c39602a671edd83229a2a8420787998a65 100755 (executable)
@@ -2,9 +2,9 @@
 <HorizontalStack Fit="true" Margin="5">
        <VerticalStack Fit="true" Margin="2" Spacing="2">
                <TextRun Text="text run test"/>
-               <Label Text="label test"/>
+<!--           <Label Text="label test"/>
                <TextBox Text="text box test"/>
-               <Button Caption="test button"/>
+               <Button Caption="test button"/>-->
 <!--           <CheckBox Caption="test checkbox"/>
                <RadioButton Caption="test radiobutton"/>
                <ComboBox/>
index b696230263e65b5d87e84140066b1357d76dcb90..6747bbd2c5a393d9fdf36781794c703b4c2a0b9d 100755 (executable)
@@ -5,20 +5,20 @@
                        <VerticalStack Fit="true" Name="vsFps"  Spacing="10" >
                                <HorizontalStack Fit="true">
                                        <Label Text="Update:" Width="50" TextAlignment="Right"/>
-                                       <Label Name="labUpdate" Text="{update}" Font="droid,12" Background="AoEnglish" Width="50" TextAlignment="Center"/>
+                                       <Label Margin="5" Name="labUpdate" Text="{update}" Font="droid,12" Background="AoEnglish" Width="50" TextAlignment="Center"/>
                                </HorizontalStack>
                                <HorizontalStack Fit="true">
                                        <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
-                                       <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
+                                       <Label Margin="5" Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
                                </HorizontalStack>
                                <HorizontalStack Fit="true">
                                        <Label Text="Min:" Width="50" TextAlignment="Right"/>
-                                       <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
+                                       <Label Margin="5" Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
                                </HorizontalStack>
                                <HorizontalStack Fit="true">
                                        <Label Text="Max:" Width="50" TextAlignment="Right"/>
-                                       <Label Text="{fpsMax}" Font="droid , 12" Background="AoEnglish" Width="50" TextAlignment="Center"/>
+                                       <Label Margin="5" Text="{fpsMax}" Font="droid , 12" Background="AoEnglish" Width="50" TextAlignment="Center"/>
                                </HorizontalStack>
-                       </VerticalStack>                                
+                       </VerticalStack>
        </Container>
 </Border>
\ No newline at end of file
index 327d7716b857ce687c6708a2bb2053f6c1bb7641..0342f9a20262a153d62ab42d873ae28554d3edc5 100755 (executable)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <Grid RowCount="2" ColumnCount="2">
-       <GraphicObject Background="0.0,0.0,0.0;1,0"/>
-       <GraphicObject Background="0.0,0.0,0.5;1,0"/>
-       <GraphicObject Background="0.0,0.5,0.0;1,0"/>
-       <GraphicObject Background="0.5,0.0,0.0;1,0"/>
+       <GraphicObject Background="0.0,0.0,0.0,1.0"/>
+       <GraphicObject Background="0.0,0.0,0.5,1.0"/>
+       <GraphicObject Background="0.0,0.5,0.0,1.0"/>
+       <GraphicObject Background="0.5,0.0,0.0,1.0"/>
 </Grid>
\ No newline at end of file
index 44c7c7f95ae96e84a3109757f07317717287439d..ac2cccc6355a7ab46c28fc56b00c18e0852145bf 100755 (executable)
@@ -1,5 +1,5 @@
-<?xml version="1.0"?>
-<Window Width="500" Height="300" MinimumSize="50;50">
+<?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">
index 154577fbb4538199598f31a4ca8440c392d69439..9e184dff0d720e13f9b972faa0792e75647767ac 100755 (executable)
@@ -16,7 +16,7 @@
                        <GraphicObject Width="Stretched"/>
                        <RadioButton Width="80" Height="Fit" Caption="Radio 3" />
                </HorizontalStack>
-               <HorizontalStack Width="Stretched" Height="Stretched" MinimumSize="10;10" Margin="10" CornerRadius="5"
+               <HorizontalStack Width="Stretched" Height="Stretched" MinimumSize="10,10" Margin="10" CornerRadius="5"
                                Background="vgradient|0:White|0.1:SteelBlue|0.9:SteelBlue|1:Transparent">
                        <CheckBox Height="Fit" Width="80"/>
                        <GraphicObject Width="Stretched"/>
index e67061c608fe00760b712946ef925d0f19687fdf..6fb61db0bf9acac97deeb28f6798b40b434cc849 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <Window Name="window1" Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0.5,0.5,0.5,0.8" 
-       Focusable="True"  CornerRadius="20" MinimumSize="100;100" MaximumSize="500;500">
+       Focusable="True"  CornerRadius="20" MinimumSize="100,100" MaximumSize="500,500">
        <Template>
                <Border BorderWidth="1" Foreground="White" CornerRadius="20" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
                        <VerticalStack Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
index 54b573d87b62a4b64e0a53cfb3053dca633ad2f8..42459bd58b61958c6298014f5a405cc1c7cd96f5 100755 (executable)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <Window Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0.5,0.5,0.5,0.8" 
-       Focusable="True"  CornerRadius="20" MinimumSize="100;100" MaximumSize="500;500">
+       Focusable="True"  CornerRadius="20" MinimumSize="100,100" MaximumSize="500,500">
        <Template>
                <Container Margin="20" Name="Content" Height="{../HeightPolicy}" Width="{../WidthPolicy}" Background="0.5,0.5,0.5,0.5"/>
        </Template>
index 61b673aa581cbd934f3f17706119eff39bd16d0d..321ea58c143f4ac7bd1b44d847d400b91081b412 100755 (executable)
@@ -15,7 +15,7 @@
                                                <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" 
                                                                Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
                                                                ValueChanged="../../../_scroller_ValueChanged">
-                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="100;100"
+                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="100,100"
                                                                Name="List" Margin="0" VerticalAlignment="Top"
                                                                LayoutChanged="../../../../_list_LayoutChanged"/>
                                                </Scroller>
index 6185bd71bfe46c7da1642a3c45f0398db79b3945..6a01cb630cb160f68a04b580c39c2289a489bd94 100755 (executable)
@@ -1,3 +1,3 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
-               MinimumSize="50;50"/>
\ No newline at end of file
+               MinimumSize="50,50"/>
\ No newline at end of file
index 262fc24ee0c34bebfa104b307d3661c471f5d822..14ca7961c14b3fc1493c773c8f3e3eadfaed6770 100755 (executable)
@@ -1,3 +1,3 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <GraphicObject Margin="10" Width="150" Height="150" Background="Mantis"
-               MinimumSize="50;50"/>
\ No newline at end of file
+               MinimumSize="50,50"/>
\ No newline at end of file
index dfd10ab70ebbca10c8e4d0b173eb4c12ab90767a..74075b288f02501889badabe614f7db5e57a34df 100755 (executable)
@@ -1,3 +1,3 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <GraphicObject Margin="10" Width="50%" Height="50%" Background="Mantis"
-               MinimumSize="50;50"/>
\ No newline at end of file
+               MinimumSize="50,50"/>
\ No newline at end of file
index c3cf308f7db28f1844023e09f6b2267b4f846740..7eb5a0a6c38673392b20b66ddde5f439b44fce1c 100755 (executable)
@@ -1,11 +1,11 @@
-<?xml version="1.0"?>
-<Group MinimumSize="50;50" Background="Onyx" Margin="10" Width="90%" Height="90%">
+<?xml version="1.0"?>
+<Group MinimumSize="50,50" Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
                        VerticalAlignment="Top"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"                   
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
                        VerticalAlignment="Bottom"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </Group>
\ No newline at end of file
index 6950a8d85817850f5f6d0c6cb904defc7175c9ad..6f07c3f3e6cf46359f3ea87cffe6e82ae1a9fed6 100755 (executable)
@@ -1,33 +1,33 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Group Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </Group>
\ No newline at end of file
index 693e1b059c6e88cc9fbba939c40ff1b449d22f5c..a7cc91ab7fba37043f1a98f4057d855cde625240 100755 (executable)
@@ -1,33 +1,33 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Group Background="Onyx" Margin="10" Fit="true">
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </Group>
\ No newline at end of file
index 321e219d1086cfe0db9823afce8dc6303b7a39ee..7c0385511e18aa20aa30040a8c20ef257f2225df 100755 (executable)
@@ -1,33 +1,33 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Group Background="Onyx" Margin="10" Width="70%" Height="50%">
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="100%" Height="20%" Background="Mantis"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Left"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </Group>
\ No newline at end of file
index 25e03bd8144afbc991f7553bce634ae6e16355b5..02c01b293933ea743315eefe568b4842337ab244 100755 (executable)
@@ -1,7 +1,7 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Group Background="Onyx" Margin="10" Fit="true">
        <Label Font="droid bold,40" Text="{fps}" Margin="10"  Fit="true"/>
        <GraphicObject Margin="10" Width="20%" Height="20%" Background="Mantis"
                        VerticalAlignment="Top"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </Group>
\ No newline at end of file
index 8a5c592f2568f33e2de6a75471bf3aa49289625a..d9b674104ff96e3adca7c44e3edd75011484e93f 100755 (executable)
@@ -10,7 +10,7 @@
                                                <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" 
                                                                Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"
                                                                ValueChanged="../../../_scroller_ValueChanged">
-                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="10;10"
+                                                       <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="10,10"
                                                                Name="List" Margin="0"
                                                                VerticalAlignment="Top"
                                                                HorizontalAlignment="Left"
index c63e548306a2849914323fdc52a448638442a3d8..dd6f9b8a021a44d340bee6eaa29903574b6c0cdc 100755 (executable)
@@ -9,7 +9,7 @@
                        SelectedItemChanged="OnSelectedItemChanged" 
                        ItemTemplate="Interfaces/tmpDirItem.goml" >
                        <Template>
-                               <Border BorderWidth="1" MinimumSize="20;20" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
+                               <Border BorderWidth="1" MinimumSize="20,20" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
                                        <HorizontalStack Margin="1" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">
                                                <Scroller  Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" 
                                                 Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
index a178d8cc8ba296d43f64e3faf9b50a0d2eb8939c..63290f9e6b2327d5c09eaa2f45233c8d245a9a31 100755 (executable)
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
-<VerticalStack MinimumSize="50;50" Background="Onyx" Margin="10" Width="90%" Height="90%">
+<?xml version="1.0"?>
+<VerticalStack MinimumSize="50,50" Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </VerticalStack>
\ No newline at end of file
index 9e31f04ac4d6efcc78f3d7fb5293273a9af4f199..170bbed442a2750548b50c6a40c774c9a4d0fbe7 100755 (executable)
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
-<HorizontalStack MinimumSize="50;50" Background="Onyx" Margin="10" Width="90%" Height="90%">
+<?xml version="1.0"?>
+<HorizontalStack MinimumSize="50,50" Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </HorizontalStack>
\ No newline at end of file
index f8b287793b63fbfefa9d4bb4d15af31604f7b617..a0ac28c90f503bebcd86e7298cdeec2a963fe51e 100755 (executable)
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <VerticalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </VerticalStack>
\ No newline at end of file
index b86b77acb383d5cdc7b8a28a5d8932bffb248108..7d97bd2c5b664109bd22b7179daa1b4c2e088608 100755 (executable)
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="60%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="20%" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </HorizontalStack>
\ No newline at end of file
index ebf1d1e97816b660bf0f13f16b4aad4ed288916f..6d8c9ad686a48671db1944fd02960f74b3ddf172 100755 (executable)
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <VerticalStack Background="Onyx" Margin="10" Width="90%" Height="100%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </VerticalStack>
\ No newline at end of file
index dc05fc0ca5e588e72d18edb44b123074329d5911..de1c36fe3a2ba1ba543118cb4cc4923702bbdada 100755 (executable)
@@ -1,9 +1,9 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="100%">
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
        <GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="10;10"/>
+                       MinimumSize="10,10"/>
 </HorizontalStack>
\ No newline at end of file
index a5ec06ad7c34ec0f45a1337f376768bc285f8572..e46a5fff6ba1c8f18d4a8ab0d413b582bc2762be 100755 (executable)
@@ -1,45 +1,45 @@
 <?xml version="1.0"?>
 <VerticalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
 </VerticalStack>
\ No newline at end of file
index a675876e6c44bb0e5cfa3ebdbcbdd802e5ebaee0..3a1d77dc34e74810a0c4874be55114806a1577ab 100755 (executable)
@@ -1,45 +1,45 @@
 <?xml version="1.0"?>
 <HorizontalStack Background="Onyx" Margin="10" Width="90%" Height="90%">
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
        <GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="Mantis"
-                       MinimumSize="2;2"/>
+                       MinimumSize="2,2"/>
 </HorizontalStack>
\ No newline at end of file
index 486399b859431a38d7b3e2e2f3db8b9b1461475e..b5c153ef89a39839b04d6b3ada4460a0b4a03a7e 100755 (executable)
@@ -1,6 +1,6 @@
-<?xml version="1.0"?>
+<?xml version="1.0"?>
 <Label Margin="50" Width="50%" Height="50%" TextAlignment="BottomRight" Background="Mantis"/>
 <!--<Container Background="Green" Margin="10" Width="Fit" Height="Fit">
        <GraphicObject Margin="10" Width="{../WidthPolicy}" Height="{../HeightPolicy}" Background="Red"
-               MinimumSize="50;50"/>
+               MinimumSize="50,50"/>
 </Container>-->
\ No newline at end of file
index 751fb25201691b6c3136eaf19e15d2e6a6033cc3..e928f37722e8cfb7ed93e3aa2a43ea0f85b528a3 100644 (file)
@@ -53,7 +53,7 @@ namespace Crow
                        if (string.IsNullOrEmpty(s))
                                return White;
 
-                       string[] c = s.Split(new char[] { ';' });
+                       string[] c = s.Split(new char[] { ',' });
 
                        if (c.Length == 1)
                        {
index 3eaa91f10965714e41aa6b60b2625400f340e7b5..26a7a59dab9564d1cf6293c713ca6ad7639350f8 100644 (file)
@@ -485,6 +485,17 @@ namespace Crow
                }
                #endregion
 
+
+               /// <summary>
+               /// Add 'Styles' to full class name between assembly name and the rest of the full name space
+               /// </summary>
+               string getDefaultStyleResId (Type t) {
+                       string [] tmp = t.FullName.Split ('.');
+                       string res = tmp [0] + ".Styles";
+                       for (int i = 1; i < tmp.Length; i++)                    
+                               res += "." + tmp [i];
+                       return res;
+               }
                /// <summary> Loads the default values from XML attributes default </summary>
                protected virtual void loadDefaultValues()
                {
@@ -500,8 +511,21 @@ namespace Crow
 
                        Dictionary<string, string> styling = null;
 
-                       if (Interface.CurrentInterface.Styling.ContainsKey (thisType.Name))
-                               styling = Interface.CurrentInterface.Styling[thisType.Name];
+                       //Search for a style mathing :
+                       //1: Full class name, with full namespace
+                       //2: class name
+                       //3: style may have been registered with their ressource ID minus .style extention
+                       //   those files being placed in a Styles folder
+
+                       if (Interface.CurrentInterface.Styling.ContainsKey (thisType.FullName))
+                               styling = Interface.CurrentInterface.Styling [thisType.FullName];
+                       else if (Interface.CurrentInterface.Styling.ContainsKey (thisType.Name))
+                               styling = Interface.CurrentInterface.Styling [thisType.Name];
+                       else {
+                               string styleFullName = getDefaultStyleResId (thisType);
+                               if (Interface.CurrentInterface.Styling.ContainsKey (styleFullName)) 
+                                       styling = Interface.CurrentInterface.Styling [styleFullName];
+                       }
                                                                             
                        //Reflexion being very slow compared to dyn method or delegates,
                        //I compile the initial values coded in the CustomAttribs of the class,
@@ -546,7 +570,7 @@ namespace Crow
                                                memberHasStyle = true;
                                } 
                                if (memberHasStyle){
-                                       
+                                       defaultValue = styling [name];
                                }else {
                                        if (name == "Style") {
                                                //retrieve default value from class attribute
@@ -635,10 +659,12 @@ namespace Crow
                                        //surely a class or struct
                                        if (dvType != typeof(string))
                                                throw new Exception ("Expecting String in default values for: " + pi.Name);
-                                       if (pi.PropertyType == typeof(string))
+                                       if (pi.PropertyType == typeof (string))
                                                il.Emit (OpCodes.Ldstr, Convert.ToString (defaultValue));
                                        else {
-                                               MethodInfo miParse = pi.PropertyType.GetMethod ("Parse", BindingFlags.Static | BindingFlags.Public);
+                                               MethodInfo miParse = pi.PropertyType.GetMethod 
+                                                                      ("Parse", BindingFlags.Static | BindingFlags.Public,
+                                                                       Type.DefaultBinder, new Type [] {typeof (string)},null);
                                                if (miParse == null)
                                                        throw new Exception ("no Parse method found for: " + pi.PropertyType.FullName);
 
index e1bf02a7d7828e86ca7e3384618e6b00b9b89ad5..9af86266175213e27728aeb6aefe669819ddee60 100644 (file)
@@ -383,11 +383,8 @@ namespace Crow
                                        foreach (string s in lines) {
                                                string l = s.Replace("\t", new String (' ', Interface.TabSize));
 
-#if _WIN32 || _WIN64
-                                               TextExtents tmp = gr.TextExtents(str.ToUtf8());
-#elif __linux__
                                                TextExtents tmp = gr.TextExtents (l);
-#endif
+
                                                if (tmp.XAdvance > te.XAdvance)
                                                        te = tmp;
                                        }
@@ -582,11 +579,8 @@ namespace Crow
                                Foreground.SetAsSource (gr);    
                                gr.MoveTo (lineRect.X, rText.Y + fe.Ascent + fe.Height * i);
 
-                               #if _WIN32 || _WIN64
-                               gr.ShowText(l.ToUtf8());
-                               #elif __linux__
                                gr.ShowText (l);
-                               #endif
+
                                gr.Fill ();
                        }
                }
@@ -675,12 +669,8 @@ namespace Crow
                                if (c == "\t")
                                        c = new string (' ', Interface.TabSize);
                                
-                               #if _WIN32 || _WIN64
-                               byte[] c = System.Text.UTF8Encoding.UTF8.GetBytes(Text.Substring(i, 1));
                                te = gr.TextExtents(c);
-                               #elif __linux__
-                               te = gr.TextExtents(c);
-                               #endif
+
                                double halfWidth = te.XAdvance / 2;
 
                                if (mouseLocalPos.X <= cPos + halfWidth)
index c644767c84d34373ef4715e7074965ecfd27da12..cc882f4071644c2f0448ef1d8c24fad5b13923a1 100644 (file)
@@ -10,30 +10,30 @@ using System.ComponentModel;
 
 namespace Crow
 {
-    public class TextRun : GraphicObject
-    {
+       public class TextRun : GraphicObject
+       {
                #region CTOR
-               public TextRun()
-               { 
+               public TextRun ()
+               {
 
                }
-               public TextRun(string _text)
-                       : base()
+               public TextRun (string _text)
+                       : base ()
                {
                        Text = _text;
                }
                #endregion
 
-        //TODO:change protected to private
-        
+               //TODO:change protected to private
+
                #region private and protected fields
                protected string _text = "label";
-        Alignment _textAlignment = Alignment.Left;
+               Alignment _textAlignment = Alignment.Left;
                bool horizontalStretch = false;
                bool verticalStretch = false;
                bool _multiline;
                bool wordWrap;
-        protected Rectangle rText;
+               protected Rectangle rText;
                protected float widthRatio = 1f;
                protected float heightRatio = 1f;
                protected FontExtents fe;
@@ -41,69 +41,70 @@ namespace Crow
                #endregion
 
 
-        [XmlAttributeAttribute()][DefaultValue(Alignment.Left)]
-               public Alignment TextAlignment
-        {
-            get { return _textAlignment; }
-            set { _textAlignment = value; }
-        }
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [XmlAttributeAttribute ()]
+               [DefaultValue (Alignment.Left)]
+               public Alignment TextAlignment {
+                       get { return _textAlignment; }
+                       set { _textAlignment = value; }
+               }
+               [XmlAttributeAttribute ()]
+               [DefaultValue (false)]
                public virtual bool HorizontalStretch {
                        get { return horizontalStretch; }
                        set {
                                if (horizontalStretch == value)
                                        return;
-                               horizontalStretch = value; 
+                               horizontalStretch = value;
                                RegisterForGraphicUpdate ();
                                NotifyValueChanged ("HorizontalStretch", horizontalStretch);
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [XmlAttributeAttribute ()]
+               [DefaultValue (false)]
                public virtual bool VerticalStretch {
                        get { return verticalStretch; }
                        set {
                                if (verticalStretch == value)
                                        return;
-                               verticalStretch = value; 
+                               verticalStretch = value;
                                NotifyValueChanged ("VerticalStretch", verticalStretch);
 
                        }
-               } 
-               [XmlAttributeAttribute()][DefaultValue("label")]
-        public string Text
-        {
-            get {                              
-                               return lines == null ? 
-                                       _text : lines.Aggregate((i, j) => i + Interface.LineBreak + j);
+               }
+               [XmlAttributeAttribute ()]
+               [DefaultValue ("label")]
+               public string Text {
+                       get {
+                               return lines == null ?
+                                       _text : lines.Aggregate ((i, j) => i + Interface.LineBreak + j);
                        }
-            set
-            {
-                if (_text == value)
-                    return;
-                                                       
-                RegisterForGraphicUpdate();
+                       set {
+                               if (_text == value)
+                                       return;
+
+                               RegisterForGraphicUpdate ();
                                this.RegisterForLayouting (LayoutingType.Sizing);
 
 
-                _text = value;
+                               _text = value;
 
-                               if (string.IsNullOrEmpty(_text))
+                               if (string.IsNullOrEmpty (_text))
                                        _text = "";
 
                                lines = getLines;
-            }
-        }
-               [XmlAttributeAttribute()][DefaultValue(false)]
-               public bool Multiline
-               {
+                       }
+               }
+               [XmlAttributeAttribute ()]
+               [DefaultValue (false)]
+               public bool Multiline {
                        get { return _multiline; }
-                       set
-                       {
+                       set {
                                _multiline = value;
-                               RegisterForGraphicUpdate();
+                               RegisterForGraphicUpdate ();
                        }
                }
-               [XmlAttributeAttribute()][DefaultValue(false)]
+               [XmlAttributeAttribute ()]
+               [DefaultValue (false)]
                public bool WordWrap {
                        get {
                                return wordWrap;
@@ -112,22 +113,22 @@ namespace Crow
                                if (wordWrap == value)
                                        return;
                                wordWrap = value;
-                               RegisterForGraphicUpdate();
+                               RegisterForGraphicUpdate ();
                        }
                }
 
                List<string> lines;
                List<string> getLines {
-                       get {                           
+                       get {
                                return _multiline ?
-                                       Regex.Split (_text, "\r\n|\r|\n").ToList() :
-                                       new List<string>(new string[] { _text });
+                                       Regex.Split (_text, "\r\n|\r|\n").ToList () :
+                                       new List<string> (new string [] { _text });
                        }
                }
 
                #region GraphicObject overrides
-               protected override int measureRawSize(LayoutingType lt)
-               {                       
+               protected override int measureRawSize (LayoutingType lt)
+               {
                        if (lines == null)
                                lines = getLines;
 
@@ -140,25 +141,22 @@ namespace Crow
 
 
                                        fe = gr.FontExtents;
-                                       te = new TextExtents();
+                                       te = new TextExtents ();
 
-                                       if (lt == LayoutingType.Height){
+                                       if (lt == LayoutingType.Height) {
                                                int lc = lines.Count;
                                                //ensure minimal height = text line height
                                                if (lc == 0)
-                                                       lc = 1; 
+                                                       lc = 1;
 
                                                return (int)(fe.Height * lc) + Margin * 2;
                                        }
 
                                        foreach (string s in lines) {
-                                               string l = s.Replace("\t", new String (' ', Interface.TabSize));
+                                               string l = s.Replace ("\t", new String (' ', Interface.TabSize));
 
-                                               #if _WIN32 || _WIN64
-                                               TextExtents tmp = gr.TextExtents(str.ToUtf8());
-                                               #elif __linux__
                                                TextExtents tmp = gr.TextExtents (l);
-                                               #endif
+
                                                if (tmp.XAdvance > te.XAdvance)
                                                        te = tmp;
                                        }
@@ -176,8 +174,8 @@ namespace Crow
 
                        gr.Antialias = Antialias.Subpixel;
 
-                       rText = new Rectangle(new Size(
-                               measureRawSize(LayoutingType.Width), measureRawSize(LayoutingType.Height)));
+                       rText = new Rectangle (new Size (
+                               measureRawSize (LayoutingType.Width), measureRawSize (LayoutingType.Height)));
                        rText.Width -= 2 * Margin;
                        rText.Height -= 2 * Margin;
 
@@ -188,16 +186,16 @@ namespace Crow
 
                        //ignore text alignment if size to content = true
                        //or if text size is larger than client bounds
-                       if (Width < 0 || Height < 0 || rText.Width > cb.Width)
-                       {
+                       if (Width < 0 || Height < 0 || rText.Width > cb.Width) {
                                rText.X = cb.X;
                                rText.Y = cb.Y;
-                       }else {
+                       } else {
                                if (horizontalStretch) {
                                        widthRatio = (float)cb.Width / rText.Width;
                                        if (!verticalStretch)
                                                heightRatio = widthRatio;
-                               }if (verticalStretch) {
+                               }
+                               if (verticalStretch) {
                                        heightRatio = (float)cb.Height / rText.Height;
                                        if (!horizontalStretch)
                                                widthRatio = heightRatio;
@@ -206,8 +204,7 @@ namespace Crow
                                rText.Width = (int)(widthRatio * cb.Width);
                                rText.Height = (int)(heightRatio * cb.Height);
 
-                               switch (TextAlignment)
-                               {
+                               switch (TextAlignment) {
                                case Alignment.TopLeft:     //ok
                                        rText.X = cb.X;
                                        rText.Y = cb.Y;
@@ -247,11 +244,11 @@ namespace Crow
                                }
                        }
 
-                       gr.FontMatrix = new Matrix(widthRatio * Font.Size, 0, 0, heightRatio * Font.Size, 0, 0);
+                       gr.FontMatrix = new Matrix (widthRatio * Font.Size, 0, 0, heightRatio * Font.Size, 0, 0);
 
 
                        int curLineCount = 0;
-                       for (int i = 0;i < lines.Count;i++) {                           
+                       for (int i = 0; i < lines.Count; i++) {
                                string l = lines [i].Replace ("\t", new String (' ', Interface.TabSize));
                                List<string> wl = new List<string> ();
                                int lineLength = (int)gr.TextExtents (l).XAdvance;
@@ -275,28 +272,28 @@ namespace Crow
 
                                foreach (string ll in wl) {
                                        lineLength = (int)gr.TextExtents (ll).XAdvance;
-                                                                       
+
 
                                        if (string.IsNullOrWhiteSpace (ll)) {
                                                curLineCount++;
                                                continue;
                                        }
 
-                                       Foreground.SetAsSource (gr);    
+                                       Foreground.SetAsSource (gr);
                                        gr.MoveTo (rText.X, rText.Y + fe.Ascent + fe.Height * curLineCount);
 
-                                       #if _WIN32 || _WIN64
+#if _WIN32 || _WIN64
                                        gr.ShowText(ll.ToUtf8());
-                                       #elif __linux__
+#elif __linux__
                                        gr.ShowText (ll);
-                                       #endif
+#endif
                                        gr.Fill ();
 
                                        curLineCount++;
-                                               
+
                                }
-                       }                                               
+                       }
                }
                #endregion
-    }
+       }
 }