<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Description>Crow project description</Description>
<BaseAddress>4194304</BaseAddress>
+ <ReleaseVersion>0.4</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Compile Include="src\GraphicObjects\IBindable.cs" />
<Compile Include="src\Input\KeyPressEventArgs.cs" />
<Compile Include="src\Configuration.cs" />
+ <Compile Include="src\Measure.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="cairo-sharp">
<HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\cairo-sharp.dll</HintPath>
+ <Package>gtk-sharp-3.0</Package>
</Reference>
<Reference Include="gdk-sharp">
<HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\gdk-sharp.dll</HintPath>
+ <Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gio-sharp">
<HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\gio-sharp.dll</HintPath>
+ <Package>gio-sharp-3.0</Package>
</Reference>
<Reference Include="glib-sharp">
<HintPath>..\..\packages\gtk-sharp.Linux.3.14.3.14.7\lib\net40\glib-sharp.dll</HintPath>
+ <Package>glib-sharp-3.0</Package>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<EmbeddedResource Include="Styles\MessageBox.style" />
<EmbeddedResource Include="Styles\Window.style" />
<EmbeddedResource Include="Styles\TextBox.style" />
+ <EmbeddedResource Include="Styles\TextRun.style" />
</ItemGroup>
<ItemGroup>
<None Include="README.md" />
Focusable = true
-Height=-1
+Height=Fit
Focusable = true
-Height = -1
+Height = Fit
Focusable = true
-Height = -1
+Height = Fit
Width=200
-Height=-1
+Height=Fit
Title=MessageBox
Focusable=true
MinimumSize=150;80
Focusable = true
-Height = -1
+Height = Fit
Focusable = true
-Height = -1
+Height = Fit
Focusable = true
-Height = -1
+Height = Fit
--- /dev/null
+Fit = true
+Margin = 2
Name="TabTitle"
HorizontalAlignment="Left"
Height="{../../../TabThickness}"
- Width="-1">
+ Width="Fit">
<Label Text="{../../../Caption}"/>
<Border CornerRadius="5" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
<Border BorderWidth="1" Foreground="LightGray" Height="{../HeightPolicy}" Width="{../WidthPolicy}" \r
MouseClick="../onMouseClick">\r
<VerticalStack Height="{../../HeightPolicy}" Width="{../../WidthPolicy}">\r
- <HorizontalStack Spacing="1" Height="-1" Width="{../../../WidthPolicy}">\r
+ <HorizontalStack Spacing="1" Height="Fit" Width="{../../../WidthPolicy}">
<Image Margin="2" Width="12" Height="12" Path="{../../../../Image}" SvgSub="{../../../../SvgSub}"/>\r
<Label Text="{../../../../Caption}" Width="{../../../../WidthPolicy}"/>\r
</HorizontalStack>\r
<!-- <VerticalStack\r
Height="{../HeightPolicy}" Width="{../WidthPolicy}"\r
MouseClick="../onMouseClick">\r
- <HorizontalStack Spacing="1" Height="-1" Width="{../../WidthPolicy}">\r
+ <HorizontalStack Spacing="1" Height="Fit" Width="{../../WidthPolicy}">
<Image Margin="2" Width="12" Height="12" Path="{../../../Image}" SvgSub="{../../../SvgSub}"/>\r
<Label Text="{../../../Caption}" Width="{../../../WidthPolicy}"/>\r
</HorizontalStack>\r
<ListBox Name="Content" Visible="false"\r
- Height="-1" Width="{../../WidthPolicy}"/>\r
+ Height="Fit" Width="{../../WidthPolicy}"/>
</VerticalStack>-->\r
\r
int frameCpt = 0;
int idx = 0;
+
string[] testFiles = {
+ @"basicTests/5.crow",
"testColorList.crow",
+ @"basicTests/0.crow",
+ @"basicTests/4.crow",
+ @"basicTests/1.crow",
+ @"basicTests/2.crow",
+ "test0.goml",
+ "test1.goml",
+ "0.crow",
"testCombobox.goml",
"0.crow",
"testCheckbox.goml",
<?xml version="1.0"?>
-<VerticalStack Height="-1" Width="-1">
- <Label Width="0"/>
- <Expandable Width="-1" Background="Gray">
- <Expandable Background="LightBlue">
- <Expandable Background="Green">
- <Expandable Background="LimeGreen">
- <Expandable Background="DimGray">
- <Expandable Width="0" Background="Yellow">
- <Expandable Background="NavyBlue">
- <Expandable Width="0" Background="Blue">
- <Expandable Width="0" Background="BlueCrayola">
- <Expandable Width="0" Background="Green">
- <Label Background="Red"/>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- <Expandable Width="0" Background="Gray">
- <Expandable Width="0" Background="LightBlue">
- <Expandable Width="0" Background="Green">
- <Expandable Width="0" Background="LimeGreen">
- <Expandable Width="0" Background="DimGray">
- <Expandable Width="0" Background="Yellow">
- <Expandable Width="0" Background="NavyBlue">
- <Expandable Width="0" Background="Blue">
- <Expandable Width="0" Background="BlueCrayola">
- <Expandable Width="0" Background="Green">
- <Label Background="Red"/>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
- </Expandable>
-</VerticalStack>
+<Container Background="Green" Margin="10">
+ <GraphicObject Margin="10" Width="{../WidthPolicy}" Height="{../HeightPolicy}" Background="Red"/>
+</Container>
\ No newline at end of file
<ScrollBar Orientation="Horizontal" Maximum="100" Value="50" Height="16" Width="150"/>
<Spinner Value="100"/>-->
</VerticalStack>
-<!-- <VerticalStack Width="150" Height="-1" Margin="2" Spacing="2">
+<!-- <VerticalStack Width="150" Height="Fit" Margin="2" Spacing="2">
<TextRun Text="text run test" Width="0"/>
<Label Text="label test" Width="0"/>
<TextBox Text="text box test" Width="0"/>
<GroupBox Caption="Group box" Width="0">
<Label Text="border test" Margin="3"/>
</GroupBox>
- <Container Height="-1" Width="0" Background="DimGray" Margin="3">
+ <Container Height="Fit" Width="0" Background="DimGray" Margin="3">
<GraphicObject Width="20" Height="20" Background="LightGray"/>
</Container>
<ProgressBar Height="10" Width="0" Background="DimGray" Value="50" />
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack Height="Fit" Width="Fit">
+ <Label Width="0"/>
+ <Expandable Width="Fit" Background="Gray">
+ <Expandable Background="LightBlue">
+ <Expandable Background="Green">
+ <Expandable Background="LimeGreen">
+ <Expandable Background="DimGray">
+ <Expandable Width="0" Background="Yellow">
+ <Expandable Background="NavyBlue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="BlueCrayola">
+ <Expandable Width="0" Background="Green">
+ <Label Background="Red"/>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ <Expandable Width="0" Background="Gray">
+ <Expandable Width="0" Background="LightBlue">
+ <Expandable Width="0" Background="Green">
+ <Expandable Width="0" Background="LimeGreen">
+ <Expandable Width="0" Background="DimGray">
+ <Expandable Width="0" Background="Yellow">
+ <Expandable Width="0" Background="NavyBlue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="BlueCrayola">
+ <Expandable Width="0" Background="Green">
+ <Label Background="Red"/>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+</VerticalStack>
--- /dev/null
+<?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"/>
+</Container>-->
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Container Background="Green" Margin="0">
+ <GraphicObject Margin="0" Width="50" Height="50" Background="Red"/>
+</Container>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<Container Background="Green" Margin="0">
+ <GraphicObject Margin="0" Width="90" Height="90%" Background="Red"/>
+</Container>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Fit="true">
+ <VerticalStack Fit="true" Name="vsFps" Spacing="10" >
+ <ProgressBar CornerRadius="5" Background="DimGray" Margin="1" Maximum="1000" Value="{fps}" Width="200" Height="15"/>
+ <HorizontalStack Fit="true">
+ <Label Text="Memory:" Width="50" TextAlignment="Right"/>
+ <Label Text="{memory}" Font="droid,12" TextAlignment="Center"
+ Background="vgradient|0:BlueCrayola|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+ <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" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+ <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" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+ <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" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Update:" Width="50" TextAlignment="Right"/>
+ <Label Name="labUpdate" Text="{update}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Layouting:" Width="50" TextAlignment="Right"/>
+ <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Drawing:" Width="50" TextAlignment="Right"/>
+ <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Min:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ <HorizontalStack Fit="true">
+ <Label Text="Max:" Width="50" TextAlignment="Right"/>
+ <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center"
+ Background="vgradient|0:AoEnglish|1:Black"/>
+ </HorizontalStack>
+ </VerticalStack>
+</HorizontalStack>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<HorizontalStack Width="Stretched" Height="Stretched" Margin="5" Background="Mantis">
+ <GraphicObject Background="Carmine" Width="40%" Height="20%"/>
+ <GraphicObject Background="Carmine" Width="Stretched" Height="20%"/>
+ <GraphicObject Background="Carmine" Width="40%" Height="20%"/>
+</HorizontalStack>
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack Fit="true" Background="DimGray" Margin="5">
+<!-- <RadioButton/>-->
+ <Label Text="a" Width="0" Background="Red"/>
+ <Label Text="{fps}" HorizontalAlignment="Right" Background="LimeGreen"/>
+</VerticalStack>
--- /dev/null
+<?xml version="1.0"?>
+<VerticalStack Height="Fit" Width="Fit">
+ <Label Width="0"/>
+ <Expandable Width="Fit" Background="Gray">
+ <Expandable Background="LightBlue">
+ <Expandable Background="Green">
+ <Expandable Background="LimeGreen">
+ <Expandable Background="DimGray">
+ <Expandable Width="0" Background="Yellow">
+ <Expandable Background="NavyBlue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="BlueCrayola">
+ <Expandable Width="0" Background="Green">
+ <Label Background="Red"/>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ <Expandable Width="0" Background="Gray">
+ <Expandable Width="0" Background="LightBlue">
+ <Expandable Width="0" Background="Green">
+ <Expandable Width="0" Background="LimeGreen">
+ <Expandable Width="0" Background="DimGray">
+ <Expandable Width="0" Background="Yellow">
+ <Expandable Width="0" Background="NavyBlue">
+ <Expandable Width="0" Background="Blue">
+ <Expandable Width="0" Background="BlueCrayola">
+ <Expandable Width="0" Background="Green">
+ <Label Background="Red"/>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+ </Expandable>
+</VerticalStack>
<?xml version="1.0"?>
<HorizontalStack
HorizontalAlignment="Left"
- Height="-1" Width="0" Margin="1" Focusable="true"
+ Height="Fit" Width="Stretched" Margin="1" Focusable="true"
MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}"
MouseLeave="{Background=Transparent}">
<GraphicObject Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/>
- <Label Text="{Name}" Margin="0" Width="0"/>
+ <Label Text="{Name}" Margin="0" Width="Stretched"/>
</HorizontalStack>
<?xml version="1.0"?>
<Container Name="TopContainer" Width="400" Height="350"
Margin="20" Focusable="True" Background="Yellow">
- <Container Name="MiddleContainer" Width="0" Height="0"
+ <Container Name="MiddleContainer" Width="50%" Height="Stretched"
Margin="20" Focusable="True" Background="Green">
<Image VerticalAlignment="Bottom"
Name="PhaseOverlay" Width="100" Height="100" Path="image/u.svg" Background="Red"/>
<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="Fit" MinimumSize="10;10"
Name="List" Margin="0"
VerticalAlignment="Top"
HorizontalAlignment="Left"
<Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="100" Path="#Tests.image.crow0.svg" />
<Image Background="vgradient|0:SkyBlue|1:White" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
<Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
- <Image Background="vgradient|0:SkyBlue|1:White" Width="50" Height="-1" Path="#Tests.image.crow0.svg" />
- <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="-1" Path="#Tests.image.crow0.svg" />
+ <Image Background="vgradient|0:SkyBlue|1:White" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
+ <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
</HorizontalStack>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="SCALED NOT PROPORTIONNAL" Width="150"/>
<Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="100" Path="#Tests.image.crow0.svg" />
<Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
<Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
- <Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="-1" Path="#Tests.image.crow0.svg" />
- <Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="-1" Path="#Tests.image.crow0.svg" />
+ <Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
+ <Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
</HorizontalStack>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="UNSCALED" Width="150"/>
<Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="100" Path="#Tests.image.crow0.svg" />
<Image Scaled="false" Background="Blue" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
<Image Scaled="false" Margin="10" Background="Blue" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
- <Image Scaled="false" Background="Blue" Width="50" Height="-1" Path="#Tests.image.crow0.svg" />
- <Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="-1" Path="#Tests.image.crow0.svg" />
+ <Image Scaled="false" Background="Blue" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
+ <Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
</HorizontalStack>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="SCALED PROPORTIONNAL" Width="150"/>
<Image Margin="10" Background="Blue" Width="50" Height="100" Path="#Crow.Images.Icons.tetra.png"/>
<Image Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
<Image Margin="10" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Background="Blue" Width="50" Height="-1" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Margin="10" Background="Blue" Width="50" Height="-1" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image Margin="10" Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
</HorizontalStack>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="SCALED NOT PROPORTIONNAL" Width="150"/>
<Image KeepProportions="false" Margin="10" Background="Blue" Width="50" Height="100" Path="#Crow.Images.Icons.tetra.png"/>
<Image KeepProportions="false" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
<Image KeepProportions="false" Margin="10" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
- <Image KeepProportions="false" Background="Blue" Width="50" Height="-1" Path="#Crow.Images.Icons.tetra.png"/>
- <Image KeepProportions="false" Margin="10" Background="Blue" Width="50" Height="-1" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image KeepProportions="false" Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image KeepProportions="false" Margin="10" Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
</HorizontalStack>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="UNSCALED" Width="150"/>
<Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="100" Path="#Crow.Images.Icons.tetra.png"/>
<Image Scaled="false" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
<Image Scaled="false" Margin="10" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Scaled="false" Background="Blue" Width="50" Height="-1" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="-1" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image Scaled="false" Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image Scaled="false" Margin="10" Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
</HorizontalStack>
- <HorizontalStack Width="-1" Height="100" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
+ <HorizontalStack Width="Fit" Height="100" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Image Background="Blue" Path="#Tests.image.crow0.svg" />
<Image Margin="10" Background="White" Path="#Tests.image.crow0.svg" />
<Image Background="White" Width="20" Height="10" Path="#Tests.image.crow0.svg" />
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</VerticalStack>
- <VerticalStack Width="0" Height="-1" Background="DimGray" Margin="5">
+ <VerticalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="0"/>
<TextRun Background="SkyBlue" Height="0"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="0" Height="-1" Background="DimGray" Margin="5">
+ <HorizontalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="0" Height="-1" Background="DimGray" Margin="5">
+ <HorizontalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="0" Height="-1" Background="DimGray" Margin="5">
+ <HorizontalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="0"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
</VerticalStack>
- <VerticalStack Width="-1" Margin="5" Background="Gray">
- <VerticalStack Width="0" Height="-1" Background="DimGray" Margin="5">
+ <VerticalStack Width="Fit" Margin="5" Background="Gray">
+ <VerticalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
<TextRun Background="SkyBlue" HorizontalAlignment="Left"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</VerticalStack>
- <VerticalStack Width="0" Height="-1" Background="DimGray" Margin="5">
+ <VerticalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="0"/>
<TextRun Background="SkyBlue" Height="0"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="0" Height="-1" Background="DimGray" Margin="5">
+ <HorizontalStack Width="0" Height="Fit" Background="DimGray" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</TabItem>
</TabView>
<Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
- Caption="Add new tab" Width="-1" Height="30" MouseClick="onAddTabButClick"/>
+ Caption="Add new tab" Width="Fit" Height="30" MouseClick="onAddTabButClick"/>
</VerticalStack>
<TabView CacheEnabled="false" Width="200" Height="200" Orientation="Horizontal" Spacing="20" Margin="0">
<TabItem
<None Include="Interfaces\testTextBox.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="Interfaces\0.crow">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
<None Include="Interfaces\test2WayBinding.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="GOLIBTests.cs" />
+ <None Include="Interfaces\7.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\0.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\basicTests\0.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\basicTests\1.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\basicTests\2.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\basicTests\4.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\basicTests\5.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\basicTests\6.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\basicTests\7.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
<Folder Include="image\" />
+ <Folder Include="Interfaces\basicTests\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="image\tetra.png" />
il.MarkLabel (jumpTable [i]);
il.Emit(OpCodes.Ldloc_1);
- //by default, target value type is deducted from source member type to allow
+ //by default, source value type is deducted from target member type to allow
//memberless binding, if targetMember exists, it will be used to determine target
//value type for conversion
- Type targetValueType = b.Target.Property.PropertyType;
+ Type sourceValueType = b.Target.Property.PropertyType;
if (b.Source.Member != null) {
if (b.Source.Member.MemberType == MemberTypes.Property)
- targetValueType = b.Source.Property.PropertyType;
+ sourceValueType = b.Source.Property.PropertyType;
else if (b.Source.Member.MemberType == MemberTypes.Field)
- targetValueType = b.Source.Field.FieldType;
+ sourceValueType = b.Source.Field.FieldType;
else
throw new Exception ("unhandle target member type in binding");
}
if (!tostring.FindMember ("ToString"))
throw new Exception ("ToString method not found");
il.Emit (OpCodes.Callvirt, tostring.Method);
- }else if (!targetValueType.IsValueType)
- il.Emit(OpCodes.Castclass, targetValueType);
- else if (b.Target.Property.PropertyType != targetValueType)
- il.Emit(OpCodes.Callvirt, CompilerServices.GetConvertMethod( b.Target.Property.PropertyType ));
- else
+ } else if (!sourceValueType.IsValueType)
+ il.Emit (OpCodes.Castclass, sourceValueType);
+ else if (b.Target.Property.PropertyType != sourceValueType) {
+ il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (b.Target.Property.PropertyType));
+ }else
il.Emit(OpCodes.Unbox_Any, b.Target.Property.PropertyType);
il.Emit(OpCodes.Callvirt, b.Target.Property.GetSetMethod());
name = "ToSingle";
else if (targetType == typeof (string ) )
return typeof(object).GetMethod("ToString", Type.EmptyTypes);
- else
+ else //try to find implicit convertion
throw new NotImplementedException( string.Format( "Conversion to {0} is not implemented.", targetType.Name ) );
return typeof( Convert ).GetMethod( name, BindingFlags.Static | BindingFlags.Public, null, new Type[] { typeof( object ) }, null );
if (Children [i].RegisteredLayoutings.HasFlag (LayoutingType.Width))
return false;
cptChildren++;
- if (Children [i].Width == 0) {
- if (!(stretchedGO == null && Width >= 0)) {
+ if (Children [i].Width == Measure.Stretched) {
+ if (!(stretchedGO == null && Width != Measure.Fit)) {
//change size policy of other stretched children
- Children [i].Width = -1;
+ Children [i].Width = Measure.Fit;
return false;
}
stretchedGO = Children [i];
}
tmpWidth -= Children [i].Slot.Width + Spacing;
}
- if (stretchedGO != null && Width >= 0) {
+ if (stretchedGO != null && Width != Measure.Fit) {
tmpWidth += (Spacing - 2 * Margin);
if (tmpWidth < MinimumSize.Width)
tmpWidth = MinimumSize.Width;
if (Children [i].RegisteredLayoutings.HasFlag (LayoutingType.Height))
return false;
cptChildren++;
- if (Children [i].Height == 0) {
- if (!(stretchedGO == null && Height >= 0)){
- Children [i].Height = -1;
+ if (Children [i].Height == Measure.Stretched) {
+ if (!(stretchedGO == null && Height != Measure.Fit)){
+ Children [i].Height = Measure.Fit;
return false;
}
stretchedGO = Children [i];
}
tmpHeight -= Children[i].Slot.Height + Spacing;
}
- if (stretchedGO != null && Height >= 0) {
+ if (stretchedGO != null && Height != Measure.Fit) {
tmpHeight += (Spacing - 2 * Margin);
if (tmpHeight < MinimumSize.Height)
tmpHeight = MinimumSize.Height;
switch (arg.LayoutType) {
case LayoutingType.Width:
if (Orientation == Orientation.Horizontal) {
- if (Width < 0)
+ if (Width == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Width);
this.RegisterForLayouting (LayoutingType.ArrangeChildren);
}
break;
case LayoutingType.Height:
if (Orientation == Orientation.Vertical) {
- if (Height < 0)
+ if (Height == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Height);
this.RegisterForLayouting (LayoutingType.ArrangeChildren);
}
/// <summary>
/// Original size and position 0=Stretched; -1=Fit
/// </summary>
- int _width, _height, _left, _top;
+ Measure _width, _height;
+ int _left, _top;
/// <summary>
/// Current size and position computed during layouting pass
/// </summary>
this.RegisterForLayouting (LayoutingType.Y);
}
}
- [XmlAttributeAttribute()][DefaultValue(0)]
- public virtual int Width {
+ [XmlAttributeAttribute()][DefaultValue("Stretched")]
+ public virtual Measure Width {
get { return _width; }
set {
if (_width == value)
this.RegisterForLayouting (LayoutingType.Width);
}
}
- [XmlAttributeAttribute()][DefaultValue(0)]
- public virtual int Height {
+ [XmlAttributeAttribute()][DefaultValue("Stretched")]
+ public virtual Measure Height {
get { return _height; }
set {
if (_height == value)
this.RegisterForLayouting (LayoutingType.Height);
}
}
- [XmlIgnore]public virtual int WidthPolicy { get { return Width < 1 ? Width : 0; } }
- [XmlIgnore]public virtual int HeightPolicy { get { return Height < 1 ? Height : 0; } }
+ [XmlIgnore]public virtual Measure WidthPolicy { get {
+ return Width.Units == Unit.Percent || Width.IsFixed ?
+ Measure.Stretched : Measure.Fit; } }
+ [XmlIgnore]public virtual Measure HeightPolicy { get {
+ return Height.Units == Unit.Percent || Height.IsFixed ?
+ Measure.Stretched : Measure.Fit; } }
[XmlAttributeAttribute()][DefaultValue(false)]
public virtual bool Fit {
- get { return Width < 0 && Height < 0 ? true : false; }
+ get { return Width == Measure.Fit && Height == Measure.Fit ? true : false; }
set {
if (value == Fit)
return;
- Width = Height = -1;
+ Width = Height = Measure.Fit;
}
}
[XmlAttributeAttribute()][DefaultValue(false)]
LastSlots.Y = Slot.Y;
break;
case LayoutingType.Width:
- if (Width > 0)
+ if (Width.IsFixed)
Slot.Width = Width;
- else if (Width < 0) {
+ else if (Width == Measure.Fit) {
Slot.Width = measureRawSize (LayoutingType.Width);
} else if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Width))
return false;
- else
+ else if (Width == Measure.Stretched)
Slot.Width = Parent.ClientRectangle.Width;
+ else
+ Slot.Width = Parent.ClientRectangle.Width * Width / 100;
//size constrain
if (Slot.Width < MinimumSize.Width) {
Slot.Width = MinimumSize.Width;
- NotifyValueChanged ("WidthPolicy", 0);
+ NotifyValueChanged ("WidthPolicy", Measure.Stretched);
} else if (Slot.Width > MaximumSize.Width && MaximumSize.Width > 0) {
Slot.Width = MaximumSize.Width;
- NotifyValueChanged ("WidthPolicy", 0);
+ NotifyValueChanged ("WidthPolicy", Measure.Stretched);
}
if (LastSlots.Width == Slot.Width)
LastSlots.Width = Slot.Width;
break;
case LayoutingType.Height:
- if (Height > 0)
+ if (Height.IsFixed)
Slot.Height = Height;
- else if (Height < 0) {
+ else if (Height == Measure.Fit) {
Slot.Height = measureRawSize (LayoutingType.Height);
} else if (Parent.RegisteredLayoutings.HasFlag (LayoutingType.Height))
return false;
- else
+ else if (Height == Measure.Stretched)
Slot.Height = Parent.ClientRectangle.Height;
+ else
+ Slot.Height = Parent.ClientRectangle.Height * Height.Value / 100;
//size constrain
if (Slot.Height < MinimumSize.Height) {
Slot.Height = MinimumSize.Height;
- NotifyValueChanged ("HeightPolicy", 0);
+ NotifyValueChanged ("HeightPolicy", Measure.Stretched);
} else if (Slot.Height > MaximumSize.Height && MaximumSize.Height > 0) {
Slot.Height = MaximumSize.Height;
- NotifyValueChanged ("HeightPolicy", 0);
+ NotifyValueChanged ("HeightPolicy", Measure.Stretched);
}
if (LastSlots.Height == Slot.Height)
if (largestChild == null){
//if still null, not possible to determine a width
//because all children are stretched, force first one to fit
- Children[0].Width = -1;
+ Children[0].Width = Measure.Fit;
return -1;//cancel actual sizing to let child computation take place
}
return maxChildrenWidth + 2 * Margin;
if (tallestChild == null)
searchTallestChild ();
if (tallestChild == null) {
- Children[0].Height = -1;
+ Children[0].Height = Measure.Fit;
return -1;
}
return maxChildrenHeight + 2 * Margin;
if (g.Slot.Width > maxChildrenWidth) {
maxChildrenWidth = g.Slot.Width;
largestChild = g;
- if (Width < 0)
+ if (Width == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Width);
} else if (g == largestChild) {
largestChild = null;
maxChildrenWidth = 0;
- if (Width < 0)
+ if (Width == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Width);
}
break;
if (g.Slot.Height > maxChildrenHeight) {
maxChildrenHeight = g.Slot.Height;
tallestChild = g;
- if (Height < 0)
+ if (Height == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Height);
} else if (g == tallestChild) {
tallestChild = null;
maxChildrenHeight = 0;
- if (Height < 0)
+ if (Height == Measure.Fit)
this.RegisterForLayouting (LayoutingType.Height);
}
break;
Rectangle cb = ClientRectangle;
//ignore text alignment if size to content = true
- if (Width < 0 || Height < 0)
+ //TODO: split horizontal and vertical logic
+ if (Width == Measure.Fit || Height == Measure.Fit)
{
rText.X = cb.X;
rText.Y = cb.Y;
widthRatio = (float)cb.Width / rText.Width;
if (!verticalStretch)
heightRatio = widthRatio;
- }if (verticalStretch) {
+ }
+
+ if (verticalStretch) {
heightRatio = (float)cb.Height / rText.Height;
if (!horizontalStretch)
widthRatio = heightRatio;
//child has stretched size
switch (layoutType) {
case LayoutingType.Width:
- if (Width < 0 && child.Width == 0)
- child.Width = -1;
+ if (Width == Measure.Fit && child.Width.Units == Unit.Percent)
+ child.Width = Measure.Fit;
break;
case LayoutingType.Height:
- if (Height < 0 && child.Height == 0)
- child.Height = -1;
+ if (Height == Measure.Fit && child.Height.Units == Unit.Percent)
+ child.Height = Measure.Fit;
break;
}
}
namespace Crow
{
[Serializable]
+ [DefaultStyle("#Crow.Styles.TextRun.style")]
public class TextRun : GraphicObject
{
#region CTOR
}
#region GraphicObject overrides
- [XmlAttributeAttribute()][DefaultValue(-1)]
- public override int Width {
- get { return base.Width; }
- set { base.Width = value; }
- }
- [XmlAttributeAttribute()][DefaultValue(-1)]
- public override int Height {
- get { return base.Height; }
- set { base.Height = value; }
- }
- [XmlAttributeAttribute()][DefaultValue(2)]
- public override int Margin {
- get { return base.Margin; }
- set { base.Margin = value; }
- }
-
protected override int measureRawSize(LayoutingType lt)
{
if (lines == null)
--- /dev/null
+//
+// Measure.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2016 jp
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+using System;
+
+namespace Crow
+{
+ public enum Unit { Pixel, Percent }
+ public struct Measure
+ {
+ public int Value;
+ public Unit Units;
+
+ public static Measure Fit = new Measure(-1);
+ //TODO:implement stretching as 100%, not 0%
+ public static Measure Stretched = new Measure(0, Unit.Percent);
+
+ public Measure (int _value, Unit _units = Unit.Pixel)
+ {
+ Value = _value;
+ Units = _units;
+ }
+ public bool IsFixed { get { return Value > 0 && Units == Unit.Pixel; }}
+ #region Operators
+ public static implicit operator int(Measure m){
+ return m.Value;
+ }
+ public static implicit operator Measure(int i){
+ return new Measure(i);
+ }
+ public static implicit operator string(Measure m){
+ return m.ToString();
+ }
+ public static implicit operator Measure(string s){
+ return Measure.Parse(s);
+ }
+
+ public static bool operator ==(Measure m1, Measure m2){
+ return m1.Value == m2.Value && m1.Units == m2.Units;
+ }
+ public static bool operator !=(Measure m1, Measure m2){
+ return !(m1.Value == m2.Value && m1.Units == m2.Units);
+ }
+ #endregion
+ public override int GetHashCode ()
+ {
+ return Value.GetHashCode ();
+ }
+ public override bool Equals (object obj)
+ {
+ return (obj == null || obj.GetType() != typeof(Measure)) ?
+ false :
+ this == (Measure)obj;
+ }
+ public override string ToString ()
+ {
+ return Value == -1 ? "Fit" :
+ Value == 0 ? "Stretched" :
+ Units == Unit.Percent ? Value.ToString () + "%" : Value.ToString ();
+ }
+ public static Measure Parse(string s){
+ if (string.IsNullOrEmpty (s))
+ return Measure.Stretched;
+
+ string st = s.Trim ();
+ int tmp = 0;
+
+ if (string.Equals ("Fit", st, StringComparison.Ordinal))
+ return Measure.Fit;
+ else if (string.Equals ("Stretched", s, StringComparison.Ordinal))
+ return Measure.Stretched;
+ else {
+ if (st.EndsWith ("%", StringComparison.Ordinal)) {
+ if (int.TryParse (s.Substring(0, st.Length - 1), out tmp))
+ return new Measure (tmp, Unit.Percent);
+ }else if (int.TryParse (s, out tmp))
+ return new Measure (tmp);
+ }
+
+ throw new Exception ("Error parsing Measure.");
+ }
+
+ }
+}