Fit = true;
+Margin = 2;
<?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}"
-<?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"
<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">
-<?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"
-<?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">
-<?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>
-<?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"
-<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"/>
<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
<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>
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 ();
-<?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
-<?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
-<?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
<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/>
<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
<?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
-<?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">
<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"/>
<?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}">
<?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>
<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>
-<?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
-<?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
-<?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
-<?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
-<?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
-<?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
-<?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
-<?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
<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"
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}">
-<?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
-<?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
-<?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
-<?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
-<?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
-<?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
<?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
<?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
-<?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
if (string.IsNullOrEmpty(s))
return White;
- string[] c = s.Split(new char[] { ';' });
+ string[] c = s.Split(new char[] { ',' });
if (c.Length == 1)
{
}
#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()
{
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,
memberHasStyle = true;
}
if (memberHasStyle){
-
+ defaultValue = styling [name];
}else {
if (name == "Style") {
//retrieve default value from class attribute
//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);
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;
}
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 ();
}
}
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)
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;
#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;
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;
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;
}
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;
//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;
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;
}
}
- 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;
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
- }
+ }
}