diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-08-21 16:14:59 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-08-21 16:14:59 +0200 |
| commit | fcfe9c2189fbbb00b0901b246e401b0f05413c7f (patch) | |
| tree | 215b17c72cfa5d25148f1fe05a67747df246a1c6 | |
| parent | 7f3b87047828b7d8a250ec3e696361538fa7a3f4 (diff) | |
Test stack example
| -rw-r--r-- | Tests/GOLIBTest_stack.cs | 55 | ||||
| -rwxr-xr-x | Tests/Interfaces/test_stack.goml | 17 | ||||
| -rw-r--r-- | Tests/Tests.csproj | 4 |
3 files changed, 76 insertions, 0 deletions
diff --git a/Tests/GOLIBTest_stack.cs b/Tests/GOLIBTest_stack.cs new file mode 100644 index 00000000..2164c721 --- /dev/null +++ b/Tests/GOLIBTest_stack.cs @@ -0,0 +1,55 @@ +#define MONO_CAIRO_DEBUG_DISPOSE
+
+
+using System;
+using System.Runtime.InteropServices;
+using OpenTK;
+using OpenTK.Graphics.OpenGL;
+using OpenTK.Input;
+
+using System.Diagnostics;
+
+//using GGL;
+using go;
+using System.Threading;
+
+
+namespace test
+{
+ class GOLIBTest_stack : OpenTKGameWindow
+ {
+ public GOLIBTest_stack ()
+ : base(1024, 600,"test")
+ {}
+
+ VerticalStack g;
+
+ protected override void OnLoad (EventArgs e)
+ {
+ base.OnLoad (e);
+ LoadInterface("Interfaces/test_stack.goml", out g);
+
+ }
+ protected override void OnRenderFrame (FrameEventArgs e)
+ {
+ GL.Clear (ClearBufferMask.ColorBufferBit);
+ base.OnRenderFrame (e);
+ SwapBuffers ();
+ }
+
+ protected override void OnUpdateFrame (FrameEventArgs e)
+ {
+ base.OnUpdateFrame (e);
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Console.WriteLine ("starting example");
+
+ using (GOLIBTest_stack win = new GOLIBTest_stack( )) {
+ win.Run (30.0);
+ }
+ }
+ }
+}
\ No newline at end of file diff --git a/Tests/Interfaces/test_stack.goml b/Tests/Interfaces/test_stack.goml new file mode 100755 index 00000000..a1b4b4e0 --- /dev/null +++ b/Tests/Interfaces/test_stack.goml @@ -0,0 +1,17 @@ +<?xml version="1.0"?>
+<VerticalStack Background="DarkBlue" Height="-1" Width="200">
+ <Label Text="label11" Width="0" Background="Green"/>
+ <Label Text="label21"/>
+<!-- <HorizontalStack Width="-1" Height="-1" Margin="5"
+ Focusable="True" Background="Blue">
+ <Label Text="label12"/>
+ <Label Text="label22"/>
+ <Label Text="label32"/>
+ <Label Text="label42"/>
+ <Label Text="label52"/>
+ </HorizontalStack>
+ <Label Text="label33" Background="Green" Width="0"/>-->
+ <Label Text="label43"/>
+ <Label Text="label53"/>
+
+</VerticalStack>
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 8fa16474..6e2973a4 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -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"> @@ -134,6 +135,9 @@ <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> |