diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-01-29 13:30:29 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-01-29 13:30:29 +0100 |
| commit | 0bf825fce6f1946034dbea6b1f7eb8d0dacdab8a (patch) | |
| tree | 57eb7d724b1269401fa50dbc5efd3c824baa86fa | |
| parent | d33bdad20192033b0da77c2c1a0f151108767041 (diff) | |
debug renaming, debug template loading not skipping template tag in templatedContainer
| -rw-r--r-- | Templates/FileDialog.goml | 8 | ||||
| -rwxr-xr-x | Templates/Scrollbar.goml | 4 | ||||
| -rwxr-xr-x | Templates/Spinner.goml | 4 | ||||
| -rwxr-xr-x | Templates/Window.goml | 2 | ||||
| -rw-r--r-- | Tests/GOLIBTests.cs | 8 | ||||
| -rwxr-xr-x | Tests/Interfaces/test4.goml | 2 | ||||
| -rwxr-xr-x | Tests/Interfaces/testExpandable.goml | 10 | ||||
| -rwxr-xr-x | Tests/Interfaces/testPopper.goml | 2 | ||||
| -rwxr-xr-x | Tests/Interfaces/testWindow.goml | 2 | ||||
| -rwxr-xr-x | Tests/Interfaces/testWindow.goml.sav | 26 | ||||
| -rwxr-xr-x | Tests/Interfaces/testWindow2.goml | 2 | ||||
| -rwxr-xr-x | Tests/Interfaces/testWindow3.goml | 10 | ||||
| -rwxr-xr-x | Tests/Interfaces/tmpMembers.goml | 2 | ||||
| -rw-r--r-- | Tests/Tests.csproj | 2 | ||||
| -rw-r--r-- | src/GraphicObjects/GenericStack.cs | 10 | ||||
| -rw-r--r-- | src/GraphicObjects/TemplatedContainer.cs | 8 | ||||
| -rw-r--r-- | src/GraphicObjects/Window.cs | 4 | ||||
| -rw-r--r-- | src/LayoutingQueueItem.cs | 4 |
18 files changed, 76 insertions, 34 deletions
diff --git a/Templates/FileDialog.goml b/Templates/FileDialog.goml index c7ca3af3..ab30d26c 100644 --- a/Templates/FileDialog.goml +++ b/Templates/FileDialog.goml @@ -6,14 +6,14 @@ <ListBox Data="{Directories}" Width="-1" Height="0" Background="0,5;0,5;0,5;0,5" SelectedItemChanged="OnSelectedItemChanged" - Template="#go.Templates.ScrollingListBox.goml" - ItemTemplate="#go.Templates.tmpDirItem.goml" > + Template="#Crow.Templates.ScrollingListBox.goml" + ItemTemplate="#Crow.Templates.tmpDirItem.goml" > </ListBox> <ListBox Data="{Files}" Width="0" Height="0" Background="0,5;0,5;0,5;0,5" SelectedItemChanged="onFileListItemChanged" - Template="#go.Templates.ScrollingListBox.goml" - ItemTemplate="#go.Templates.imgItemTemplate.goml"> + Template="#Crow.Templates.ScrollingListBox.goml" + ItemTemplate="#Crow.Templates.imgItemTemplate.goml"> </ListBox> </HorizontalStack> <HorizontalStack Fit="true" HorizontalAlignment="Right"> diff --git a/Templates/Scrollbar.goml b/Templates/Scrollbar.goml index f8d7c5ba..b14c90da 100755 --- a/Templates/Scrollbar.goml +++ b/Templates/Scrollbar.goml @@ -2,13 +2,13 @@ <Border BorderWidth="1" BorderColor="LightGray" Width="{../TemplatedWidth}" Height="{../TemplatedHeight}">
<GenericStack Orientation="{../../Orientation}" Width="{../../TemplatedWidth}" Height="{../../TemplatedHeight}">
<Button Width="12" Height="12" MouseClick="../../../onScrollBack">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>
+ <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>
</Button>
<Slider Name="Slider" Value="{../../../Scroll}" Maximum="{../../../MaximumScroll}"
Width="{../../../TemplatedWidth}" Height="{../../../TemplatedHeight}" Orientation="{../../../Orientation}"
ValueChanged="../../../onSliderValueChange"/>
<Button Width="12" Height="12" MouseClick="../../../onScrollForth">
- <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>
+ <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
</Button>
</GenericStack>
</Border>
\ No newline at end of file diff --git a/Templates/Spinner.goml b/Templates/Spinner.goml index ddfa4991..cbdde9e4 100755 --- a/Templates/Spinner.goml +++ b/Templates/Spinner.goml @@ -5,10 +5,10 @@ Text="{../../../Value}" Margin="1" TextAlignment="RightCenter"/> <VerticalStack Width="-1" Height="{../../../TemplatedHeight}" Spacing="1" > <Button Width="12" Height="8" MouseClick="../../../../onUp"> - <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/> + <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/> </Button> <Button Width="12" Height="8" MouseClick="../../../../onDown"> - <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/> + <Image Margin="1" Path="#Crow .Images.Icons.updown.svg" SvgSub="down"/> </Button> </VerticalStack> </HorizontalStack> diff --git a/Templates/Window.goml b/Templates/Window.goml index 97bad4ce..af04c9af 100755 --- a/Templates/Window.goml +++ b/Templates/Window.goml @@ -9,7 +9,7 @@ <Label Foreground="White" Width="{../../../../../TemplatedWidth}" Margin="1" TextAlignment="Center" Text="{../../../../../Title}" />
<Border CornerRadius="6" BorderWidth="1" BorderColor="Transparent" Height="12" Width="12"
MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">
- <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"
+ <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#Crow.Images.Icons.exit2.svg"
MouseClick="../../../../../../butQuitPress"/>
</Border>
<GraphicObject Width="5"/>
diff --git a/Tests/GOLIBTests.cs b/Tests/GOLIBTests.cs index 6598517f..1e6c79be 100644 --- a/Tests/GOLIBTests.cs +++ b/Tests/GOLIBTests.cs @@ -36,16 +36,17 @@ namespace test int frameCpt = 0;
int idx = 0;
string[] testFiles = {
+ "testWindow2.goml",
// "testCombobox.goml",
"testWindow3.goml",
+ "testWindow.goml",
+ "testGroupBox.goml",
"testExpandable.goml",
- "testPopper.goml",
"testCheckbox.goml",
+ "testPopper.goml",
"fps.goml",
"testLabel.goml",
"testAll.goml",
- "testWindow.goml",
- "testWindow2.goml",
// "testSpinner.goml",
"test4.goml",
"testRadioButton2.goml",
@@ -53,7 +54,6 @@ namespace test "testBorder.goml",
"testRadioButton.goml",
"testSpinner.goml",
- "testGroupBox.goml",
"testMsgBox.goml",
"testGrid.goml",
"testMeter.goml",
diff --git a/Tests/Interfaces/test4.goml b/Tests/Interfaces/test4.goml index 6bd2e14c..bdb6656c 100755 --- a/Tests/Interfaces/test4.goml +++ b/Tests/Interfaces/test4.goml @@ -50,7 +50,7 @@ </Button>
<Popper Width="100">
<Border Margin="10" Fit="True" Background="ArmyGreen">
- <Image Fit="true" Path="#go.Images.Icons.tetra.png"/>
+ <Image Fit="true" Path="#Crow.Images.Icons.tetra.png"/>
</Border>
</Popper>
<Expandable Name="expander" Width="150" Height="-1">
diff --git a/Tests/Interfaces/testExpandable.goml b/Tests/Interfaces/testExpandable.goml index 35cf3d64..a4c5013f 100755 --- a/Tests/Interfaces/testExpandable.goml +++ b/Tests/Interfaces/testExpandable.goml @@ -1,13 +1,13 @@ <?xml version="1.0"?>
-<Expandable Title="Test expandable" Width="-1" Background="DimGray">
+<Expandable Title="Test expandable" Background="DimGray">
<VerticalStack Width="-1" Height="-1">
- <Checkbox Name="chk1"/>
+ <Checkbox Name="chk1" Background="Red"/>
<Checkbox Name="chk2" IsChecked="true"/>
<Checkbox Name="chk3"/>
<Checkbox Name="chk4"/>
- <HorizontalStack Fit="true" Margin="20">
- <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="RightCenter"/>
- <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>
+ <HorizontalStack Fit="true" Margin="2" Background="Blue">
+ <Label Name="captionFps" Text="Fps:" Width="30" TextAlignment="RightCenter"/>
+ <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="-1" TextAlignment="Center" Background="AoEnglish"/>
</HorizontalStack>
</VerticalStack>
</Expandable>
diff --git a/Tests/Interfaces/testPopper.goml b/Tests/Interfaces/testPopper.goml index 3686599a..b5c9b606 100755 --- a/Tests/Interfaces/testPopper.goml +++ b/Tests/Interfaces/testPopper.goml @@ -3,7 +3,7 @@ <Border Fit="True" Background="ArmyGreen">
<!-- <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>-->
<VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
- <Checkbox Name="chk1"/>
+ <Checkbox Name="chk1" Background="Red"/>
<Checkbox Name="chk2" IsChecked="true"/>
<Checkbox Name="chk3"/>
<Checkbox Name="chk4"/>
diff --git a/Tests/Interfaces/testWindow.goml b/Tests/Interfaces/testWindow.goml index c48f08e2..b2dd8a1a 100755 --- a/Tests/Interfaces/testWindow.goml +++ b/Tests/Interfaces/testWindow.goml @@ -1,5 +1,5 @@ <?xml version="1.0"?>
-<Window Name="window1" Left="10" Top="10" Title="Test window"
+<Window Left="10" Top="10" Title="Test window"
Width="250" Height="300" >
<VerticalStack Name="contentVSStack" Margin="10" Spacing="10">
<Slider Name="slider" Height="10" Width="0"/>
diff --git a/Tests/Interfaces/testWindow.goml.sav b/Tests/Interfaces/testWindow.goml.sav new file mode 100755 index 00000000..740cfc53 --- /dev/null +++ b/Tests/Interfaces/testWindow.goml.sav @@ -0,0 +1,26 @@ +<?xml version="1.0"?>
+<!--<Group>-->
+<Window Name="window1" Left="10" Top="10" Title="Test window"
+ Width="250" Height="300" >
+ <VerticalStack Name="contentVSStack" Margin="10" Spacing="10">
+ <Slider Name="slider" Height="10" Width="0"/>
+
+ <HorizontalStack Width="0" Height="-1" Margin="10" Background="BlueCrayola">
+ <Checkbox Height="-1" Width="80"/>
+ <GraphicObject Width="0"/>
+ <Checkbox Height="-1" Width="80"/>
+ </HorizontalStack>
+ <Groupbox Text="test" Height="-1" Width="-1" Margin="5">
+ <VerticalStack Height="-1" Width="0" >
+ <RadioButton Caption="Radio 1" Background="Red" />
+ <RadioButton Caption="Radio 2" IsChecked="true" />
+ <RadioButton Caption="Radio 3" />
+ </VerticalStack>
+ </Groupbox>
+<!-- <Checkbox Height="-1" Width="-1" Background="Red" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Right"/>-->
+ </VerticalStack>
+</Window>
+<!--</Group>-->
+<!-- <Label Text="{fps}" Background="DarkRed"/>
+ <Label Text="{fpsMin}" />
+ <Label Text="{fpsMax}" />-->
\ No newline at end of file diff --git a/Tests/Interfaces/testWindow2.goml b/Tests/Interfaces/testWindow2.goml index 999c68e4..235f0806 100755 --- a/Tests/Interfaces/testWindow2.goml +++ b/Tests/Interfaces/testWindow2.goml @@ -12,7 +12,7 @@ <Label Foreground="White" Width="{../../../../../TemplatedWidth}" Margin="1" TextAlignment="Center" Text="{../../../../../Title}" />
<Border CornerRadius="6" BorderWidth="1" BorderColor="Transparent" Height="12" Width="12"
MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">
- <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"
+ <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#Crow.Images.Icons.exit2.svg"
MouseClick="../../../../../../butQuitPress"/>
</Border>
<GraphicObject Width="5"/>
diff --git a/Tests/Interfaces/testWindow3.goml b/Tests/Interfaces/testWindow3.goml index 0c846b15..fc6c1dc9 100755 --- a/Tests/Interfaces/testWindow3.goml +++ b/Tests/Interfaces/testWindow3.goml @@ -1,11 +1,11 @@ <?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"
+<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">
<Template>
<Container Margin="20" Name="Content" Height="{../TemplatedHeight}" Width="{../TemplatedWidth}" Background="0,5;0,5;0,5;0,5"/>
</Template>
- <Group Background="Green">
-<!-- <GraphicObject Height="50" Width="50" Background="Red" Margin="5"/>-->
- <Scrollbar Orientation="Vertical" Height="0" Width="10" Background="Blue" Margin="0" HorizontalAlignment="Right"/>
- </Group>
+<!-- <Group Background="Green">-->
+ <GraphicObject Height="50" Width="50" Background="Red" Margin="5"/>
+<!-- <Scrollbar Orientation="Vertical" Height="0" Width="10" Background="Blue" Margin="0" HorizontalAlignment="Right"/>-->
+<!-- </Group>-->
</Window>
diff --git a/Tests/Interfaces/tmpMembers.goml b/Tests/Interfaces/tmpMembers.goml index 4c823e72..fae4fdf0 100755 --- a/Tests/Interfaces/tmpMembers.goml +++ b/Tests/Interfaces/tmpMembers.goml @@ -2,7 +2,7 @@ <HorizontalStack Width="0" Height="-1" Focusable="true"
MouseEnter="{Background=Red}"
MouseLeave="{Background=Transparent}">
- <Image Width="8" Height="8" Path="#go.Images.Icons.member.svg" SvgSub="{GetIcon}"/>
+ <Image Width="8" Height="8" Path="#Crow.Images.Icons.member.svg" SvgSub="{GetIcon}"/>
<Label Text="{Name}" Width="0" Height="-1" Margin="2"/>
<Label Text="{MemberType}" Width="-1" Height="-1" Margin="0"/>
</HorizontalStack>
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 90d1a498..1e63ae8e 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -8,7 +8,7 @@ <OutputType>Exe</OutputType> <RootNamespace>Tests</RootNamespace> <AssemblyName>Tests</AssemblyName> - <StartupObject>test.GOLIBTest_Listbox</StartupObject> + <StartupObject>test.GOLIBTests</StartupObject> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <OutputPath>..\bin\$(configuration)</OutputPath> <IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath> diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index ae98971c..968c76ac 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -10,6 +10,12 @@ namespace Crow {
public class GenericStack : Group
{
+ internal class Page
+ {
+ public byte[] bmp;
+ public int Size;
+ }
+
#region CTOR
public GenericStack()
: base()
@@ -87,13 +93,13 @@ namespace Crow foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) {
c.Slot.X = d;
d += c.Slot.Width + Spacing;
- //c.RegisterForLayouting ((int)LayoutingType.Y);
+ c.RegisterForLayouting ((int)LayoutingType.Y);
}
} else {
foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) {
c.Slot.Y = d;
d += c.Slot.Height + Spacing;
- //c.RegisterForLayouting ((int)LayoutingType.X);
+ c.RegisterForLayouting ((int)LayoutingType.X);
}
}
}
diff --git a/src/GraphicObjects/TemplatedContainer.cs b/src/GraphicObjects/TemplatedContainer.cs index 0bb11fc7..3003d486 100644 --- a/src/GraphicObjects/TemplatedContainer.cs +++ b/src/GraphicObjects/TemplatedContainer.cs @@ -76,8 +76,12 @@ namespace Crow if (!xr.IsStartElement ()) continue; - if (xr.Name == "Template") - continue; + + if (xr.Name == "Template"){ + xr.Skip (); + if (!xr.IsStartElement ()) + continue; + } Type t = Type.GetType ("Crow." + xr.Name); GraphicObject go = (GraphicObject)Activator.CreateInstance (t); diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs index 8e2724c4..50176d6f 100644 --- a/src/GraphicObjects/Window.cs +++ b/src/GraphicObjects/Window.cs @@ -29,7 +29,9 @@ namespace Crow Direction currentDirection = Direction.None; #region CTOR - public Window () : base() {} + public Window () : base() { + + } #endregion #region GraphicObject overrides diff --git a/src/LayoutingQueueItem.cs b/src/LayoutingQueueItem.cs index c2d84c54..95234112 100644 --- a/src/LayoutingQueueItem.cs +++ b/src/LayoutingQueueItem.cs @@ -52,6 +52,10 @@ namespace Crow Debug.WriteLine ("Layouting => " + this.ToString ()); #endif try { + if (GraphicObject.Parent == null){ + Debug.WriteLine("ERROR: processLayouting, no parent for: " + GraphicObject.ToString()); + return; + } GraphicObject.UpdateLayout (LayoutType); } catch (Exception ex) { Debug.WriteLine ("Layouting error: " + ex.ToString ()); |