<Border Background="DimGray" BorderWidth="1" Margin="1" MinimumSize="100,100"
Width="{../WidthPolicy}" Height="{../HeightPolicy}">
- <VerticalStack
- Height="0" Width="0" Name="List" Margin="0" VerticalAlignment="Top"/>
+ <VerticalStack Width="{../WidthPolicy}" Height="{../HeightPolicy}"
+ Name="List" Margin="0" VerticalAlignment="Top"/>
</Border>
this.KeyDown += KeyboardKeyDown1;
testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
//testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/basicTests", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Expandable", "*.crow")).ToArray ();
testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
+ testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Unsorted", "*.crow")).ToArray ();
this.Title = testFiles [idx] + ". Press <F3> to switch example.";
CrowInterface.LoadInterface(testFiles[idx]).DataSource = this;
win.Run (30);
}
}
-}
\ No newline at end of file
+}
namespace test2
{
- class GOLIBTest_DirViewer : OpenTKGameWindow, IValueChange
+ class GOLIBTest_DirViewer : OpenTKGameWindow
{
- #region IValueChange implementation
- public event EventHandler<ValueChangeEventArgs> ValueChanged;
- public void NotifyValueChanged(string name, object value)
- {
- ValueChanged.Raise (this, new ValueChangeEventArgs (name, value));
- }
- #endregion
-
public GOLIBTest_DirViewer ()
: base(1024, 600,"test")
{}
--- /dev/null
+<?xml version="1.0"?>
+<Container>
+<Button Caption="m" />
+</Container>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<Group Name="MainGrp"
- Width="800" Height="500"
- Background="0.5,0.5,0.5,0.5" Foreground="White"
- Margin="10" >
- <Border
- BorderWidth="2" Foreground="Transparent"
- Focusable="True"
- MouseEnter="{Foreground = White}"
- MouseLeave="{Foreground = Transparent}">
-
- <HorizontalStack Name="hs0" Fit="true"
- WidgetSpacing="10"
- VerticalAlignment="Center"
- Background="0.5,0.5,0.5,0.5">
- <VerticalStack Name="vs1"
- Margin="20" Width="400" Height="Fit">
- <Label Name="labMouse" Text="MousePos"/>
- <HorizontalStack Name="hsPbar" Fit="true">
- <ProgressBar Name="pbBar"
- Width="100" Height="20"
- Value="50"
- Foreground="BlueCrayola" Background="DarkGray"
- BorderWidth="2" Foreground="White"/>
-<!-- <Label Name="labPb"
- Width="20"
- TextAlignment="Right"/>
- <ProgressBar Name="pbBar"
- Width="100" Height="10"
- Value="30"/>-->
- </HorizontalStack>
- <HorizontalStack Name="hsFocus" Fit="true">
- <Label Text="Focused:"/>
- <Label Name="labFocus" />
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Active:" Name="hsActive"/>
- <Label Name="labActive"/>
- </HorizontalStack>
- <HorizontalStack Fit="true">
- <Label Text="Hover:" Name="hsHover"/>
- <Label Name="labHover" />
- </HorizontalStack>
- <Button Margin="5" BorderWidth="0" Background="Gray" Width="Fit" Height="Fit">
- <Label FontSize="10" Text="This is a test" Margin="5" FontColor="White" Foreground="White" />
- </Button>
- <TextBoxWidget TextAlignment="Left" Font="droid,14"
- Width="300" Height="Fit" Margin="2"
- Foreground="White" BorderWidth="1"
- Text="editable text"/>
- <GroupBox Title="Group Box" Width="300" Height="100"
- Foreground="White" BorderWidth="2" Margin="3">
- <Label Name="labValue" FontSize="14" Text="000" TextAlignment="Center"/>
- </GroupBox>
- <Slider Height="10" Width="300" BorderWidth="1" Background="Transparent" />
- <GraduatedSlider Name="slider" Height="30" Width="300" Foreground="BlueBell"/>
- </VerticalStack>
-<!-- <VerticalStack Width="Fit" Height="Fit" BorderWidth="1" Margin="5" WidgetSpacing="4">
- <Button Width="Fit" Height="Fit" Margin="15">
- <Image Path="/mnt/data/Images/130px-Blason_ville_fr_Aubure_(Haut-Rhin).svg.png"/>
- </Button>
- <HorizontalStack>
- <Label Text="Update" FontColor="White" VerticalAlignment="Center" />
- <Label Name="labUpdate" Text="xxxx" FontSize="16" Width="60" TextAlignment="Center" Background="DarkGreen"/>
- </HorizontalStack>
- <HorizontalStack>
- <Label Text="Fps:" Width = "30" VerticalAlignment="Center" TextAlignment="Left"/>
- <Label Name="labFps" Text="xxxx" Font="droid bold, 14"
- TextAlignment="Center" Background="AoEnglish"/>
- </HorizontalStack>
- <HorizontalStack>
- <Label Text="Min:" Width = "30" />
- <Label Name="labFpsMin" Text="xxxx" Font="droid bold, 14"
- TextAlignment="Center" Background="AoEnglish"/>
- </HorizontalStack>
- <HorizontalStack>
- <Label Text="Max:" Width = "30"/>
- <Label Name="labFpsMax" Text="xxxx" Font="droid bold, 14"
- TextAlignment="Center" Background="AoEnglish"/>
- </HorizontalStack>
- </VerticalStack>
-
- <Scroller Background="DimGray" Height="350" Width="300"
- Margin="5" VerticalScrolling="true">
- <VerticalStack Name="colors" VerticalAlignment="Top" Margin="5">
- <ProgressBar Name="pbBar2" Width="100" Height="20" Value="50"
- BorderWidth="2" Foreground="White" Foreground="BlueCrayola" Background="DarkGray"/>
- </VerticalStack>
- </Scroller>-->
-
- </HorizontalStack>
-
- <Slider
- Height="20" Width="300"
- Background="Transparent"
- VerticalAlignment="Bottom" />
- </Border>
-</Group>
\ No newline at end of file
<?xml version="1.0"?>
<Border BorderWidth="1" Foreground="White" CornerRadius="10" Width="500" Height="300">
<VerticalStack Height="Stretched" Background="0.4,0.4,0.4,0.4">
- <Border BorderWidth="1" Foreground="White" Height="20" Background="0.1,0.5;1,0,0.5">
+ <Border BorderWidth="1" Foreground="White" Height="20" Background="0.1,0.5,1,0,0.5">
<HorizontalStack Name="hs" Margin="1" Spacing="1" Height="Fit" >
<GraphicObject Width="5"/>
<Image Name="Image" Margin="1" Width="12" Height="12" Path="#go.Images.Icons.tetra.png"/>
<?xml version="1.0"?>
- <VerticalStack Height="Fit" Width="Fit" Name="hstack" Margin="0" Spacing="Stretched">
+ <VerticalStack Height="Fit" Width="Fit" Name="hstack" Margin="0" Spacing="0">
<Border Height="Fit" Width="200" BorderWidth="2" CornerRadius="10">
<Label Name="labName" Text="{Name}" Width="Stretched" Height="Fit"/>
</Border>
Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Scroll}">
<VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" Name="List" Margin="0" VerticalAlignment="Top"/>
</Scroller>
- <Scrollbar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"
+ <ScrollBar Name="scrollbar1" Scroll="{../scroller1.ScrollY}" MaximumScroll="{../scroller1.MaximumScroll}"
Orientation="Vertical" Width="10" Height="{../../../HeightPolicy}" />
</HorizontalStack>
</Border>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="SCALED PROPORTIONNAL" Width="150"/>
<Image Width="50%" Height="Fit" Background="vgradient|0:SkyBlue|1:White" Path="#Tests.image.crow0.svg"/>
-<!-- <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Path="#Tests.image.crow0.svg" />
+ <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Path="#Tests.image.crow0.svg" />
<Image Background="vgradient|0:SkyBlue|1:White" Width="20" Height="20" Path="#Tests.image.crow0.svg" />
<Image Margin="2" Background="vgradient|0:SkyBlue|1:White" Width="20" Height="20" Path="#Tests.image.crow0.svg" />
<Image Background="vgradient|0:SkyBlue|1:White" Width="50" Height="100" Path="#Tests.image.crow0.svg" />
<Image Background="vgradient|0:SkyBlue|1:White" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
<Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="100" Height="50" Path="#Tests.image.crow0.svg" />
<Image Background="vgradient|0:SkyBlue|1:White" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
- <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />-->
+ <Image Margin="10" Background="vgradient|0:SkyBlue|1:White" Width="50" Height="Fit" Path="#Tests.image.crow0.svg" />
</HorizontalStack>
-<!-- <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
+ <HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="SCALED NOT PROPORTIONNAL" Width="150"/>
<Image KeepProportions="false" Background="vgradient|0:SkyBlue|1:White" Path="#Tests.image.crow0.svg" />
<Image KeepProportions="false" Margin="10" Background="vgradient|0:SkyBlue|1:White" Path="#Tests.image.crow0.svg" />
<Image Margin="10" Background="White" Path="#Tests.image.crow0.svg" />
<Image Background="White" Width="20" Height="10" Path="#Tests.image.crow0.svg" />
<Image Margin="1" Background="White" Width="20" Height="10" Path="#Tests.image.crow0.svg" />
- </HorizontalStack>-->
+ </HorizontalStack>
</VerticalStack>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0"?>
-<VerticalStack>
- <TextRun Multiline="true" WordWrap="true" Width="Stretched" Height="100" Background="DimGray"
- Text="This is a long text to test text wrapping, and so here is another statement to add to this meaningless text only designed to make a small test" />
- <Label Name="labFps" Text="{fps}" Font="droid bold, 12" TextAlignment="Center" Background="AoEnglish" />
-</VerticalStack>
\ No newline at end of file
<?xml version="1.0"?>
-<MessageBox Title="message" Message="this is a message box"
- Ok="onMsgBoxOk"
- Cancel="onMsgBoxCancel"/>
\ No newline at end of file
+<MessageBox Title="message" Message="this is a message box"/>
+<!-- Ok="onMsgBoxOk"
+ Cancel="onMsgBoxCancel"/>-->
\ No newline at end of file
<?xml version="1.0"?>
<Container Width="200" Height="100" Background="DimGray" Margin="5">
- <Container Width="Stretched" Height="300" Background="DarkBlue">
+ <Container Width="Stretched" Height="800" Background="DarkBlue">
<Label Text="{fps}" Background="BlueCrayola" VerticalAlignment="Center"/>
</Container>
</Container>
+++ /dev/null
-<?xml version="1.0"?>
-<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGray">
- <RadioButton Caption="Radio1"/>
- <RadioButton Caption="Radio2" IsChecked="true"/>
- <RadioButton Caption="Radio3"/>
- <RadioButton Caption="Radio4">
- <Template>
- <HorizontalStack Spacing="1" Height="{../HeightPolicy}" Width="{../WidthPolicy}">
- <Image Margin="2" Width="14" Height="14" Path="{../../Image}" SvgSub="{../../SvgSub}"/>
- <Label Text="{../../Caption}" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}"/>
- </HorizontalStack>
- </Template>
- </RadioButton>
-</VerticalStack>
-
<?xml version="1.0"?>
-<TreeView Height="400" Width="200" Data="{List2}" ItemTemplate="#Crow.Templates.TreeViewItem.crow"/>
\ No newline at end of file
+<TreeView Height="400" Width="200" Data="{List2}" ItemTemplate="#Crow.Templates.TreeItem.crow"/>
\ No newline at end of file
</Reference>
<Reference Include="glib-sharp">
<HintPath>$(SolutionDir)packages\GtkSharp.3.1.3\lib\net45\glib-sharp.dll</HintPath>
- <Package>glib-sharp-3.0</Package>
</Reference>
<Reference Include="OpenTK">
<HintPath>$(SolutionDir)packages\OpenTK.Next.1.2.2336.6514-pre\lib\net20\OpenTK.dll</HintPath>
<Compile Include="OpenGL\Texture.cs" />
<Compile Include="HelloWorld.cs" />
<Compile Include="HelloCube.cs" />
+ <Compile Include="UIEditor.cs" />
</ItemGroup>
<ItemGroup>
<None Include="image\u.svg">
<None Include="Interfaces\Unsorted\test6.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="Interfaces\Unsorted\test4.1.crow">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
<None Include="Interfaces\Unsorted\testMsgBox.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Interfaces\Unsorted\testTypeViewer.goml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="Interfaces\Unsorted\testLabel.crow">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Include="Interfaces\Unsorted\testRadioButton2.crow">
+ <None Include="Interfaces\Unsorted\testTreeView.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
- <None Include="Interfaces\Unsorted\testTreeView.crow">
+ <None Include="Interfaces\Unsorted\0.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
--- /dev/null
+//
+// HelloCube.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
+//
+// Copyright (c) 2016 jp
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+using System;
+using OpenTK;
+using OpenTK.Graphics.OpenGL;
+using Crow;
+
+namespace Tests
+{
+ class UIEditor : OpenTKGameWindow
+ {
+ [STAThread]
+ static void Main ()
+ {
+ UIEditor win = new UIEditor ();
+ win.Run (30);
+ }
+
+ public UIEditor ()
+ : base(800, 600,"UIEditor")
+ {
+ }
+
+ protected override void OnLoad (EventArgs e)
+ {
+ base.OnLoad (e);
+
+ CrowInterface.AddWidget(
+ new Window ()
+ {
+ Title = "Hello World"
+ }
+ );
+ }
+ public override void OnRender (FrameEventArgs e)
+ {
+ base.OnRender (e);
+ }
+ }
+}
\ No newline at end of file