<Reference Include="System" />\r
<Reference Include="System.Data" />\r
<Reference Include="System.Drawing" />\r
- <Reference Include="System.Windows.Forms" />\r
<Reference Include="System.Xml" />\r
<Reference Include="rsvg2-sharp, Version=2.18.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">\r
<Package>rsvg2-sharp-2.0</Package>\r
<None Include="Images\Icons\Cursors\hand" />\r
<None Include="Images\Icons\Cursors\help" />\r
<None Include="Images\Icons\Cursors\move" />\r
+ <None Include="README.md" />\r
</ItemGroup>\r
</Project>\r
-#GOLib
+GOLib
+=====
-Graphic Object Library: custom widget library c# version.
+GOLib stands for 'Graphic Object Library' which is a pure c# widget toolkit with templates and bindings.
+Running under Mono, With multi-platform libraries (Cairo, OpenTK) it should run on any target.
+
+The main advantage of this toolkit is it's simplicity and it's coherence. Thanks to the job done by
+OpenTK team on linux drm/kms support, GOLib may run without a X server directely in console.
+
+Graphic Rendering stack could easily be changed by implementing IGOLibHost, and a custom (and lighter) opengl rendering replacement for cairo is on the stack.
+
+FEATURES
+========
- Use OpenTK as top container for device abstraction layer by default, (other container: GTK, GDK)
-- Allow easy creation of XAML like interface under linux directely in console mode, without X
- It only required Mono,Mesa,GBM and DRM libraries.
-- Templated controls, with dynamic binding
-- inlined delegate in XML
- Curent drawing routines use Mono.Cairo
-
+- Allow easy creation of XAML like interface under linux directely in console mode, without X
+ It only required Mono with cairo libraries, OpenTK, Mesa, GBM and DRM libraries.
+- Templated controls, with dynamic binding.
+- Inlined delegate in XML
+
+Building
+========
+
+#####Build latest OpenTK:
+```
+git clone https://github.com/opentk/opentk # Download source code from git
+cd opentk # Enter the source directory
+msbuild /p:Configuration=Release OpenTK.sln # Build on .Net (Windows)
+xbuild /p:Configuration=Release OpenTK.sln # Build on Mono (Linux / Mac OS X)
+```
+#####Install Cairo and RSVG cli bindings
+######On Debian:
+
+```
+sudo apt-get install libmono-cairo4.0-cil libglib3.0-cil librsvg2-2.18-cil
+```
+#####Build GOLib
+```
+git clone https://github.com/jpbruyere/GOLib.git # Download source code from git
+cd GOLib # Enter the source directory
+msbuild /p:Configuration=Release GOLib.sln # Build on .Net (Windows)
+xbuild /p:Configuration=Release GOLib.sln # Build on Mono (Linux / Mac OS X)
+```
#####GOLib in action


-RoadMap:
- - TreeView (templated)
- Menu, Combobox, PangoLayouting controls, Improved editor
- - Monodevelop addin
- - improve inline delegates to handle all conversion and graphic tree parsing with directory navigation syntax
- - Make an easyly compilable example of complete application (3d mesh editor for example)
- - inlined SVG with binding and c# scripting for animation
- - simplified Image subElement.
<?xml version="1.0"?>\r
-<Border BorderWidth="1" Margin="1" MinimumSize="0;100" Height="{TemplatedHeight}" Width="{TemplatedWidth}" Background="Gray">\r
+<!--<Border BorderWidth="1" Margin="1" MinimumSize="0;100" Height="{TemplatedHeight}" Width="{TemplatedWidth}" Background="Gray">\r
<VerticalStack Name="List" Margin="1" Height="{TemplatedHeight}" Width="{TemplatedWidth}"/>\r
+</Border>-->\r
+<Border BorderWidth="1" Margin="1" MinimumSize="100;100" Height="{TemplatedHeight}" Width="{TemplatedWidth}" >\r
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"\r
+ Height="{TemplatedHeight}" Width="{TemplatedWidth}">\r
+ <VerticalStack Height="-1" Width="{TemplatedWidth}" Name="List" Margin="0" VerticalAlignment="Top"/>\r
+ </Scroller>\r
</Border>
\ No newline at end of file
--- /dev/null
+#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 test6\r
+{\r
+ class GOLIBTest_0 : OpenTKGameWindow\r
+ {\r
+ public GOLIBTest_0 ()\r
+ : base(1024, 600,"test")\r
+ {}\r
+\r
+ GraphicObject g;\r
+ Label l;\r
+\r
+ protected override void OnLoad (EventArgs e)\r
+ {\r
+ base.OnLoad (e);\r
+ g = LoadInterface("Interfaces/test0.goml");\r
+ l = g.FindByName ("labCpt") as Label;\r
+ }\r
+\r
+ void onUp (object sender, MouseButtonEventArgs e)\r
+ {\r
+ decimal tmp = 0;\r
+ if (!decimal.TryParse (l.Text, out tmp))\r
+ return;\r
+ \r
+ tmp += 1;\r
+ l.Text = tmp.ToString ();\r
+ }\r
+ void onDown (object sender, MouseButtonEventArgs e)\r
+ {\r
+ decimal tmp = 0;\r
+ if (!decimal.TryParse (l.Text, out tmp))\r
+ return;\r
+\r
+ tmp -= 1;\r
+ l.Text = tmp.ToString ();\r
+ }\r
+\r
+ protected override void OnKeyDown (KeyboardKeyEventArgs e)\r
+ {\r
+ switch (e.Key) {\r
+ case Key.Left:\r
+ g.Left++;\r
+ break;\r
+ case Key.Right:\r
+ g.Left--;\r
+ break;\r
+ case Key.Up:\r
+ g.Top--;\r
+ break;\r
+ case Key.Down:\r
+ g.Top++;\r
+ break;\r
+ default:\r
+ break;\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_0 win = new GOLIBTest_0( )) {\r
+ win.Run (30.0);\r
+ }\r
+ }\r
+ }\r
+}
\ No newline at end of file
<Label Name="labName" Text="{Name}" Width="0" Height="-1"/>
</Border>
<ListBox Data="{Members}" Width="0" Height="400" ItemTemplate="Interfaces/tmpMembers.goml" Focusable="true">
- <Template>
- <Border Width="0" Height="0" BorderWidth="1" Margin="1" MinimumSize="0;100" >
- <HorizontalStack Width="0" Height="0">
- <Scroller Name="scroller1" Height="0" Width="0"
- Margin="10" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
- <VerticalStack Width="0" Height="-1" Name="List" Margin="0" VerticalAlignment="Top"/>
- </Scroller>
- <Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"
- Orientation="Vertical" Width="10" />
- </HorizontalStack>
- </Border>
- </Template>
+
</ListBox>
</VerticalStack>
<?xml version="1.0"?>\r
<!--<ListBox Data="{TestList}" Focusable="true"/>-->\r
<ListBox Data="{TestList}" Background="0,5;0,5;0,5;0,5"\r
- HorizontalAlignment="Left">\r
+ HorizontalAlignment="Left" Width="0" Height="0" Margin="50">\r
+<!-- <Template>\r
+ <Border BorderWidth="1" Margin="1" MinimumSize="100;100" Width="0" Height="0" >\r
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true" \r
+ Height="0" Width="0">\r
+ <VerticalStack Height="-1" Name="List" Margin="0" VerticalAlignment="Top"/>\r
+ </Scroller>\r
+ </Border>\r
+ </Template>-->\r
<Template>\r
- <Border BorderWidth="1" Margin="1" MinimumSize="0;100" >\r
- <HorizontalStack>\r
- <Scroller Name="scroller1" Margin="1" VerticalScrolling="true" \r
- ScrollY="{../scrollbar1.Scroll}">\r
- <VerticalStack Height="-1" Name="List" Margin="0" VerticalAlignment="Top"/>\r
- </Scroller>\r
- <Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"\r
- Orientation="Vertical" Width="10" />\r
- </HorizontalStack>\r
+ <Border BorderWidth="1" Margin="1" MinimumSize="100;100" Height="{TemplatedHeight}" Width="{TemplatedWidth}" >\r
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true" \r
+ Height="{TemplatedHeight}" Width="{TemplatedWidth}">\r
+ <VerticalStack Height="-1" Width="{TemplatedWidth}" Name="List" Margin="0" VerticalAlignment="Top"/>\r
+ </Scroller>\r
</Border>\r
</Template>\r
</ListBox>\r
<HorizontalStack Width="0" Height="-1" Focusable="true" \r
MouseEnter="{Background=Red}"\r
MouseLeave="{Background=Transparent}">\r
- <Label Text="{Name}" Width="0" Height="-1" Margin="2" Background="Gray"/>\r
- <Label Text="{MemberType}" Width="-1" Height="-1" Margin="0"/>\r
<Image Width="8" Height="8" Path="#go.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
\r
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>test.GOLIBTests</StartupObject>
+ <StartupObject>test.GOLIBTest_TypeViewer</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<OutputPath>..\bin\$(configuration)</OutputPath>
<IntermediateOutputPath>obj\$(configuration)</IntermediateOutputPath>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="System.Windows.Forms" />
<Reference Include="System.Drawing" />
<Reference Include="OpenTK">
<HintPath>..\..\opentk\Binaries\OpenTK\Release\OpenTK.dll</HintPath>
</Reference>
+ <Reference Include="Mono.Cairo" />
</ItemGroup>
<ItemGroup>
<Compile Include="GOLIBTest_5.cs" />
}else
throw new Exception ("unandled source member type for binding");
}
- if (miSrc != null){
+// if (miSrc != null){
if (miDst.MemberType == MemberTypes.Property) {
PropertyInfo piDst = miDst as PropertyInfo;
//TODO: handle other dest type conversions
fiDst.SetValue (binding.Source, srcVal );
}else
throw new Exception("unandled destination member type for binding");
- }
+// }
#endregion
#region Retrieve EventHandler parameter type