]> O.S.I.I.S - jp/crow.git/commitdiff
Test stack example
authorjpbruyere <jp.bruyere@hotmail.com>
Fri, 21 Aug 2015 14:14:59 +0000 (16:14 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Fri, 21 Aug 2015 14:14:59 +0000 (16:14 +0200)
Tests/GOLIBTest_stack.cs [new file with mode: 0644]
Tests/Interfaces/test_stack.goml [new file with mode: 0755]
Tests/Tests.csproj

diff --git a/Tests/GOLIBTest_stack.cs b/Tests/GOLIBTest_stack.cs
new file mode 100644 (file)
index 0000000..2164c72
--- /dev/null
@@ -0,0 +1,55 @@
+#define MONO_CAIRO_DEBUG_DISPOSE\r
+\r
+\r
+using System;\r
+using System.Runtime.InteropServices;\r
+using OpenTK;\r
+using OpenTK.Graphics.OpenGL;\r
+using OpenTK.Input;\r
+\r
+using System.Diagnostics;\r
+\r
+//using GGL;\r
+using go;\r
+using System.Threading;\r
+\r
+\r
+namespace test\r
+{\r
+       class GOLIBTest_stack : OpenTKGameWindow\r
+       {\r
+               public GOLIBTest_stack ()\r
+                       : base(1024, 600,"test")\r
+               {}\r
+\r
+               VerticalStack g;\r
+\r
+               protected override void OnLoad (EventArgs e)\r
+               {\r
+                       base.OnLoad (e);\r
+                       LoadInterface("Interfaces/test_stack.goml", out g);\r
+\r
+               }\r
+               protected override void OnRenderFrame (FrameEventArgs e)\r
+               {\r
+                       GL.Clear (ClearBufferMask.ColorBufferBit);\r
+                       base.OnRenderFrame (e);\r
+                       SwapBuffers ();\r
+               }\r
+\r
+               protected override void OnUpdateFrame (FrameEventArgs e)\r
+               {\r
+                       base.OnUpdateFrame (e);\r
+               }\r
+\r
+               [STAThread]\r
+               static void Main ()\r
+               {\r
+                       Console.WriteLine ("starting example");\r
+\r
+                       using (GOLIBTest_stack win = new GOLIBTest_stack( )) {\r
+                               win.Run (30.0);\r
+                       }\r
+               }\r
+       }\r
+}
\ No newline at end of file
diff --git a/Tests/Interfaces/test_stack.goml b/Tests/Interfaces/test_stack.goml
new file mode 100755 (executable)
index 0000000..a1b4b4e
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>\r
+<VerticalStack Background="DarkBlue" Height="-1" Width="200">\r
+       <Label Text="label11" Width="0" Background="Green"/>\r
+       <Label Text="label21"/>\r
+<!--   <HorizontalStack Width="-1" Height="-1" Margin="5"\r
+               Focusable="True" Background="Blue">\r
+               <Label Text="label12"/>\r
+               <Label Text="label22"/>\r
+               <Label Text="label32"/>\r
+               <Label Text="label42"/>\r
+               <Label Text="label52"/>\r
+       </HorizontalStack>\r
+       <Label Text="label33" Background="Green" Width="0"/>-->\r
+       <Label Text="label43"/>\r
+       <Label Text="label53"/>\r
+\r
+</VerticalStack>\r
index 8fa16474d53646657a9322ba858fe4085ff266f4..6e2973a4815a8c4c4f24576a274ffab80ac40ad9 100644 (file)
@@ -63,6 +63,7 @@
     <Compile Include="GOLIBTest_meter.cs" />
     <Compile Include="GOLIBTest_0.cs" />
     <Compile Include="GOLIBTest_TypeViewer.cs" />
+    <Compile Include="GOLIBTest_stack.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="image\u.svg">
     <None Include="Interfaces\tmpMembers.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <None Include="Interfaces\test_stack.goml">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
     <None Include="Interfaces\itemTmp.goml">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>