]> O.S.I.I.S - jp/crow.git/commitdiff
debug renaming, debug template loading not skipping template tag in templatedContainer
authorjpbruyere <jp.bruyere@hotmail.com>
Fri, 29 Jan 2016 12:30:29 +0000 (13:30 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Fri, 29 Jan 2016 12:30:29 +0000 (13:30 +0100)
18 files changed:
Templates/FileDialog.goml
Templates/Scrollbar.goml
Templates/Spinner.goml
Templates/Window.goml
Tests/GOLIBTests.cs
Tests/Interfaces/test4.goml
Tests/Interfaces/testExpandable.goml
Tests/Interfaces/testPopper.goml
Tests/Interfaces/testWindow.goml
Tests/Interfaces/testWindow.goml.sav [new file with mode: 0755]
Tests/Interfaces/testWindow2.goml
Tests/Interfaces/testWindow3.goml
Tests/Interfaces/tmpMembers.goml
Tests/Tests.csproj
src/GraphicObjects/GenericStack.cs
src/GraphicObjects/TemplatedContainer.cs
src/GraphicObjects/Window.cs
src/LayoutingQueueItem.cs

index c7ca3af3fac21600ccfbbb512af5e459c5ee1886..ab30d26c707044f77e8b90da6b89a60af9f0c6bd 100644 (file)
@@ -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">
index f8d7c5bab8e8bc65e463a2d1ce4dbd1622567882..b14c90dad61ba0a87d179a4d95a84b3ba276a63f 100755 (executable)
@@ -2,13 +2,13 @@
 <Border BorderWidth="1" BorderColor="LightGray" Width="{../TemplatedWidth}" Height="{../TemplatedHeight}">\r
        <GenericStack Orientation="{../../Orientation}" Width="{../../TemplatedWidth}" Height="{../../TemplatedHeight}">\r
                <Button Width="12" Height="12" MouseClick="../../../onScrollBack">\r
-                       <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/>\r
+                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/>\r
                </Button>\r
                <Slider Name="Slider" Value="{../../../Scroll}" Maximum="{../../../MaximumScroll}" \r
                        Width="{../../../TemplatedWidth}" Height="{../../../TemplatedHeight}" Orientation="{../../../Orientation}"\r
                        ValueChanged="../../../onSliderValueChange"/>\r
                <Button Width="12" Height="12" MouseClick="../../../onScrollForth">\r
-                       <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/>\r
+                       <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>\r
                </Button>\r
        </GenericStack>\r
 </Border>
\ No newline at end of file
index ddfa499105991e8d91170e8cafe32f14200054db..cbdde9e4e301f502eb170c8db36372fc9f57be2f 100755 (executable)
@@ -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>
index 97bad4ce635869536dd758b480fe4704139e477e..af04c9af6fad584457776ee02bb4e02320b926b1 100755 (executable)
@@ -9,7 +9,7 @@
                                <Label Foreground="White" Width="{../../../../../TemplatedWidth}" Margin="1" TextAlignment="Center" Text="{../../../../../Title}" />\r
                                <Border CornerRadius="6" BorderWidth="1" BorderColor="Transparent"  Height="12" Width="12"\r
                                        MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">\r
-                                       <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"\r
+                                       <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#Crow.Images.Icons.exit2.svg"\r
                                                 MouseClick="../../../../../../butQuitPress"/>\r
                                </Border>\r
                                <GraphicObject Width="5"/>\r
index 6598517f042057652ccc4c61a8415a60e0d0ca37..1e6c79be2f85c0d104a8b1b26e86607baad242b3 100644 (file)
@@ -36,16 +36,17 @@ namespace test
                int frameCpt = 0;\r
                int idx = 0;\r
                string[] testFiles = {\r
+                       "testWindow2.goml",\r
 //                     "testCombobox.goml",\r
                        "testWindow3.goml",\r
+                       "testWindow.goml",\r
+                       "testGroupBox.goml",\r
                        "testExpandable.goml",\r
-                       "testPopper.goml",\r
                        "testCheckbox.goml",\r
+                       "testPopper.goml",\r
                        "fps.goml",\r
                        "testLabel.goml",\r
                        "testAll.goml",\r
-                       "testWindow.goml",\r
-                       "testWindow2.goml",\r
 //                     "testSpinner.goml",\r
                        "test4.goml",\r
                        "testRadioButton2.goml",\r
@@ -53,7 +54,6 @@ namespace test
                        "testBorder.goml",\r
                        "testRadioButton.goml",\r
                        "testSpinner.goml",\r
-                       "testGroupBox.goml",\r
                        "testMsgBox.goml",\r
                        "testGrid.goml",\r
                        "testMeter.goml",\r
index 6bd2e14c68da7f52ea403b2ceda5835a83d2d996..bdb6656c8a9110f61fc3d1afa5f27a657d3bbd7c 100755 (executable)
@@ -50,7 +50,7 @@
                                </Button>\r
                                <Popper Width="100">\r
                                        <Border Margin="10" Fit="True" Background="ArmyGreen">\r
-                                               <Image Fit="true" Path="#go.Images.Icons.tetra.png"/>\r
+                                               <Image Fit="true" Path="#Crow.Images.Icons.tetra.png"/>\r
                                        </Border>\r
                                </Popper>\r
                                <Expandable Name="expander" Width="150" Height="-1">\r
index 35cf3d64e1d9862f68d2d000e25e3aa6d8993765..a4c5013f7036cb91ff9c0a4473a6fa61c63ebfc2 100755 (executable)
@@ -1,13 +1,13 @@
 <?xml version="1.0"?>\r
-<Expandable Title="Test expandable" Width="-1" Background="DimGray">\r
+<Expandable Title="Test expandable" Background="DimGray">\r
                <VerticalStack Width="-1" Height="-1">\r
-                       <Checkbox Name="chk1"/>\r
+                       <Checkbox Name="chk1" Background="Red"/>\r
                        <Checkbox Name="chk2" IsChecked="true"/>\r
                        <Checkbox Name="chk3"/>\r
                        <Checkbox Name="chk4"/>\r
-                       <HorizontalStack Fit="true" Margin="20">\r
-                               <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="RightCenter"/>\r
-                               <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="AoEnglish"/>\r
+                       <HorizontalStack Fit="true" Margin="2" Background="Blue">\r
+                               <Label Name="captionFps" Text="Fps:" Width="30" TextAlignment="RightCenter"/>\r
+                               <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="-1" TextAlignment="Center" Background="AoEnglish"/>\r
                        </HorizontalStack>\r
                </VerticalStack>\r
 </Expandable>\r
index 3686599a78242d844a923dadb049a57189964e77..b5c9b6067e36c5b2902ea09f414fd3bffcad733b 100755 (executable)
@@ -3,7 +3,7 @@
        <Border Fit="True" Background="ArmyGreen">\r
 <!--           <Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>-->\r
                <VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">\r
-                       <Checkbox Name="chk1"/>\r
+                       <Checkbox Name="chk1" Background="Red"/>\r
                        <Checkbox Name="chk2" IsChecked="true"/>\r
                        <Checkbox Name="chk3"/>\r
                        <Checkbox Name="chk4"/>\r
index c48f08e2227b693584273c5c82cbd70f1b9cbe7d..b2dd8a1a2ba19a6f8c2d9238941509f63b7b108f 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>\r
-<Window Name="window1" Left="10" Top="10" Title="Test window" \r
+<Window Left="10" Top="10" Title="Test window" \r
                Width="250" Height="300" >\r
        <VerticalStack Name="contentVSStack" Margin="10" Spacing="10">\r
                <Slider Name="slider" Height="10" Width="0"/>\r
diff --git a/Tests/Interfaces/testWindow.goml.sav b/Tests/Interfaces/testWindow.goml.sav
new file mode 100755 (executable)
index 0000000..740cfc5
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>\r
+<!--<Group>-->\r
+<Window Name="window1" Left="10" Top="10" Title="Test window" \r
+               Width="250" Height="300" >\r
+       <VerticalStack Name="contentVSStack" Margin="10" Spacing="10">\r
+               <Slider Name="slider" Height="10" Width="0"/>\r
+\r
+               <HorizontalStack Width="0" Height="-1" Margin="10" Background="BlueCrayola">\r
+                       <Checkbox Height="-1" Width="80"/>\r
+                       <GraphicObject Width="0"/>\r
+                       <Checkbox Height="-1" Width="80"/>\r
+               </HorizontalStack>\r
+               <Groupbox Text="test"  Height="-1" Width="-1" Margin="5">\r
+                       <VerticalStack  Height="-1" Width="0" >\r
+                               <RadioButton  Caption="Radio 1" Background="Red" />\r
+                               <RadioButton  Caption="Radio 2" IsChecked="true" />\r
+                               <RadioButton  Caption="Radio 3" />\r
+                       </VerticalStack>\r
+               </Groupbox>\r
+<!--           <Checkbox Height="-1" Width="-1" Background="Red" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Right"/>-->\r
+       </VerticalStack>\r
+</Window>\r
+<!--</Group>-->\r
+<!--           <Label Text="{fps}"  Background="DarkRed"/>\r
+               <Label Text="{fpsMin}"  />\r
+               <Label Text="{fpsMax}"  />-->
\ No newline at end of file
index 999c68e46590113e08aeaffdaead3bea5f1ca778..235f08067768c1a91d9b8448df77ce75bc6143c8 100755 (executable)
@@ -12,7 +12,7 @@
                                                <Label Foreground="White" Width="{../../../../../TemplatedWidth}" Margin="1" TextAlignment="Center" Text="{../../../../../Title}" />\r
                                                <Border CornerRadius="6" BorderWidth="1" BorderColor="Transparent"  Height="12" Width="12"\r
                                                        MouseEnter="{BorderColor=White}" MouseLeave="{BorderColor=Transparent}">\r
-                                                       <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#go.Images.Icons.exit2.svg"\r
+                                                       <Image Focusable="true" Name="Image" Margin="0" Width="0" Height="0" Path="#Crow.Images.Icons.exit2.svg"\r
                                                                 MouseClick="../../../../../../butQuitPress"/>\r
                                                </Border>\r
                                                <GraphicObject Width="5"/>\r
index 0c846b153d4ebd637b31856edb6f4e49747f7457..fc6c1dc9a1f6c64509d18201bc258dcd3ee8d45e 100755 (executable)
@@ -1,11 +1,11 @@
 <?xml version="1.0"?>\r
-<Window Name="window1" Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0,5;0,5;0,5;0,8" \r
+<Window Left="10" Top="10" Title="Test window" Width="200" Height="200" Background="0,5;0,5;0,5;0,8" \r
        Focusable="True"  CornerRadius="20" MinimumSize="100;100" MaximumSize="500;500">\r
        <Template>\r
                <Container Margin="20" Name="Content" Height="{../TemplatedHeight}" Width="{../TemplatedWidth}" Background="0,5;0,5;0,5;0,5"/>\r
        </Template>\r
-       <Group Background="Green">\r
-<!--           <GraphicObject Height="50" Width="50" Background="Red" Margin="5"/>-->\r
-               <Scrollbar Orientation="Vertical" Height="0" Width="10" Background="Blue" Margin="0" HorizontalAlignment="Right"/>\r
-       </Group>\r
+<!--   <Group Background="Green">-->\r
+               <GraphicObject Height="50" Width="50" Background="Red" Margin="5"/>\r
+<!--           <Scrollbar Orientation="Vertical" Height="0" Width="10" Background="Blue" Margin="0" HorizontalAlignment="Right"/>-->\r
+<!--   </Group>-->\r
 </Window>\r
index 4c823e720138bc39174230c485fef2c26c5e2cd7..fae4fdf09bd2a8f0239e37e083239bb099595593 100755 (executable)
@@ -2,7 +2,7 @@
        <HorizontalStack Width="0" Height="-1" Focusable="true" \r
                        MouseEnter="{Background=Red}"\r
                        MouseLeave="{Background=Transparent}">\r
-               <Image Width="8" Height="8" Path="#go.Images.Icons.member.svg" SvgSub="{GetIcon}"/>\r
+               <Image Width="8" Height="8" Path="#Crow.Images.Icons.member.svg" SvgSub="{GetIcon}"/>\r
                <Label Text="{Name}" Width="0" Height="-1" Margin="2"/>\r
                <Label Text="{MemberType}" Width="-1" Height="-1" Margin="0"/>\r
        </HorizontalStack>\r
index 90d1a498495cf81a6503ac9e12db1c14977e638e..1e63ae8edcd6aa7ce2acca69696bb54413c51643 100644 (file)
@@ -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>
index ae98971cda34b98d3656e2964630ee309fda263f..968c76acb76d7d1c61699097554afb5d403abaf1 100644 (file)
@@ -10,6 +10,12 @@ namespace Crow
 {\r
     public class GenericStack : Group\r
     {\r
+               internal class Page\r
+               {\r
+                       public byte[] bmp;\r
+                       public int Size;\r
+               }\r
+\r
                #region CTOR\r
                public GenericStack()\r
                        : base()\r
@@ -87,13 +93,13 @@ namespace Crow
                                foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) {\r
                                        c.Slot.X = d;\r
                                        d += c.Slot.Width + Spacing;\r
-                                       //c.RegisterForLayouting ((int)LayoutingType.Y);\r
+                                       c.RegisterForLayouting ((int)LayoutingType.Y);\r
                                }\r
                        } else {\r
                                foreach (GraphicObject c in Children.Where(ch=>ch.Visible)) {\r
                                        c.Slot.Y = d;\r
                                        d += c.Slot.Height + Spacing;\r
-                                       //c.RegisterForLayouting ((int)LayoutingType.X);\r
+                                       c.RegisterForLayouting ((int)LayoutingType.X);\r
                                }\r
                        }\r
                }\r
index 0bb11fc7d2cf5f5ccfadf0581adba54f0519819d..3003d486489f20c389275aab4cbb0ce9cc11e395 100644 (file)
@@ -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);                                
index 8e2724c4238a7fcde9b02ec79c248858d6f0830e..50176d6f5952acb029958368510105dd49236ae3 100644 (file)
@@ -29,7 +29,9 @@ namespace Crow
                Direction currentDirection = Direction.None;
 
                #region CTOR
-               public Window () : base() {}
+               public Window () : base() {
+                       
+               }
                #endregion
 
                #region GraphicObject overrides
index c2d84c54c79f543b15011743f0feaff45e5408bb..9523411234665025f62e63ef2229985420424e58 100644 (file)
@@ -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 ());