aboutsummaryrefslogtreecommitdiffstatsci
path: root/Tests
diff options
context:
space:
mode:
authorj-p <jp.bruyere@live.be>2018-12-11 23:20:54 +0100
committerGitHub <noreply@github.com>2018-12-11 23:20:54 +0100
commiteef19b533a0e2ce17f2762d3acfc5990496eaaa0 (patch)
tree6f09101bd8097c1a4ca6a216597bb5d4941453fa /Tests
parent65820f61457262b631eba35283c55135aecbc5f2 (diff)
parentf6732851fe211e22ff91716ac83dffc0cf09d620 (diff)
Merge pull request #44 from jpbruyere/xlib
Xlib
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BasicTests.cs491
-rw-r--r--Tests/CrowWindow.cs411
-rw-r--r--Tests/GOLIBTest_DirViewer.cs101
-rw-r--r--Tests/GOLIBTest_Listbox.cs127
-rw-r--r--Tests/GOLIBTest_TypeViewer.cs84
-rw-r--r--Tests/GOLIBTest_Window.cs125
-rw-r--r--Tests/GOLIBTest_deviceOffset.cs88
-rw-r--r--Tests/GraphicObjects/LaggingGraphicObject.cs86
-rw-r--r--Tests/Hello3D.cs154
-rw-r--r--Tests/HelloWorld.cs53
-rw-r--r--Tests/IValueChange.cs23
-rw-r--r--Tests/InterfaceControler.cs268
-rw-r--r--Tests/Interfaces/CheckBox2.imlt4
-rwxr-xr-xTests/Interfaces/Container/0.crow2
-rwxr-xr-xTests/Interfaces/Container/3.crow2
-rwxr-xr-xTests/Interfaces/Divers/0.crow42
-rwxr-xr-xTests/Interfaces/Divers/3.crow2
-rwxr-xr-xTests/Interfaces/Divers/5.crow12
-rwxr-xr-xTests/Interfaces/Divers/6.crow2
-rwxr-xr-xTests/Interfaces/Divers/clip0.crow4
-rwxr-xr-xTests/Interfaces/Divers/clip1.crow6
-rwxr-xr-xTests/Interfaces/Divers/clip2.crow6
-rwxr-xr-xTests/Interfaces/Divers/clip3.crow14
-rwxr-xr-xTests/Interfaces/Divers/clip4.crow58
-rwxr-xr-xTests/Interfaces/Divers/colorPicker.crow2
-rwxr-xr-xTests/Interfaces/Divers/perfMeasures.crow2
-rw-r--r--Tests/Interfaces/Divers/testDisable.crow4
-rwxr-xr-xTests/Interfaces/Divers/testFocus.crow82
-rwxr-xr-xTests/Interfaces/Divers/testImage.crow28
-rwxr-xr-xTests/Interfaces/Divers/testMenu.crow6
-rwxr-xr-xTests/Interfaces/Divers/testOutOfClipUpdate.crow2
-rwxr-xr-xTests/Interfaces/Divers/testPropLess.crow2
-rw-r--r--Tests/Interfaces/Divers/testShape.crow6
-rwxr-xr-xTests/Interfaces/Divers/testStacks.crow38
-rwxr-xr-xTests/Interfaces/Divers/testTextBox.crow32
-rwxr-xr-xTests/Interfaces/Divers/testVisibility.crow8
-rw-r--r--Tests/Interfaces/Divers/welcome.crow8
-rwxr-xr-xTests/Interfaces/DragAndDrop/0.crow16
-rwxr-xr-xTests/Interfaces/Experimental/DockWindow.template39
-rw-r--r--Tests/Interfaces/Experimental/testDock.crow23
-rw-r--r--Tests/Interfaces/Experimental/testDock2.crow16
-rw-r--r--Tests/Interfaces/Experimental/testStack.crow18
-rwxr-xr-xTests/Interfaces/GraphicObject/0.crow3
-rwxr-xr-xTests/Interfaces/Group/0.crow2
-rwxr-xr-xTests/Interfaces/Group/1.crow2
-rwxr-xr-xTests/Interfaces/Group/2.crow2
-rwxr-xr-xTests/Interfaces/Group/3.crow2
-rwxr-xr-xTests/Interfaces/Group/4.crow2
-rwxr-xr-xTests/Interfaces/Splitter/1.crow2
-rwxr-xr-xTests/Interfaces/Stack/0.crow2
-rwxr-xr-xTests/Interfaces/Stack/0h.crow2
-rwxr-xr-xTests/Interfaces/Stack/1.crow2
-rwxr-xr-xTests/Interfaces/Stack/1h.crow2
-rwxr-xr-xTests/Interfaces/Stack/2.crow2
-rwxr-xr-xTests/Interfaces/Stack/2h.crow2
-rwxr-xr-xTests/Interfaces/Stack/3.crow2
-rwxr-xr-xTests/Interfaces/Stack/3h.crow2
-rwxr-xr-xTests/Interfaces/Stack/4.crow4
-rw-r--r--Tests/Interfaces/TabItem.template8
-rwxr-xr-xTests/Interfaces/TemplatedContainer/0.crow2
-rwxr-xr-xTests/Interfaces/TemplatedContainer/6.crow4
-rwxr-xr-xTests/Interfaces/TemplatedContainer/7.crow4
-rwxr-xr-xTests/Interfaces/TemplatedContainer/testGroupBox.crow2
-rwxr-xr-xTests/Interfaces/TemplatedContainer/testPopper.crow2
-rw-r--r--Tests/Interfaces/TemplatedContainer/testTabView.crow12
-rw-r--r--Tests/Interfaces/TemplatedContainer/testTabView2.crow20
-rwxr-xr-xTests/Interfaces/TemplatedControl/testButton.crow2
-rwxr-xr-xTests/Interfaces/TemplatedControl/testCheckbox.crow18
-rwxr-xr-xTests/Interfaces/TemplatedControl/testCombobox.crow2
-rwxr-xr-xTests/Interfaces/TemplatedControl/testRadioButton.crow2
-rwxr-xr-xTests/Interfaces/TemplatedControl/testScrollbar.crow4
-rwxr-xr-xTests/Interfaces/TemplatedControl/testSpinner.crow2
-rwxr-xr-xTests/Interfaces/basicTests/7.crow6
-rwxr-xr-xTests/Interfaces/colorItem2.crow10
-rwxr-xr-xTests/Interfaces/perfMsr.crow7
-rw-r--r--Tests/Interfaces/testBorder.goml.cs31
-rw-r--r--Tests/OpenGL/Extensions.cs41
-rw-r--r--Tests/OpenGL/Shader.cs336
-rw-r--r--Tests/OpenGL/Texture.cs94
-rw-r--r--Tests/OpenGL/vaoMesh.cs221
-rw-r--r--Tests/Showcase.cs99
-rw-r--r--Tests/Tests.NetStd.csproj39
-rw-r--r--Tests/Tests.csproj69
-rw-r--r--Tests/Tutorials/T1_HelloWorld.cs52
-rw-r--r--Tests/Tutorials/T2_IML.cs52
-rw-r--r--Tests/Tutorials/T3_OpenGLCube.cs87
-rw-r--r--Tests/Tutorials/T4_Gauge.cs56
-rwxr-xr-xTests/Tutorials/test.crow3
-rw-r--r--Tests/image/blank-file.svg6
-rw-r--r--Tests/keysyms.cs85
-rw-r--r--Tests/packages.config4
-rw-r--r--Tests/test.style15
-rw-r--r--Tests/ui/LabelButton.style8
-rw-r--r--Tests/ui/MenuItem.style8
-rw-r--r--Tests/ui/MenuItem.template25
-rwxr-xr-xTests/ui/dbgLog.crow34
-rwxr-xr-xTests/ui/dbgLogColors.crow60
-rwxr-xr-xTests/ui/showcase.crow2
-rwxr-xr-xTests/ui/test.crow4
-rw-r--r--Tests/ui/test.style2
100 files changed, 1060 insertions, 3012 deletions
diff --git a/Tests/BasicTests.cs b/Tests/BasicTests.cs
index 5533db56..b8e98567 100644
--- a/Tests/BasicTests.cs
+++ b/Tests/BasicTests.cs
@@ -1,325 +1,272 @@
-//
-// BasicTests.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
using System;
+using System.Runtime.InteropServices;
using Crow;
+using System.Threading;
using System.Collections.Generic;
using System.Linq;
-using System.IO;
-using System.Reflection;
-using System.Text;
-using System.Diagnostics;
-
+using System.Runtime.CompilerServices;
-namespace Tests
+namespace tests
{
- class BasicTests : CrowWindow
+ class MainClass : Interface
{
- public BasicTests ()
- : base(800, 600,"test: press <F3> to toogle test files")
- {
- }
+ [DllImport ("dl", CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr dlopen (string file, dlmode mode);
+ [DllImport ("dl", CallingConvention=CallingConvention.Cdecl)]
+ static extern int dlclose (IntPtr handle);
+ //void *dlsym(void *restrict handle, const char *restrict name); [Option End]
+ [DllImport ("dl", CallingConvention=CallingConvention.Cdecl)]
+ static extern IntPtr dlsym (IntPtr libHnd, string funcName);
+ [DllImport ("mono-2.0", CallingConvention=CallingConvention.Cdecl)]
+ static extern void mono_add_internal_call (string signature, IntPtr funcPtr);
- int idx = 0;
- string[] testFiles;
+ [DllImport ("__Internal", EntryPoint="cairo_stroke", CallingConvention=CallingConvention.Cdecl)]
+ public static extern void cairo_stroke_internal (IntPtr ctx);
+ [DllImport ("__Internal", EntryPoint="cairo_rectangle", CallingConvention=CallingConvention.Cdecl)]
+ public static extern void cairo_rect_internal (IntPtr ctx, double x, double y, double w, double h);
+ [DllImport ("__Internal", EntryPoint="cairo_set_source_rgba", CallingConvention=CallingConvention.Cdecl)]
+ public static extern void cairo_rgba_internal (IntPtr ctx, double r, double g, double b, double a);
- public Version CrowVersion {
- get {
- return System.Reflection.Assembly.GetAssembly(typeof(GraphicObject)).GetName().Version;
- }
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern void cairo_stroke (IntPtr ctx);
- #region Test values for Binding
- public List<Crow.Command> Commands;
- public int intValue = 500;
- DirectoryInfo curDir = new DirectoryInfo (Path.GetDirectoryName(Assembly.GetEntryAssembly().Location));
- //DirectoryInfo curDir = new DirectoryInfo (@"/mnt/data/Images");
- public FileSystemInfo[] CurDirectory {
- get { return curDir.GetFileSystemInfos (); }
+ [Flags]
+ enum dlmode {
+ RTLD_LOCAL = 0,
+ RTLD_LAZY = 0x00001, /* Lazy function call binding. */
+ RTLD_NOW = 0x00002, /* Immediate function call binding. */
+ RTLD_BINDING_MASK = 0x3, /* Mask of binding time value. */
+ RTLD_NOLOAD = 0x00004, /* Do not load the object. */
+ RTLD_DEEPBIND = 0x00008, /* Use deep binding. */
+ RTLD_GLOBAL = 0x00100,
}
- public int IntValue {
- get {
- return intValue;
- }
+
+ const string cairoLibPath = @"/opt/cairo/lib/libcairo.so";
+ //static const string cairoLibPath = @"/opt/cairo/lib/libcairo.so.2.11513.0";
+
+ public delegate void Stroke(IntPtr ctx);
+ public delegate void Cairo4Doubles (IntPtr ctx, double x, double y, double z, double w);
+
+ public static Stroke cairo_stroke_func;
+ public static Cairo4Doubles cairo_rect_func;
+ public static Cairo4Doubles cairo_set_rgba_func;
+
+ /*[DllImport (cairoLibPath, EntryPoint="cairo_stroke")]
+ [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ public static extern void cairo_stroke_icall (IntPtr cr);*/
+
+
+ static MainClass app;
+ public Command CMDTest;
+ public Measure TestWidth = 100;
+
+ public Crow.IML.Instantiator instFileDlg;
+
+ public string CurrentDirectory {
+ get { return Crow.Configuration.Global.Get<string>("CurrentDirectory");}
set {
- intValue = value;
- NotifyValueChanged ("IntValue", intValue);
- }
- }
- void onSpinnerValueChange(object sender, ValueChangeEventArgs e){
- if (e.MemberName != "Value")
- return;
- intValue = Convert.ToInt32(e.NewValue);
- }
- void change_alignment(object sender, EventArgs e){
- RadioButton rb = sender as RadioButton;
- if (rb == null)
- return;
- NotifyValueChanged ("alignment", Enum.Parse(typeof(Alignment), rb.Caption));
- }
- public IList<String> List2 = new List<string>(new string[]
- {
- "string1",
- "string2",
- "string3",
-// "string4",
-// "string5",
-// "string6",
-// "string7",
-// "string8",
-// "string8",
-// "string8",
-// "string8",
-// "string8",
-// "string8",
-// "string9"
+ Crow.Configuration.Global.Set ("CurrentDirectory", value);
}
- );
- public IList<String> TestList2 {
- set{
- List2 = value;
- NotifyValueChanged ("TestList2", testList);
- }
- get { return List2; }
}
- List<Color> testList = Color.ColorDic.Values//.OrderBy(c=>c.Hue)
- //.ThenBy(c=>c.Value).ThenBy(c=>c.Saturation)
- .ToList();
- public List<Color> TestList {
+
+ IList<Color> testList = Color.ColorDic.Values.ToList();
+ public IList<Color> TestList {
set{
testList = value;
NotifyValueChanged ("TestList", testList);
}
get { return testList; }
}
- string curSources = "";
- public string CurSources {
- get { return curSources; }
- set {
- if (value == curSources)
- return;
- curSources = value;
- NotifyValueChanged ("CurSources", curSources);
- }
- }
- bool boolVal = true;
- public bool BoolVal {
- get { return boolVal; }
- set {
- if (boolVal == value)
- return;
- boolVal = value;
- NotifyValueChanged ("BoolVal", boolVal);
+ /*public List<KeyValuePair<DbgEvtType, Color>> ColorsKVPList {
+ get {
+ return DbgLogViewer.colors.ToList();
}
+ }*/
+
+ protected override void InitBackend ()
+ {
+ base.InitBackend ();
+ //Keyboard.KeyDown += App_KeyboardKeyDown;
}
+ public static void Main(string[] args)
+ {
+ //IntPtr cairoLib = dlopen (cairoLibPath, dlmode.RTLD_LAZY);
- #endregion
- void OnClear (object sender, MouseButtonEventArgs e) => TestList = null;
- void OnLoadList (object sender, MouseButtonEventArgs e) => TestList =
- Color.ColorDic.Values.OrderBy(c=>c.Hue).ToList();
+ //mono_add_internal_call ("tests.MainClass:cairo_stroke_icall(IntPtr cr)", strokeFuncPtr);
- void command1(){
- Console.WriteLine("command1 triggered");
- }
- void command2(){
- Console.WriteLine("command2 triggered");
- }
- void command3(){
- Console.WriteLine("command3 triggered");
- }
- void command4(){
- Console.WriteLine("command4 triggered");
- }
+ /*cairo_stroke_func = Marshal.GetDelegateForFunctionPointer<Stroke>(dlsym (cairoLib, "cairo_stroke"));
+ cairo_rect_func = Marshal.GetDelegateForFunctionPointer<Cairo4Doubles>(dlsym (cairoLib, "cairo_rectangle"));
+ cairo_set_rgba_func = Marshal.GetDelegateForFunctionPointer<Cairo4Doubles>(dlsym (cairoLib, "cairo_set_source_rgba"));
+*/
+ foreach (string s in System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceNames())
+ {
+ Console.WriteLine(s);
+ }
+
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
-//
-// foreach (Color c in Color.ColorDic.Values) {
-// if (string.IsNullOrEmpty(c.htmlCode))
-// Console.WriteLine ("no htmlcode for {0}", c.Name);
-// else if (c.htmlCode.Substring(1) != c.HtmlCode)
-// Console.WriteLine ("{2} orig: {0} comp: {1}",c.htmlCode, c.HtmlCode, c.Name);
-// }
+ using (app = new MainClass ()) {
+ // XWindow win = new XWindow (app);
+ // win.Show ();
+ //app.LoadIMLFragment (@"<SimpleGauge Level='40' Margin='5' Background='Jet' Foreground='Grey' Width='30' Height='50%'/>");
+ app.CMDTest = new Command(new Action(() => app.AddWidget (app.instFileDlg.CreateInstance()).DataSource = app)) { Caption = "Test", Icon = new SvgPicture("#Tests.image.blank-file.svg"), CanExecute = true};
+ //app.AddWidget (@"Interfaces/Divers/testFocus.crow").DataSource = app;
+ //app.AddWidget (@"Interfaces/Divers/testMenu.crow").DataSource = app;
+ //app.AddWidget (@"Interfaces/Divers/testVisibility.crow").DataSource = app;
+ app.AddWidget (@"Interfaces/Divers/0.crow").DataSource = app;
+ //app.AddWidget (@"Interfaces/Splitter/1.crow").DataSource = app;
+ //app.AddWidget (@"Interfaces/GraphicObject/0.crow").DataSource = app;
+ //app.AddWidget (@"Interfaces/TemplatedContainer/test_Listbox.crow").DataSource = app;
- Commands = new List<Crow.Command> (new Crow.Command[] {
- new Crow.Command(new Action(() => command1())) { Caption = "command1"},
- new Crow.Command(new Action(() => command2())) { Caption = "command2"},
- new Crow.Command(new Action(() => command3())) { Caption = "command3"},
- new Crow.Command(new Action(() => command4())) { Caption = "command4"},
- });
+ /*app.instFileDlg = Crow.IML.Instantiator.CreateFromImlFragment
+ (app, "<FileDialog Caption='Open File' CurrentDirectory='{²CurrentDirectory}'/>");*/
+
- this.KeyDown += KeyboardKeyDown1;
+ //app.AddWidget (@"Interfaces/Divers/colorPicker.crow").DataSource = app;
+ //app.AddWidget ("Interfaces/Divers/perfMeasures.crow").DataSource = app;
- //testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" };
- testFiles = new string [] { @"Interfaces/Divers/welcome.crow" };
- //testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" };
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Group", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Stack", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedControl", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedContainer", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/TemplatedGroup", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Splitter", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Wrapper", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Divers", "*.crow")).ToArray ();
- testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/DragAndDrop", "*.crow")).ToArray ();
- //testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Experimental", "*.crow")).ToArray ();
+ /*app.AddWidget ("#Tests.ui.dbgLog.crow").DataSource = app;
- Load(testFiles[idx]).DataSource = this;
+ GraphicObject go = app.AddWidget ("#Tests.ui.dbgLogColors.crow");
+ go.DataSource = app;
-// LoadIMLFragment (@"<DockWindow Width=""150"" Height=""150"" Background=""DarkRed"" />", 0);
-// LoadIMLFragment (@"<DockWindow Width=""200"" Height=""150"" Background=""DarkGreen"" />", 0);
-// LoadIMLFragment (@"<DockWindow Width=""250"" Height=""150"" Background=""Brown"" />", 0);
-// LoadIMLFragment (@"<DockWindow Width=""300"" Height=""150"" Background=""DarkBlue"" />", 0);
+ (go.FindByName("combo") as ComboBox).SelectedItemChanged += combo_selectedItemChanged;
+ (go.FindByName("kvpList") as ListBox).SelectedItemChanged += kvpList_selectedItemChanged;*/
+ //app.AddWidget (@"Interfaces/Experimental/testDock.crow").DataSource = app;
- }
- void KeyboardKeyDown1 (object sender, OpenTK.Input.KeyboardKeyEventArgs e)
- {
- try {
-
- if (e.Key == OpenTK.Input.Key.Escape) {
- Quit (null, null);
- return;
- } else if (e.Key == OpenTK.Input.Key.F1) {
- TestList.Add ("new string");
- NotifyValueChanged ("TestList", TestList);
- return;
- } else if (e.Key == OpenTK.Input.Key.F4) {
- GraphicObject w = Load ("Interfaces/TemplatedContainer/testWindow.goml");
- w.DataSource = this;
- return;
- } else if (e.Key == OpenTK.Input.Key.F5) {
- GraphicObject w = Load ("Interfaces/Divers/testFileDialog.crow");
- w.DataSource = this;
- return;
- }else if (e.Key == OpenTK.Input.Key.F6) {
- GraphicObject w = Load ("Interfaces/Divers/0.crow");
- w.DataSource = this;
- return;
- }else if (e.Key == OpenTK.Input.Key.F7) {
- GraphicObject w = Load ("Interfaces/Divers/perfMeasures.crow");
- w.DataSource = this.ifaceControl[0];
- return;
- } else if (e.Key == OpenTK.Input.Key.F2)
- idx--;
- else if (e.Key == OpenTK.Input.Key.F3)
- idx++;
- else
- return;
+ /*app.LoadIMLFragment (@"<DockWindow Width='150' Height='150' Name='dock1'/>");
+ app.LoadIMLFragment (@"<DockWindow Width='150' Height='150' Name='dock2'/>");
+ app.LoadIMLFragment (@"<DockWindow Width='150' Height='150' Name='dock3'/>");
- ClearInterface ();
+ app.LoadIMLFragment (@"<DockWindow Width='150' Height='150'/>");
+ app.LoadIMLFragment (@"<DockWindow Width='150' Height='150'/>");
+ app.LoadIMLFragment (@"<DockWindow Width='150' Height='150'/>");*/
- if (idx == testFiles.Length)
- idx = 0;
- else if (idx < 0)
- idx = testFiles.Length - 1;
+ long cpt = 0;
+ Measure testWidth = 100;
+ int increment = 1;
- this.Title = testFiles [idx] + ". Press <F3> to cycle examples.";
+ while (true) {
+ cpt++;
+ /*
+ testWidth += increment;
- GraphicObject obj = Load (testFiles[idx]);
- obj.DataSource = this;
- } catch (Exception ex) {
- MessageBox.Show (CurrentInterface, MessageBox.Type.Error, ex.Message + "\n" + ex.InnerException.Message).Modal = true;
+ if (increment > 0) {
+ if (testWidth > 500)
+ increment = -increment;
+ } else if (testWidth < 100)
+ increment = -increment;
+ app.NotifyValueChanged ("TestWidth", testWidth);
+*/
+
+ /*app.NotifyValueChanged ("CPT", cpt);
+
+ if (cpt % 2 == 0)
+ app.NotifyValueChanged ("TestColor", Color.Red);
+ else
+ app.NotifyValueChanged ("TestColor", Color.Blue);*/
+
+ /*#if MEASURE_TIME
+ foreach (PerformanceMeasure m in app.PerfMeasures)
+ m.NotifyChanges ();
+ #endif*/
+ app.ProcessEvents ();
+ //Thread.Sleep(1);
+ }
}
+ /*using (Display disp = new Display())
+ {
+ Window win = new Window(disp);
+ bool running = true;
+
+ while (running) {
+ IntPtr evt = disp.NextEvent;
+
+ switch ((EventType)Marshal.ReadInt32(evt))
+ {
+ case EventType.KeyPress:
+ running = false;
+ break;
+ }
+ }
+ }*/
+
+
+ //dlclose (cairoLib);
}
-// void Tv_SelectedItemChanged (object sender, SelectionChangeEventArgs e)
-// {
-// FileInfo fi = e.NewValue as FileInfo;
-// if (fi == null)
-// return;
-// if (fi.Extension == ".crow" || fi.Extension == ".goml") {
-// Instantiator i = new Instantiator(fi.FullName);
-// lock (ifaceControl.CrowInterface.UpdateMutex) {
-// (ifaceControl.CrowInterface.FindByName ("crowContainer") as Container).SetChild
-// (i.CreateInstance(ifaceControl.CrowInterface));
-// //CurSources = i.GetImlSourcesCode();
-// }
-// }
-// }
-// void onImlSourceChanged(Object sender, TextChangeEventArgs e){
-// Instantiator i;
-// try {
-// i = Instantiator.CreateFromImlFragment (e.Text);
-// } catch (Exception ex) {
-// Debug.WriteLine (ex);
-// return;
-// }
-// lock (ifaceControl.CrowInterface.UpdateMutex) {
-// (ifaceControl.CrowInterface.FindByName ("crowContainer") as Container).SetChild
-// (i.CreateInstance(ifaceControl.CrowInterface));
-// }
-// }
- void onButClick(object send, MouseButtonEventArgs e)
+
+ /*void onColorUpdate (object sender, MouseButtonEventArgs e)
{
- Console.WriteLine ("button clicked:" + send.ToString());
+ DbgLogViewer.colorsConf.Set (selectedEvtType.ToString (), newColor);
+ DbgLogViewer.colors [selectedEvtType] = newColor;
+ NotifyValueChanged ("ColorsKVPList", ColorsKVPList);
}
- void onAddTabButClick(object sender, MouseButtonEventArgs e){
+ //static DbgEvtType selectedEvtType;
+ static Color newColor;
- TabView tv = FindByName("tabview1") as TabView;
- if (tv == null)
+ static void kvpList_selectedItemChanged (object sender, SelectionChangeEventArgs e)
+ {
+ if (e.NewValue == null)
return;
- //tv.AddChild (new TabItem (CurrentInterface) { Caption = "NewTab" });
- lock (CurrentInterface.UpdateMutex) {
- tv.AddChild (CurrentInterface.LoadIMLFragment
- (@"<TabItem Caption='New tab' Background='Blue'><Label/></TabItem>"));
- }
+ selectedEvtType = ((KeyValuePair<DbgEvtType, Color>)e.NewValue).Key;
}
- [STAThread]
- static void Main ()
+ static void combo_selectedItemChanged (object sender, SelectionChangeEventArgs e)
{
- #if DEBUG
- TextWriterTraceListener listener = new TextWriterTraceListener ("debug.log");
- Debug.Listeners.Add (listener);
- #endif
+ newColor = (Color)e.NewValue;
- Console.WriteLine ("starting example");
- BasicTests win = new BasicTests ();
- win.VSync = OpenTK.VSyncMode.Adaptive;
- win.Run (30);
- #if DEBUG
- listener.Dispose ();
- #endif
- }
- protected override void OnUpdateFrame (OpenTK.FrameEventArgs e)
+ }*/
+
+ void App_KeyboardKeyDown (object sender, KeyEventArgs e)
{
- base.OnUpdateFrame (e);
- string test = e.Time.ToString ();
- IntValue++;
- if (IntValue == 1000)
- IntValue = 0;
- NotifyValueChanged ("PropertyLessBinding", test);
+ Console.WriteLine((byte)e.Key);
+ //#if DEBUG_LOG
+ switch (e.Key) {
+ case Key.F2:
+ //DebugLog.save (app);
+ break;
+ case Key.F4:
+ //app.NotifyValueChanged ("ColorsKVPList", app.ColorsKVPList);
+ break;
+ case Key.F6:
+ app.LoadIMLFragment (@"<FileDialog Caption='Open File'/>");
+ //saveDocking ();
+ break;
+ case Key.F7:
+ //reloadDocking ();
+ break;
+ case Key.F8:
+ app.LoadIMLFragment (@"<DockWindow Width='150' Height='150'/>");
+ break;
+ }
+ //#endif
+ }
+
+ void saveDocking () {
+ DockStack ds = FindByName ("mainDock") as DockStack;
+ if (ds == null) {
+ Console.WriteLine ("main dock not found in graphic tree");
+ return;
+ }
+ string conf = ds.ExportConfig ();
+ Console.WriteLine ("docking conf = " + conf);
+ Configuration.Global.Set ("DockingTests", conf);
}
- void onNew(object sender, EventArgs e){
- Debug.WriteLine ("menu new clicked");
+ void reloadDocking () {
+ DockStack ds = FindByName ("mainDock") as DockStack;
+ if (ds == null) {
+ Console.WriteLine ("main dock not found in graphic tree");
+ return;
+ }
+
+ string conf = Configuration.Global.Get<string> ("DockingTests");
+ if (string.IsNullOrEmpty (conf))
+ return;
+
+
+ ds.ImportConfig (conf);
}
}
}
diff --git a/Tests/CrowWindow.cs b/Tests/CrowWindow.cs
deleted file mode 100644
index 1be9bb45..00000000
--- a/Tests/CrowWindow.cs
+++ /dev/null
@@ -1,411 +0,0 @@
-//
-// CrowWindow.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using System.Threading;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using System.Collections.Generic;
-
-namespace Crow
-{
- public class CrowWindow : GameWindow, IValueChange
- {
- #region IValueChange implementation
- public event EventHandler<ValueChangeEventArgs> ValueChanged;
- public virtual void NotifyValueChanged(string MemberName, object _value)
- {
- if (ValueChanged != null)
- ValueChanged.Invoke(this, new ValueChangeEventArgs(MemberName, _value));
- }
- #endregion
-
- #region FPS
- int frameCpt = 0;
- int _fps = 0;
-
- public int fps {
- get { return _fps; }
- set {
- if (_fps == value)
- return;
-
- _fps = value;
- #if MEASURE_TIME
- if (_fps > fpsMax) {
- fpsMax = _fps;
- ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMax", fpsMax));
- } else if (_fps < fpsMin) {
- fpsMin = _fps;
- ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMin", fpsMin));
- }
- #endif
- if (frameCpt % 3 == 0) {
- ValueChanged.Raise (this, new ValueChangeEventArgs ("fps", _fps));
- #if MEASURE_TIME
- foreach (PerformanceMeasure m in ifaceControl[0].PerfMeasures)
- m.NotifyChanges ();
- #endif
- }
- }
- }
-
- #if MEASURE_TIME
- public PerformanceMeasure glDrawMeasure = new PerformanceMeasure("OpenGL Draw", 10);
-
- public int fpsMin = int.MaxValue;
- public int fpsMax = 0;
-
- void resetFps ()
- {
- fpsMin = int.MaxValue;
- fpsMax = 0;
- _fps = 0;
- }
- #endif
-
- #endregion
-
- #region ctor
- public CrowWindow(int _width = 800, int _height = 600, string _title="Crow",
- int colors = 32, int depth = 24, int stencil = 0, int samples = 1,
- int major=3, int minor=3)
- : this(_width, _height, new OpenTK.Graphics.GraphicsMode(colors, depth, stencil, samples),
- _title,GameWindowFlags.Default,DisplayDevice.Default,
- major,minor,OpenTK.Graphics.GraphicsContextFlags.Default)
- {
- }
- public CrowWindow (int width, int height, OpenTK.Graphics.GraphicsMode mode, string title, GameWindowFlags options, DisplayDevice device, int major, int minor, OpenTK.Graphics.GraphicsContextFlags flags)
- : base(width,height,mode,title,options,device,major,minor,flags)
- {
- }
-
- #endregion
-
- protected Shader shader;
- public List<InterfaceControler> ifaceControl = new List<InterfaceControler>();
- int focusedIdx = -1, activeIdx = -2;
-
- // TODO:We should be able to set the current interface programmaticaly
- /// <summary>
- /// Gets the currently focused interface, focus could have been given by creation of new iface controler and
- /// not only by the mouse
- /// </summary>
- public Interface CurrentInterface {
- get {
- checkDefaultIFace ();
- return ifaceControl [focusedIdx].CrowInterface;
- }
- }
-
- void addInterfaceControler(InterfaceControler ifaceControler)
- {
- ifaceControler.CrowInterface.Quit += Quit;
- ifaceControler.CrowInterface.MouseCursorChanged += CrowInterface_MouseCursorChanged;
-
- ifaceControl.Add (ifaceControler);
- focusedIdx = ifaceControl.Count - 1;
- }
- void openGLDraw(){
- //save GL states
- bool blend, depthTest, cullFace;
- GL.GetBoolean (GetPName.Blend, out blend);
- GL.GetBoolean (GetPName.DepthTest, out depthTest);
- GL.GetBoolean (GetPName.CullFace, out cullFace);
- GL.Enable (EnableCap.Blend);
- GL.Disable (EnableCap.DepthTest);
- GL.Disable (EnableCap.CullFace);
-
- #if MEASURE_TIME
- glDrawMeasure.StartCycle();
- #endif
-
- shader.Enable ();
- for (int i = 0; i < ifaceControl.Count; i++) {
- shader.SetMVP (ifaceControl [i].InterfaceMVP);
- ifaceControl [i].OpenGLDraw ();
- }
-
- #if MEASURE_TIME
- glDrawMeasure.StopCycle();
- #endif
-
- //restore GL states
- if (!blend)
- GL.Disable (EnableCap.Blend);
- if (depthTest)
- GL.Enable (EnableCap.DepthTest);
- if (cullFace)
- GL.Enable (EnableCap.CullFace);
- }
-
- public void Quit (object sender, EventArgs e)
- {
- foreach (InterfaceControler ic in ifaceControl) {
- ic.Dispose ();
- }
- this.Exit ();
- }
- void CrowInterface_MouseCursorChanged (object sender, MouseCursorChangedEventArgs e)
- {
- this.Cursor = new MouseCursor(
- (int)e.NewCursor.Xhot,
- (int)e.NewCursor.Yhot,
- (int)e.NewCursor.Width,
- (int)e.NewCursor.Height,
- e.NewCursor.data);
- }
-
- #region Events
- //those events are raised only if mouse isn't in a graphic object
- public event EventHandler<OpenTK.Input.MouseWheelEventArgs> CrowMouseWheel;
- public event EventHandler<OpenTK.Input.MouseButtonEventArgs> CrowMouseUp;
- public event EventHandler<OpenTK.Input.MouseButtonEventArgs> CrowMouseDown;
- public event EventHandler<OpenTK.Input.MouseButtonEventArgs> CrowMouseClick;
- public event EventHandler<OpenTK.Input.MouseMoveEventArgs> CrowMouseMove;
- public event EventHandler<OpenTK.Input.KeyboardKeyEventArgs> CrowKeyDown;
- public event EventHandler<OpenTK.Input.KeyboardKeyEventArgs> CrowKeyUp;
-
- #endregion
-
- public ProjectiveIFaceControler Add3DInterface(int width, int height, Matrix4 ifaceModelMat){
- ProjectiveIFaceControler tmp = new ProjectiveIFaceControler (new Rectangle (0, 0, width, height), ifaceModelMat);
- addInterfaceControler (tmp);
- return tmp;
- }
- public GraphicObject AddWidget (string path)
- {
- GraphicObject tmp = Load (path);
- return tmp;
- }
- public GraphicObject AddWidget (GraphicObject g, int interfaceIdx = 0){
- checkDefaultIFace ();
- ifaceControl [interfaceIdx].CrowInterface.AddWidget (g);
- return g;
- }
-
- public void DeleteWidget (GraphicObject g, int interfaceIdx = 0){
- ifaceControl [interfaceIdx].CrowInterface.DeleteWidget (g);
- }
- /// <summary>
- /// check if a default interface exists, create one if not
- /// </summary>
- void checkDefaultIFace (){
- if (ifaceControl.Count == 0) {//create default orthogonal interface
- addInterfaceControler (new InterfaceControler (
- new Rectangle (0, 0, this.ClientRectangle.Width, this.ClientRectangle.Height)));
- focusedIdx = 0;
- }
- }
- /// <summary>
- /// Load the content of the IML file pointed by path and add it to the current interface
- /// graphic tree.
- /// </summary>
- /// <param name="path">the path of the IML file to load</param>
- /// <param name="interfaceIdx">interface index to bind to, a default one is created if none exists</param>
- public GraphicObject Load (string path, int interfaceIdx = 0){
- checkDefaultIFace();
- return ifaceControl [interfaceIdx].CrowInterface.AddWidget (path);
- }
- /// <summary>
- /// Load the content of the IML string passed as first argument and add it to the current interface
- /// graphic tree.
- /// </summary>
- /// <param name="path">a valid IML string</param>
- /// <param name="interfaceIdx">interface index to bind to, a default one is created if none exists</param>
- public void LoadIMLFragment (string imlFragment, int interfaceIdx = 0){
- checkDefaultIFace();
- ifaceControl [interfaceIdx].CrowInterface.LoadIMLFragment (imlFragment);
- }
-
- public GraphicObject FindByName (string nameToFind){
- for (int i = 0; i < ifaceControl.Count; i++) {
- GraphicObject tmp = ifaceControl [i].CrowInterface.FindByName (nameToFind);
- if (tmp != null)
- return tmp;
- }
- return null;
- }
- public void ClearInterface (int interfaceIdx = 0){
- ifaceControl [interfaceIdx].CrowInterface.ClearInterface ();
- }
- /// <summary>Override this method for your OpenGL rendering calls</summary>
- public virtual void OnRender(FrameEventArgs e)
- {
- }
- /// <summary>Override this method to customize clear method between frames</summary>
- public virtual void GLClear()
- {
- GL.Clear (ClearBufferMask.ColorBufferBit|ClearBufferMask.DepthBufferBit);
- }
-
- #region Game win overrides
- protected override void OnLoad(EventArgs e)
- {
- base.OnLoad(e);
-
- this.KeyPress += new EventHandler<OpenTK.KeyPressEventArgs>(OpenTKGameWindow_KeyPress);
- KeyDown += new EventHandler<OpenTK.Input.KeyboardKeyEventArgs>(Keyboard_KeyDown);
- KeyUp += new EventHandler<OpenTK.Input.KeyboardKeyEventArgs>(Keyboard_KeyUp);
-
- MouseWheel += new EventHandler<OpenTK.Input.MouseWheelEventArgs>(GL_Mouse_WheelChanged);
- MouseDown += new EventHandler<OpenTK.Input.MouseButtonEventArgs>(GL_Mouse_ButtonDown);
- MouseUp += new EventHandler<OpenTK.Input.MouseButtonEventArgs>(GL_Mouse_ButtonUp);
- MouseMove += new EventHandler<OpenTK.Input.MouseMoveEventArgs>(GL_Mouse_Move);
-
- #if DEBUG
- Console.WriteLine("\n\n*************************************");
- Console.WriteLine("GL version: " + GL.GetString (StringName.Version));
- Console.WriteLine("GL vendor: " + GL.GetString (StringName.Vendor));
- Console.WriteLine("GLSL version: " + GL.GetString (StringName.ShadingLanguageVersion));
- Console.WriteLine("*************************************\n");
- #endif
-
- shader = new Shader ();
- shader.Enable ();
-
- GL.ClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- }
- protected override void OnUpdateFrame(FrameEventArgs e)
- {
- base.OnUpdateFrame(e);
- fps = (int)RenderFrequency;
-
- #if MEASURE_TIME
- if (frameCpt > 500) {
- resetFps ();
- frameCpt = 0;
-// #if DEBUG
-// GC.Collect();
-// GC.WaitForPendingFinalizers();
-// NotifyValueChanged("memory", GC.GetTotalMemory (false).ToString());
-// #endif
- }
- #endif
-
- frameCpt++;
- }
- protected override void OnRenderFrame(FrameEventArgs e)
- {
- GLClear ();
-
- base.OnRenderFrame(e);
-
- OnRender (e);
- openGLDraw ();
-
-
- SwapBuffers ();
- }
- protected override void OnResize(EventArgs e)
- {
- base.OnResize (e);
- for (int i = 0; i < ifaceControl.Count; i++) {
- ifaceControl[i].ProcessResize(
- new Rectangle(
- 0,
- 0,
- this.ClientRectangle.Width,
- this.ClientRectangle.Height));
- }
- }
- #endregion
-
- #region Mouse and Keyboard Handling
- void update_mouseButtonStates(ref MouseState e, OpenTK.Input.MouseState otk_e){
- for (int i = 0; i < MouseState.MaxButtons; i++) {
- if (otk_e.IsButtonDown ((OpenTK.Input.MouseButton)i))
- e.EnableBit (i);
- }
- }
- protected virtual void GL_Mouse_Move(object sender, OpenTK.Input.MouseMoveEventArgs otk_e)
- {
- if (activeIdx == -2) {
- for (int i = 0; i < ifaceControl.Count; i++) {
- if (ifaceControl [i].ProcessMouseMove (otk_e.X, otk_e.Y)) {
- focusedIdx = i;
- return;
- }
- }
- } if (ifaceControl [focusedIdx].ProcessMouseMove (otk_e.X, otk_e.Y))
- return;
-
- CrowMouseMove.Raise (sender, otk_e);
- }
- protected virtual void GL_Mouse_ButtonUp(object sender, OpenTK.Input.MouseButtonEventArgs otk_e)
- {
- activeIdx = -2;
- if (focusedIdx >= 0) {
- if (ifaceControl [focusedIdx].ProcessMouseButtonUp ((int)otk_e.Button))
- return;
- }
- CrowMouseUp.Raise (sender, otk_e);
- }
- protected virtual void GL_Mouse_ButtonDown(object sender, OpenTK.Input.MouseButtonEventArgs otk_e)
- {
- activeIdx = focusedIdx;
- if (focusedIdx >= 0) {
- if (ifaceControl [focusedIdx].ProcessMouseButtonDown ((int)otk_e.Button))
- return;
- }
- CrowMouseDown.Raise (sender, otk_e);
- }
- protected virtual void GL_Mouse_WheelChanged(object sender, OpenTK.Input.MouseWheelEventArgs otk_e)
- {
- if (focusedIdx >= 0) {
- if (ifaceControl [focusedIdx].ProcessMouseWheelChanged (otk_e.DeltaPrecise))
- return;
- }
- CrowMouseWheel.Raise (sender, otk_e);
- }
-
- protected virtual void Keyboard_KeyDown(object sender, OpenTK.Input.KeyboardKeyEventArgs otk_e)
- {
- if (focusedIdx >= 0) {
- if (ifaceControl [focusedIdx].ProcessKeyDown((int)otk_e.Key))
- return;
- }
- CrowKeyDown.Raise (this, otk_e);
- }
- protected virtual void Keyboard_KeyUp(object sender, OpenTK.Input.KeyboardKeyEventArgs otk_e)
- {
- if (focusedIdx >= 0) {
- if (ifaceControl [focusedIdx].ProcessKeyUp((int)otk_e.Key))
- return;
- }
- CrowKeyUp.Raise (this, otk_e);
- }
- protected virtual void OpenTKGameWindow_KeyPress (object sender, OpenTK.KeyPressEventArgs e)
- {
- if (focusedIdx >= 0) {
- if (ifaceControl [focusedIdx].ProcessKeyPress (e.KeyChar))
- return;
- }
- //TODO:create keyboardkeypress evt
- }
- #endregion
- }
-}
diff --git a/Tests/GOLIBTest_DirViewer.cs b/Tests/GOLIBTest_DirViewer.cs
deleted file mode 100644
index f17afb9b..00000000
--- a/Tests/GOLIBTest_DirViewer.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-#define MONO_CAIRO_DEBUG_DISPOSE
-
-
-using System;
-using System.Runtime.InteropServices;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-
-using System.Diagnostics;
-
-//using GGL;
-using Crow;
-using System.Threading;
-using System.Reflection;
-using System.Linq;
-using System.IO;
-using System.Collections.Generic;
-
-
-namespace test2
-{
- class GOLIBTest_DirViewer : OpenTKGameWindow
- {
- public GOLIBTest_DirViewer ()
- : base(1024, 600,"test")
- {}
-
- public DirContainer CurDir;
- FileDialog dialog;
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
-
- CurDir = new DirContainer(new DirectoryInfo ("/home/jp/"));
-
-// GraphicObject dv = Interface.Load ("Interfaces/testDirViewer.goml");
-// this.AddWidget(dv);
-// dv.DataSource = CurDir;
- dialog = new FileDialog();
- dialog.SearchPattern = ".png|.jpg|.jpeg|.gif|.svg";
- dialog.Show ();
-
- //LoadInterface("Interfaces/testTypeViewer.goml", out g);
- }
-
-
- [STAThread]
- static void Main ()
- {
- Console.WriteLine ("starting example");
-
- using (GOLIBTest_DirViewer win = new GOLIBTest_DirViewer( )) {
- win.Run (30.0);
- }
- }
- }
- public class DirContainer: IValueChange
- {
- #region IValueChange implementation
- public event EventHandler<ValueChangeEventArgs> ValueChanged;
- public void NotifyValueChanged(string name, object value)
- {
- ValueChanged.Raise (this, new ValueChangeEventArgs (name, value));
- }
- #endregion
-
- public DirectoryInfo CurDir;
- public DirContainer(DirectoryInfo _dir){
- CurDir = _dir;
- }
- public string Name {
- get { return CurDir.Name; }
- }
- public FileSystemInfo[] GetFileSystemInfos
- {
- get {
- List<FileSystemInfo> tmp = CurDir.GetFileSystemInfos ().Where(fi => !fi.Attributes.HasFlag(FileAttributes.Hidden)).ToList();
- if (CurDir.Parent != null)
- tmp.Insert (0, CurDir.Parent);
- return tmp.ToArray ();
- }
- }
- void onDirUp(object sender, MouseButtonEventArgs e)
- {
-
- }
- public void onMouseDown(object sender, MouseButtonEventArgs e)
- {
- Debug.WriteLine (sender.ToString ());
- }
- void OnSelectedItemChanged (object sender, SelectionChangeEventArgs e)
- {
- CurDir = e.NewValue as DirectoryInfo;
- NotifyValueChanged ("GetFileSystemInfos", GetFileSystemInfos);
- NotifyValueChanged ("Name", Name);
-
- }
- }
-
-} \ No newline at end of file
diff --git a/Tests/GOLIBTest_Listbox.cs b/Tests/GOLIBTest_Listbox.cs
deleted file mode 100644
index 76631020..00000000
--- a/Tests/GOLIBTest_Listbox.cs
+++ /dev/null
@@ -1,127 +0,0 @@
-#define MONO_CAIRO_DEBUG_DISPOSE
-
-
-using System;
-using System.Runtime.InteropServices;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-
-using System.Diagnostics;
-
-//using GGL;
-using Crow;
-using System.Threading;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-
-
-namespace test
-{
- public class ClsItem
- {
-// #region IValueChange implementation
-//
-// public event EventHandler<ValueChangeEventArgs> ValueChanged;
-//
-// #endregion
-
- public string field;
-
- public string Field {
- get {
- return field;
- }
- set {
- field = value;
- //ValueChanged.Raise(this, new ValueChangeEventArgs ("Field", null, field));
- }
- }
-
- public ClsItem(){
- }
- public ClsItem(string str){
- Field = str;
- }
- }
-
- class GOLIBTest_Listbox : OpenTKGameWindow, IValueChange
- {
- #region IValueChange implementation
-
- public event EventHandler<ValueChangeEventArgs> ValueChanged;
-
- #endregion
-
- public GOLIBTest_Listbox ()
- : base(1024, 600,"test")
- {}
-
-// public List<ClsItem> TestList = new List<ClsItem>(new ClsItem[]
-// {
-// new ClsItem("string 1"),
-// new ClsItem("string 2"),
-// new ClsItem("string 3")
-// });
- public List<string> TestList;/* = new List<string>( new string[]
- {
- "string 1",
- "string 2",
- "string 3"
- }); */
-
- public String Hover {
- get { return hoverWidget == null ? "None" : hoverWidget.ToString(); }
- }
- Point mPos;
- public string MousePos {
- get { return mPos.ToString(); }
- }
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
-
- //TestList = Directory.GetFileSystemEntries("/home/jp/tmp/mtgdata/a", "*.txt",SearchOption.AllDirectories).ToList();
- GraphicObject tlb = LoadInterface("Interfaces/test_Listbox.goml");
- tlb.DataSource = this;
-
-// TestList [1].Field = "test string";
-// ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));
- }
- void OnClear (object sender, MouseButtonEventArgs e){
- TestList = null;
- ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));
- }
- void OnLoadList (object sender, MouseButtonEventArgs e){
- TestList = Directory.GetFileSystemEntries("/home/jp/tmp/mtgdata/a", "*.txt",SearchOption.AllDirectories).ToList();
- ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));
- }
-// protected override void OnMouseMove (MouseMoveEventArgs e)
-// {
-// base.OnMouseMove (e);
-// ValueChanged.Raise (this, new ValueChangeEventArgs ("Hover", Hover));
-// ValueChanged.Raise (this, new ValueChangeEventArgs ("MousePos", e.Position.ToString()));
-// }
-
- protected override void OnUpdateFrame (FrameEventArgs e)
- {
- base.OnUpdateFrame (e);
- }
-// protected override void OnKeyDown (KeyboardKeyEventArgs e)
-// {
-// TestList = Directory.GetFileSystemEntries("/home/jp/tmp/mtgdata/a", "*.txt",SearchOption.AllDirectories).ToList();
-// //TestList.Add ("newly added list item");
-// ValueChanged.Raise(this, new ValueChangeEventArgs ("TestList", TestList));
-// }
-
- [STAThread]
- static void Main ()
- {
- Console.WriteLine ("starting example");
-
- using (GOLIBTest_Listbox win = new GOLIBTest_Listbox( )) {
- win.Run (30.0);
- }
- }
- }
-} \ No newline at end of file
diff --git a/Tests/GOLIBTest_TypeViewer.cs b/Tests/GOLIBTest_TypeViewer.cs
deleted file mode 100644
index 39e5a527..00000000
--- a/Tests/GOLIBTest_TypeViewer.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-#define MONO_CAIRO_DEBUG_DISPOSE
-
-
-using System;
-using System.Runtime.InteropServices;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-
-using System.Diagnostics;
-
-//using GGL;
-using Crow;
-using System.Threading;
-using System.Reflection;
-using System.Linq;
-
-
-namespace test
-{
- class GOLIBTest_TypeViewer : OpenTKGameWindow
- {
- public GOLIBTest_TypeViewer ()
- : base(1024, 600,"test")
- {}
-
- VerticalStack g;
- TypeContainer type;
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
- type = new TypeContainer(typeof (GraphicObject));
-
- //this.AddWidget(Interface.Load ("Interfaces/testTypeViewer.goml", type));
- GraphicObject go = LoadInterface("Interfaces/testTypeViewer.goml");
- go.DataSource = type;
- }
-
- protected override void OnRenderFrame (FrameEventArgs e)
- {
- GL.Clear (ClearBufferMask.ColorBufferBit);
- base.OnRenderFrame (e);
- SwapBuffers ();
-
- MemberInfo mi;
-
-
- }
-
- [STAThread]
- static void Main ()
- {
- Console.WriteLine ("starting example");
-
- using (GOLIBTest_TypeViewer win = new GOLIBTest_TypeViewer( )) {
- win.Run (30.0);
- }
- }
- }
- public class TypeContainer
- {
- public Type Type;
- public TypeContainer(Type _type){
- Type = _type;
- }
- public string Name {
- get { return Type.Name; }
- }
- public MemberInfo[] Members {
- get {
- MemberInfo[] mi = Properties.Cast<MemberInfo> ().Concat (Methods.Cast<MemberInfo> ()).ToArray();
- return mi;
- }
- }
- public MethodInfo[] Methods {
- get { return Type.GetMethods (BindingFlags.Public | BindingFlags.Instance).Where (m => !m.IsSpecialName).ToArray(); }
- }
- public PropertyInfo[] Properties {
- get { return Type.GetProperties (); }
- }
-
- }
-
-} \ No newline at end of file
diff --git a/Tests/GOLIBTest_Window.cs b/Tests/GOLIBTest_Window.cs
deleted file mode 100644
index e2a96e96..00000000
--- a/Tests/GOLIBTest_Window.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-#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_Window : OpenTKGameWindow , IValueChange
- {
- #region IValueChange implementation
- public event EventHandler<ValueChangeEventArgs> ValueChanged;
- #endregion
-
- #region FPS
- int _fps = 0;
-
- public int fps {
- get { return _fps; }
- set {
- if (_fps == value)
- return;
-
- _fps = value;
-
- if (_fps > fpsMax) {
- fpsMax = _fps;
- ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMax", fpsMax));
- } else if (_fps < fpsMin) {
- fpsMin = _fps;
- ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMin", fpsMin));
- }
-
- if (ValueChanged != null)
- ValueChanged.Raise(this, new ValueChangeEventArgs ("fps", _fps));
- }
- }
- string name = "testName";
-
- public string Name {
- get {
- return name;
- }
- set {
- name = value;
- }
- }
-
- public int fpsMin = int.MaxValue;
- public int fpsMax = 0;
-
- void resetFps ()
- {
- fpsMin = int.MaxValue;
- fpsMax = 0;
- _fps = 0;
- }
- #endregion
-
- public GOLIBTest_Window ()
- : base(800, 600,"test")
- {}
-
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
- LoadInterface("Interfaces/testWindow.goml");
- LoadInterface("Interfaces/testWindow.goml");
-// LoadInterface("Interfaces/testWindow.goml", out g);
-// LoadInterface("Interfaces/testWindow.goml", out g);
-// LoadInterface("Interfaces/testWindow.goml", out g);
-// LoadInterface("Interfaces/testWindow.goml", out g);
-// LoadInterface("Interfaces/testWindow.goml", out g);
- CursorVisible = true;
- }
-
-
- private int frameCpt = 0;
- protected override void OnUpdateFrame (FrameEventArgs e)
- {
- base.OnUpdateFrame (e);
-
- fps = (int)RenderFrequency;
-
- if (frameCpt > 200) {
- resetFps ();
- frameCpt = 0;
-
- }
- frameCpt++;
- }
-
- protected override void OnKeyDown (KeyboardKeyEventArgs e)
- {
- base.OnKeyDown (e);
- this.Quit ();
- }
-
- void butQuitPress (object sender, MouseButtonEventArgs e)
- {
- DeleteWidget (sender as GraphicObject);
- }
-
- [STAThread]
- static void Main ()
- {
- Console.WriteLine ("starting example");
-
- using (GOLIBTest_Window win = new GOLIBTest_Window( )) {
- win.Run (30.0);
- }
- }
- }
-} \ No newline at end of file
diff --git a/Tests/GOLIBTest_deviceOffset.cs b/Tests/GOLIBTest_deviceOffset.cs
deleted file mode 100644
index 96486db3..00000000
--- a/Tests/GOLIBTest_deviceOffset.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-#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 test6
-{
- class GOLIBTest_0 : OpenTKGameWindow
- {
- public GOLIBTest_0 ()
- : base(1024, 600,"test")
- {}
-
- GraphicObject g;
- Label l;
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
- g = LoadInterface("Interfaces/test0.goml");
- l = g.FindByName ("labCpt") as Label;
- }
-
- void onUp (object sender, MouseButtonEventArgs e)
- {
- decimal tmp = 0;
- if (!decimal.TryParse (l.Text, out tmp))
- return;
-
- tmp += 1;
- l.Text = tmp.ToString ();
- }
- void onDown (object sender, MouseButtonEventArgs e)
- {
- decimal tmp = 0;
- if (!decimal.TryParse (l.Text, out tmp))
- return;
-
- tmp -= 1;
- l.Text = tmp.ToString ();
- }
-
- protected override void OnKeyDown (KeyboardKeyEventArgs e)
- {
- switch (e.Key) {
- case Key.Left:
- g.Left++;
- break;
- case Key.Right:
- g.Left--;
- break;
- case Key.Up:
- g.Top--;
- break;
- case Key.Down:
- g.Top++;
- break;
- default:
- break;
- }
- }
- protected override void OnUpdateFrame (FrameEventArgs e)
- {
- base.OnUpdateFrame (e);
- }
-
- [STAThread]
- static void Main ()
- {
- Console.WriteLine ("starting example");
-
- using (GOLIBTest_0 win = new GOLIBTest_0( )) {
- win.Run (30.0);
- }
- }
- }
-} \ No newline at end of file
diff --git a/Tests/GraphicObjects/LaggingGraphicObject.cs b/Tests/GraphicObjects/LaggingGraphicObject.cs
new file mode 100644
index 00000000..82cf0bfc
--- /dev/null
+++ b/Tests/GraphicObjects/LaggingGraphicObject.cs
@@ -0,0 +1,86 @@
+//
+// SimpleGauge.cs
+//
+// Author:
+// jp <>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using Crow;
+using System.ComponentModel;
+using Cairo;
+using System.Diagnostics;
+
+namespace Crow
+{
+ public class LaggingGraphicObject : GraphicObject
+ {
+ protected override void onDraw (Context gr)
+ {
+ base.onDraw (gr);
+
+ Stopwatch t = Stopwatch.StartNew ();
+
+ IntPtr ctxHnd = gr.Handle;
+
+ for (int i = 0; i < 1000000; i++) {
+
+ /*gr.SetSourceRGBA (1.0,0.0,0.0,1.0);
+ gr.Rectangle (0, 0, 100, 100);
+ gr.Stroke ();*/
+
+ /*Cairo.NativeMethods.SetSourceRGBA (ctxHnd, 1.0,0.0,0.0,1.0);
+ Cairo.NativeMethods.Rectangle (ctxHnd, 0, 0, 100, 100);
+ Cairo.NativeMethods.Stroke (ctxHnd);*/
+
+
+ //tests.MainClass.cairo_set_rgba_func (ctxHnd, 1.0,0.0,0.0,1.0);
+ //tests.MainClass.cairo_rect_func (ctxHnd, 0, 0, 100, 100);
+ //tests.MainClass.cairo_stroke_func (ctxHnd);
+
+ tests.MainClass.cairo_rgba_internal (ctxHnd, 1.0,0.0,0.0,1.0);
+ tests.MainClass.cairo_rect_internal (ctxHnd, 0, 0, 100, 100);
+ tests.MainClass.cairo_stroke_internal (ctxHnd);
+ //tests.MainClass.cairo_stroke (ctxHnd);
+ //tests.MainClass.cairo_stroke_icall (ctxHnd);
+
+
+
+ }
+
+
+ t.Stop ();
+
+ Console.WriteLine("elapsed ticks = {0}", t.ElapsedTicks);
+
+ //System.Threading.Thread.Sleep (1000);
+
+ }
+
+ public override void onMouseMove (object sender, MouseMoveEventArgs e)
+ {
+
+
+ RegisterForRedraw ();
+ }
+ }
+}
+
diff --git a/Tests/Hello3D.cs b/Tests/Hello3D.cs
deleted file mode 100644
index 2730bb63..00000000
--- a/Tests/Hello3D.cs
+++ /dev/null
@@ -1,154 +0,0 @@
-//
-// Hello3D.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using Crow;
-
-namespace Tests
-{
- class Hello3D : CrowWindow
- {
- [STAThread]
- static void Main ()
- {
- Hello3D win = new Hello3D ();
- win.Run (30);
- }
-
- public Hello3D ()
- : base(800, 600,"Crow Test with OpenTK")
- {
- }
-
- public Matrix4 modelview, projection;
- public int[] viewport = new int[4];
- public Vector3 vEyeTarget = new Vector3(0f, 0f, 0f);
- public Vector3 vEye;
- public Vector3 vLookInit = Vector3.Normalize(new Vector3(-1.0f, -1.0f, 1.0f));
- public Vector3 vLook; // Camera vLook Vector
- public float zNear = 0.001f, zFar = 300.0f;
- public float fovY = (float)Math.PI / 4;
- public float eyeDist = 10.2f;
- public float viewZangle, viewXangle;
- public const float MoveSpeed = 0.02f;
- public const float RotationSpeed = 0.005f;
- public const float ZoomSpeed = 0.22f;
-
- vaoMesh cube;
- Texture texture;
- ProjectiveIFaceControler iface3D;
-
- void initGL(){
- GL.Enable (EnableCap.CullFace);
- GL.Enable (EnableCap.Blend);
- GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
-
- cube = vaoMesh.CreateCube ();
- texture = new Texture ("image/textest.png");
- }
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
-
- CrowMouseMove += HelloCube_MouseMove;
- CrowMouseWheel += Hello3D_MouseWheelChanged;
-
- iface3D = Add3DInterface (800, 800,
- Matrix4.CreateScale (6f) *
- Matrix4.CreateRotationX (MathHelper.PiOver2) *
- Matrix4.CreateTranslation (Vector3.UnitY * -1.1f));
- Load (@"Interfaces/Divers/0.crow").DataSource = this;
- initGL ();
- shader.Enable ();
- }
-
- protected override void OnResize (EventArgs e)
- {
- base.OnResize (e);
- UpdateViewMatrix ();
- }
-
- public override void OnRender (FrameEventArgs e)
- {
- base.OnRender (e);
-
- shader.SetMVP(modelview * projection);
-
- GL.BindTexture (TextureTarget.Texture2D, texture);
- cube.Render (BeginMode.Triangles);
- GL.BindTexture (TextureTarget.Texture2D, 0);
- }
-
- public void UpdateViewMatrix()
- {
- Rectangle r = this.ClientRectangle;
- GL.Viewport( r.X, r.Y, r.Width, r.Height);
- projection = Matrix4.CreatePerspectiveFieldOfView (fovY, r.Width / (float)r.Height, zNear, zFar);
- vLook = vLookInit.Transform(
- Matrix4.CreateRotationX (viewXangle)*
- Matrix4.CreateRotationZ (viewZangle));
- vLook.Normalize();
- vEye = vEyeTarget + vLook * eyeDist;
- modelview = Matrix4.LookAt(vEye, vEyeTarget, Vector3.UnitZ);
- GL.GetInteger(GetPName.Viewport, viewport);
-
- iface3D.UpdateView (projection, modelview, viewport, vEye);
- }
-
- void HelloCube_MouseMove(object sender, OpenTK.Input.MouseMoveEventArgs otk_e)
- {
- if (otk_e.Mouse.MiddleButton == OpenTK.Input.ButtonState.Pressed) {
- viewZangle -= (float)otk_e.XDelta * RotationSpeed;
- viewXangle -= (float)otk_e.YDelta * RotationSpeed;
- UpdateViewMatrix ();
- } else if (otk_e.Mouse.LeftButton == OpenTK.Input.ButtonState.Pressed) {
- return;
- } else if (otk_e.Mouse.RightButton == OpenTK.Input.ButtonState.Pressed) {
- Vector2 v2Look = vLook.Xy.Normalized ();
- Vector2 disp = v2Look.PerpendicularLeft * otk_e.XDelta * MoveSpeed +
- v2Look * otk_e.YDelta * MoveSpeed;
- vEyeTarget += new Vector3 (disp.X, disp.Y, 0);
- UpdateViewMatrix ();
- }
- }
- void Hello3D_MouseWheelChanged (object sender, OpenTK.Input.MouseWheelEventArgs e)
- {
- float speed = ZoomSpeed;
- //if (Keyboard[OpenTK.Input.Key.ControlLeft])
- // speed *= 20.0f;
-
- eyeDist -= e.Delta * speed;
- if (eyeDist < zNear)
- eyeDist = zNear;
- else if (eyeDist > zFar)
- eyeDist = zFar;
- UpdateViewMatrix ();
- }
- }
-} \ No newline at end of file
diff --git a/Tests/HelloWorld.cs b/Tests/HelloWorld.cs
deleted file mode 100644
index 75cc9bd5..00000000
--- a/Tests/HelloWorld.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-using Tutorials;
-
-namespace Tests
-{
- class HelloWorld : CrowWindow
- {
- public HelloWorld ()
- : base(800, 600,"Crow Test with OpenTK")
- {
- }
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
- LoadIMLFragment (@"<SimpleGauge Level='40' Margin='5' Background='Jet' Foreground='Gray' Width='30' Height='50%'/>");
- }
-
- [STAThread]
- static void Main ()
- {
- HelloWorld win = new HelloWorld ();
- win.Run (30);
- }
- }
-} \ No newline at end of file
diff --git a/Tests/IValueChange.cs b/Tests/IValueChange.cs
deleted file mode 100644
index 21d3c45d..00000000
--- a/Tests/IValueChange.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-#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
-{
- interface IValueChange
- {
- }
-
-} \ No newline at end of file
diff --git a/Tests/InterfaceControler.cs b/Tests/InterfaceControler.cs
deleted file mode 100644
index 034cab39..00000000
--- a/Tests/InterfaceControler.cs
+++ /dev/null
@@ -1,268 +0,0 @@
-//
-// InterfaceControler.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using System.Threading;
-using System.Collections.Generic;
-
-namespace Crow
-{
- public class ProjectiveIFaceControler : InterfaceControler {
- Matrix4 modelview;
- int[] viewport = new int[4];
- Vector3 vEyePosition;
-
- public Matrix4 ifaceModelMat;
- Point localMousePos;
-
- public ProjectiveIFaceControler(Rectangle ifaceBounds, Matrix4 _ifaceModelMat)
- : base(ifaceBounds){
- ifaceModelMat = _ifaceModelMat;
- }
-
- public override Matrix4 InterfaceMVP {
- get { return ifaceModelMat * modelview * projection; }
- }
-
- public override void initGL(){
- quad = new Crow.vaoMesh (0, 0, 0, 1, 1, 1, -1);
- //ifaceModelMat = Matrix4.CreateRotationX(MathHelper.PiOver2) * Matrix4.CreateTranslation(Vector3.UnitY);
- CrowInterface.ProcessResize(iRect);
- createContext ();
- //CrowInterface.ProcessResize (iRect);
- }
- public override void ProcessResize (Rectangle newSize)
- {
- }
- public override void OpenGLDraw ()
- {
- GL.Enable (EnableCap.DepthTest);
- base.OpenGLDraw ();
- GL.Disable (EnableCap.DepthTest);
- }
- public void UpdateView (Matrix4 _projection, Matrix4 _modelview, int[] _viewport, Vector3 _vEyePosition)
- {
- projection = _projection;
- modelview = _modelview;
- viewport = _viewport;
- vEyePosition = _vEyePosition;
- }
- public override bool ProcessMouseMove (int x, int y)
- {
- Matrix4 mv = ifaceModelMat * modelview;
- Vector3 vMouse = UnProject(ref projection, ref mv, viewport, new Vector2 (x, y)).Xyz;
- Vector3 vE = vEyePosition.Transform (ifaceModelMat.Inverted());
- Vector3 vMouseRay = Vector3.Normalize(vMouse - vE);
- float a = vE.Z / vMouseRay.Z;
- vMouse = vE - vMouseRay * a;
- //vMouse = vMouse.Transform (interfaceModelView.Inverted());
- localMousePos = new Point ((int)Math.Truncate ((vMouse.X + 0.5f) * iRect.Width),
- iRect.Height - (int)Math.Truncate ((vMouse.Y + 0.5f) * iRect.Height));
- mouseIsInInterface = localMousePos.X.IsInBetween (0, iRect.Width) & localMousePos.Y.IsInBetween (0, iRect.Height);
-
- return mouseIsInInterface ? CrowInterface.ProcessMouseMove (localMousePos.X, localMousePos.Y) : false;
- }
- Vector4 UnProject(ref Matrix4 projection, ref Matrix4 view, int[] viewport, Vector2 mouse)
- {
- Vector4 vec;
-
- vec.X = 2.0f * mouse.X / (float)viewport[2] - 1;
- vec.Y = -(2.0f * mouse.Y / (float)viewport[3] - 1);
- vec.Z = 0f;
- vec.W = 1.0f;
-
- Matrix4 viewInv = Matrix4.Invert(view);
- Matrix4 projInv = Matrix4.Invert(projection);
-
- Vector4.Transform(ref vec, ref projInv, out vec);
- Vector4.Transform(ref vec, ref viewInv, out vec);
-
- if (vec.W > float.Epsilon || vec.W < float.Epsilon)
- {
- vec.X /= vec.W;
- vec.Y /= vec.W;
- vec.Z /= vec.W;
- }
-
- return vec;
- }
- }
- public class InterfaceControler : IDisposable {
- public Interface CrowInterface;
- public int texID;
- public vaoMesh quad;
- public Rectangle iRect = new Rectangle(0,0,2048,2048);
- public bool mouseIsInInterface = false;
-
- protected Matrix4 projection;
- public virtual Matrix4 InterfaceMVP {
- get { return projection; }
- }
-
- #if MEASURE_TIME
- public List<PerformanceMeasure> PerfMeasures;
- public PerformanceMeasure glDrawMeasure = new PerformanceMeasure("OpenGL Draw", 10);
- #endif
-
- #region CTOR
- public InterfaceControler(Rectangle ifaceBounds){
- iRect = ifaceBounds;
-
- CrowInterface = new Interface ();
- CrowInterface.Init ();
-
- #if MEASURE_TIME
- PerfMeasures = new List<PerformanceMeasure> (
- new PerformanceMeasure[] {
- this.CrowInterface.updateMeasure,
- this.CrowInterface.layoutingMeasure,
- this.CrowInterface.clippingMeasure,
- this.CrowInterface.drawingMeasure,
- this.glDrawMeasure
- }
- );
- #endif
-
- Thread t = new Thread (interfaceThread);
- t.IsBackground = true;
- t.Start ();
-
- initGL ();
- }
- #endregion
-
- void interfaceThread()
- {
- while (CrowInterface.ClientRectangle.Size.Width == 0)
- Thread.Sleep (5);
-
- while (true) {
- CrowInterface.Update ();
- Thread.Sleep (2);
- }
- }
-
- #region Mouse And Keyboard handling
- public virtual void ProcessResize(Rectangle newSize){
- iRect = newSize;
- CrowInterface.ProcessResize(newSize);
- createContext ();
- GL.Viewport (0, 0, newSize.Width, newSize.Height);//TODO:find a better place for this
- }
- public virtual bool ProcessMouseMove(int x, int y){
- return CrowInterface.ProcessMouseMove (x, y);
- }
- public virtual bool ProcessMouseButtonUp(int button)
- {
- return CrowInterface.ProcessMouseButtonUp (button);
- }
- public virtual bool ProcessMouseButtonDown(int button)
- {
- return CrowInterface.ProcessMouseButtonDown (button);
- }
- public virtual bool ProcessMouseWheelChanged(float delta)
- {
- return CrowInterface.ProcessMouseWheelChanged (delta);
- }
- public virtual bool ProcessKeyDown(int Key){
- return CrowInterface.ProcessKeyDown(Key);
- }
- public virtual bool ProcessKeyUp(int Key){
- return CrowInterface.ProcessKeyUp(Key);
- }
- public virtual bool ProcessKeyPress(char Key){
- return CrowInterface.ProcessKeyPress(Key);
- }
- #endregion
-
- #region graphic context
- public virtual void initGL(){
- projection = OpenTK.Matrix4.CreateOrthographicOffCenter (-0.5f, 0.5f, -0.5f, 0.5f, 1, -1);
- quad = new Crow.vaoMesh (0, 0, 0, 1, 1, 1, -1);
- createContext ();
- }
- /// <summary>Create the texture for the interface redering</summary>
- public virtual void createContext()
- {
- if (GL.IsTexture(texID))
- GL.DeleteTexture (texID);
- GL.GenTextures(1, out texID);
- GL.ActiveTexture (TextureUnit.Texture0);
- GL.BindTexture(TextureTarget.Texture2D, texID);
-
- GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba,
- iRect.Width, iRect.Height, 0,
- OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, CrowInterface.bmp);
-
- GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
- GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
-
- GL.BindTexture(TextureTarget.Texture2D, 0);
- }
- /// <summary>Rendering of the interface</summary>
- public virtual void OpenGLDraw()
- {
- #if MEASURE_TIME
- glDrawMeasure.StartCycle();
- #endif
-
- GL.ActiveTexture (TextureUnit.Texture0);
- GL.BindTexture (TextureTarget.Texture2D, texID);
- if (Monitor.TryEnter(CrowInterface.RenderMutex)) {
- if (CrowInterface.IsDirty) {
- GL.TexSubImage2D (TextureTarget.Texture2D, 0,
- CrowInterface.DirtyRect.Left, CrowInterface.DirtyRect.Top,
- CrowInterface.DirtyRect.Width, CrowInterface.DirtyRect.Height,
- OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, CrowInterface.dirtyBmp);
- CrowInterface.IsDirty = false;
- }
- Monitor.Exit (CrowInterface.RenderMutex);
- }
- quad.Render (BeginMode.TriangleStrip);
- GL.BindTexture(TextureTarget.Texture2D, 0);
-
- #if MEASURE_TIME
- glDrawMeasure.StopCycle();
- #endif
- }
- #endregion
-
- #region IDisposable implementation
-
- public void Dispose ()
- {
- if (GL.IsTexture(texID))
- GL.DeleteTexture (texID);
- if (quad != null)
- quad.Dispose ();
- }
-
- #endregion
- }
-}
-
diff --git a/Tests/Interfaces/CheckBox2.imlt b/Tests/Interfaces/CheckBox2.imlt
index 4cb7f5f2..c2bfe8da 100644
--- a/Tests/Interfaces/CheckBox2.imlt
+++ b/Tests/Interfaces/CheckBox2.imlt
@@ -1,7 +1,7 @@
<Label Font="{./Font}" Text="{./Caption}" Height="{./HeightPolicy}" Width="{./WidthPolicy}"
Margin="3"
Background="{./Background}"
- Foreground="DimGray"
+ Foreground="DimGrey"
TextAlignment="Center"
MouseEnter="{Foreground=White}"
- MouseLeave="{Foreground=DimGray}"/> \ No newline at end of file
+ MouseLeave="{Foreground=DimGrey}"/> \ No newline at end of file
diff --git a/Tests/Interfaces/Container/0.crow b/Tests/Interfaces/Container/0.crow
index 17bc958e..df2f4733 100755
--- a/Tests/Interfaces/Container/0.crow
+++ b/Tests/Interfaces/Container/0.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Container Background="DimGray" Margin="10" Width="90%" Height="90%">
+<Container Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="10" Background="SeaGreen"
MinimumSize="50,50"/>
</Container> \ No newline at end of file
diff --git a/Tests/Interfaces/Container/3.crow b/Tests/Interfaces/Container/3.crow
index dd8afa28..94655ca3 100755
--- a/Tests/Interfaces/Container/3.crow
+++ b/Tests/Interfaces/Container/3.crow
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
-<Container Background="DimGray" Margin="10" Fit="true">
+<Container Background="DimGrey" Margin="10" Fit="true">
<Label Text="{fps}" Margin="10" Fit="true" Background="SeaGreen"/>
</Container> \ No newline at end of file
diff --git a/Tests/Interfaces/Divers/0.crow b/Tests/Interfaces/Divers/0.crow
index d98668c0..16ec90f9 100755
--- a/Tests/Interfaces/Divers/0.crow
+++ b/Tests/Interfaces/Divers/0.crow
@@ -3,10 +3,10 @@
<HorizontalStack >
<VerticalStack Width="30%" Margin="5">
<GroupBox Caption="Performance" Height="Fit">
- <VerticalStack Width="90%" Height="Fit" Spacing="2" >
+ <VerticalStack DataSource="{drawingMeasure}" Width="90%" Height="Fit" Spacing="2" >
<HorizontalStack Height="Fit" Tooltip="Frame per second">
<Label Text="Fps:" Style="FpsLabel"/>
- <Label Text="{fps}" Style="FpsDisp"/>
+ <Label Text="{minimum}" Style="FpsDisp"/>
</HorizontalStack>
<HorizontalStack Height="Fit" Tooltip="Minimum Frame per second">
<Label Text="Min:" Style="FpsLabel"/>
@@ -34,9 +34,9 @@
</HorizontalStack>
</VerticalStack>
</GroupBox>
- <Label Width="Stretched" Margin="3" Background="DimGray"/>
+ <Label Width="Stretched" Margin="3" Background="DimGrey"/>
<TextBox Text="TextBox" Multiline="true" Margin="3"/>
- <HorizontalStack Height="Fit" Margin="5" Background="DimGray" CornerRadius="10">
+ <HorizontalStack Height="Fit" Margin="5" Background="DimGrey" CornerRadius="10">
<VerticalStack Spacing="5" Width="50%">
<CheckBox Fit="true" Caption="test"/>
<CheckBox Fit="true"/>
@@ -51,26 +51,26 @@
</VerticalStack>
</HorizontalStack>
<HorizontalStack Height="Fit" Margin="5">
- <Label Text="MouseEvents" Width="50%" Margin="3"
+ <Label Text="MouseEvents" Width="50%" Margin="3" Focusable="true"
Background="Jet"
- Foreground="DimGray"
+ Foreground="DimGrey"
TextAlignment="Center"
MouseEnter="{Foreground=White}"
- MouseLeave="{Foreground=DimGray}"
+ MouseLeave="{Foreground=DimGrey}"
MouseDown="{Background=DarkRed}"
MouseClick="{Foreground=Green}"
MouseDoubleClick="{Foreground=Yellow}"
MouseUp="{Background=Jet}"/>
<Label Text="MouseEvents" Width="50%" Margin="3"
Background="Jet"
- Foreground="DimGray"
+ Foreground="DimGrey"
TextAlignment="Center"
MouseClick="{Foreground=Green}"
MouseDoubleClick="{Foreground=Yellow}"
MouseEnter="{Foreground=White}"
- MouseLeave="{Foreground=DimGray}"
+ MouseLeave="{Foreground=DimGrey}"
MouseDown="{Background=SeaGreen}"
- MouseUp="{Background=DimGray}"/>
+ MouseUp="{Background=DimGrey}"/>
</HorizontalStack>
<GroupBox Caption="Templated controls" Height="Fit" Margin="5">
<HorizontalStack Height="Fit">
@@ -101,20 +101,20 @@
<Splitter/>
<VerticalStack Width="40%" Margin="5" Spacing="5">
<Expandable>
- <Image Path="#Crow.Images.Icons.crow.svg"/>
+ <Image Path="#Crow.Icons.crow.svg"/>
</Expandable>
<Popper>
- <Border Fit="True" Background="DimGray" CornerRadius="0" BorderWidth="1">
- <Image Path="#Crow.Images.Icons.crow.svg" Width="100" Height="100" Margin="10"
- MouseEnter="{Background=LightGray}"
+ <Border Fit="True" Background="DimGrey" CornerRadius="0" BorderWidth="1">
+ <Image Path="#Crow.Icons.crow.svg" Width="100" Height="100" Margin="10"
+ MouseEnter="{Background=LightGrey}"
MouseLeave="{Background=Transparent}"/>
</Border>
</Popper>
<Slider Height="10" Width="90%"/>
- <Container Height="Fit" Width="200" Background="DimGray" Margin="2" CornerRadius="5">
- <ProgressBar Background="DimGray" Height="10" Value="50"/>
+ <Container Height="Fit" Width="200" Background="DimGrey" Margin="2" CornerRadius="5">
+ <ProgressBar Background="DimGrey" Height="10" Value="50"/>
</Container>
- <Image Path="#Crow.Images.Icons.crow.svg" Width="60" Height="60" Background="LightGray" />
+ <Image Path="#Crow.Icons.crow.svg" Width="60" Height="60" Background="LightGrey" />
<!-- <TabView Name="tabview1"
Height="120" Orientation="Horizontal" Spacing="15">
<TabItem Name="TabItem1" Caption="Tab 1" Margin="0">
@@ -125,7 +125,7 @@
<CheckBox/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem2" Caption="Tab 2" Background="Gray">
+ <TabItem Name="TabItem2" Caption="Tab 2" Background="Grey">
<VerticalStack Fit="true">
<RadioButton/>
<RadioButton/>
@@ -133,7 +133,7 @@
<RadioButton/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem3" Caption="Tab 3" Background="Gray">
+ <TabItem Name="TabItem3" Caption="Tab 3" Background="Grey">
<Container Margin="5" CornerRadius="2">
<TextBox Height="Stretched" Margin="5" Multiline="true" TextAlignment="TopLeft"/>
</Container>
@@ -154,8 +154,8 @@
</Border>
<Splitter/>-->
<ListBox Name="colorList" Data="{TestList}" Margin="5"
- ItemTemplate="#Tests.Interfaces.colorItem.crow"
- Template="#Crow.Templates.ScrollingListBox.template"
+ ItemTemplate="Interfaces/colorItem.crow"
+ Template="#Crow.ScrollingListBox.template"
/>
</VerticalStack>
</HorizontalStack>
diff --git a/Tests/Interfaces/Divers/3.crow b/Tests/Interfaces/Divers/3.crow
index 5ec5c696..a1f5e95d 100755
--- a/Tests/Interfaces/Divers/3.crow
+++ b/Tests/Interfaces/Divers/3.crow
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<HorizontalStack Fit="true">
<VerticalStack Fit="true" Name="vsFps" Spacing="10" >
- <ProgressBar CornerRadius="5" Background="DimGray" Margin="1" Maximum="1000" Value="{fps}" Width="200" Height="15"/>
+ <ProgressBar CornerRadius="5" Background="DimGrey" Margin="1" Maximum="1000" Value="{fps}" Width="200" Height="15"/>
<HorizontalStack Fit="true">
<Label Text="Memory:" Width="50" TextAlignment="Right"/>
<Label Text="{memory}" Font="droid,12" TextAlignment="Center"
diff --git a/Tests/Interfaces/Divers/5.crow b/Tests/Interfaces/Divers/5.crow
index 53040f93..7489642a 100755
--- a/Tests/Interfaces/Divers/5.crow
+++ b/Tests/Interfaces/Divers/5.crow
@@ -20,10 +20,10 @@
<GroupBox Caption="Group box" >
<Label Text="border test" Margin="3"/>
</GroupBox>
- <Container Fit="true" Background="DimGray" Margin="3">
- <GraphicObject Width="20" Height="20" Background="LightGray"/>
+ <Container Fit="true" Background="DimGrey" Margin="3">
+ <GraphicObject Width="20" Height="20" Background="LightGrey"/>
</Container>-->
-<!-- <ProgressBar Height="10" Width="150" Background="DimGray" Value="50" />
+<!-- <ProgressBar Height="10" Width="150" Background="DimGrey" Value="50" />
<Slider Value="5" Width="150" Height="10"/>
<ScrollBar Orientation="Horizontal" Maximum="100" Value="50" Height="16" Width="150"/>
<Spinner Value="100"/>-->
@@ -48,10 +48,10 @@
<GroupBox Caption="Group box" Width="Stretched">
<Label Text="border test" Margin="3"/>
</GroupBox>
- <Container Height="Fit" Width="Stretched" Background="DimGray" Margin="3">
- <GraphicObject Width="20" Height="20" Background="LightGray"/>
+ <Container Height="Fit" Width="Stretched" Background="DimGrey" Margin="3">
+ <GraphicObject Width="20" Height="20" Background="LightGrey"/>
</Container>
- <ProgressBar Height="10" Width="Stretched" Background="DimGray" Value="50" />
+ <ProgressBar Height="10" Width="Stretched" Background="DimGrey" Value="50" />
<Slider Value="5" Width="Stretched" Height="10"/>
<ScrollBar Orientation="Horizontal" Maximum="100" Value="50" Height="16" Width="Stretched"/>
<Spinner Value="100" Width="Stretched"/>
diff --git a/Tests/Interfaces/Divers/6.crow b/Tests/Interfaces/Divers/6.crow
index c37ca360..f537a71d 100755
--- a/Tests/Interfaces/Divers/6.crow
+++ b/Tests/Interfaces/Divers/6.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack Fit="true" Background="DimGray" Margin="5">
+<VerticalStack Fit="true" Background="DimGrey" Margin="5">
<!-- <RadioButton/>-->
<Label Text="a" Width="Stretched" Background="Red"/>
<Label Text="{fps}" HorizontalAlignment="Right" Background="LimeGreen"/>
diff --git a/Tests/Interfaces/Divers/clip0.crow b/Tests/Interfaces/Divers/clip0.crow
index 8cdf459b..0dee2ef1 100755
--- a/Tests/Interfaces/Divers/clip0.crow
+++ b/Tests/Interfaces/Divers/clip0.crow
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<Container Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=Gray}"
+ MouseEnter="{Background=Grey}"
MouseLeave="{Background=LimeGreen}">
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="false"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{drawing}" Background="RoyalBlue"/>
</Container> \ No newline at end of file
diff --git a/Tests/Interfaces/Divers/clip1.crow b/Tests/Interfaces/Divers/clip1.crow
index 1e202d90..bc4c9279 100755
--- a/Tests/Interfaces/Divers/clip1.crow
+++ b/Tests/Interfaces/Divers/clip1.crow
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Container Fit="true" Margin="20" Background="SkyBlue" CacheEnabled="false"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=LightGray}"
+ MouseEnter="{Background=LightGrey}"
MouseLeave="{Background=SkyBlue}">
<Container Fit="true" Margin="20" Background="Red" CacheEnabled="true"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
@@ -13,10 +13,10 @@
MouseLeave="{Background=Yellow}">
<Container Margin="50" Background="LimeGreen" CacheEnabled="true"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=Gray}"
+ MouseEnter="{Background=Grey}"
MouseLeave="{Background=LimeGreen}">
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}"
+ MouseEnter="{Background=DimGrey}"
MouseLeave="{Background=RoyalBlue}"
Margin="1" Text="{drawing}" Background="RoyalBlue"/>
</Container>
diff --git a/Tests/Interfaces/Divers/clip2.crow b/Tests/Interfaces/Divers/clip2.crow
index 198d9113..9292150f 100755
--- a/Tests/Interfaces/Divers/clip2.crow
+++ b/Tests/Interfaces/Divers/clip2.crow
@@ -1,14 +1,14 @@
<?xml version="1.0"?>
<Group Fit="true" Margin="50" Background="Yellow" CacheEnabled="true"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=DimGray}"
+ MouseEnter="{Background=DimGrey}"
MouseLeave="{Background=Yellow}">
<Group Width="300" Height="200" Margin="50" Background="LimeGreen" CacheEnabled="false"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=Gray}"
+ MouseEnter="{Background=Grey}"
MouseLeave="{Background=LimeGreen}">
<Label Left="10" HorizontalAlignment="Right" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{drawing}" Background="RoyalBlue"/>
</Group>
diff --git a/Tests/Interfaces/Divers/clip3.crow b/Tests/Interfaces/Divers/clip3.crow
index 2bb7c357..82a98881 100755
--- a/Tests/Interfaces/Divers/clip3.crow
+++ b/Tests/Interfaces/Divers/clip3.crow
@@ -1,32 +1,32 @@
<?xml version="1.0"?>
<Group Fit="true" Margin="50" Background="Yellow" CacheEnabled="true"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=DimGray}"
+ MouseEnter="{Background=DimGrey}"
MouseLeave="{Background=Yellow}">
<HorizontalStack Fit="true">
<VerticalStack Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=Gray}"
+ MouseEnter="{Background=Grey}"
MouseLeave="{Background=LimeGreen}">
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{fps}" Background="RoyalBlue"/>
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{drawing}" Background="RoyalBlue"/>
</VerticalStack>
<VerticalStack Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=Gray}"
+ MouseEnter="{Background=Grey}"
MouseLeave="{Background=LimeGreen}">
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{fpsMax}" Background="RoyalBlue"/>
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{fpsMin}" Background="RoyalBlue"/>
</VerticalStack>
diff --git a/Tests/Interfaces/Divers/clip4.crow b/Tests/Interfaces/Divers/clip4.crow
index 71a887ab..5caaf771 100755
--- a/Tests/Interfaces/Divers/clip4.crow
+++ b/Tests/Interfaces/Divers/clip4.crow
@@ -1,38 +1,38 @@
<?xml version="1.0"?>
<Border Fit="true" BorderWidth="2" >
-<Scroller CornerRadius="2" Height="200" Width="300" Background="DimGray" Margin="2">
+<Scroller CornerRadius="2" Height="200" Width="300" Background="DimGrey" Margin="2">
<VerticalStack Margin="10" VerticalAlignment="Top" Fit="true" Background="vgradient|0:RoyalBlue|1:Black" >
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 1"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 2"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 3"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 4"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 5"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 6"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 7"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 8"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 9"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 10"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 11"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 12"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 13"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 14"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 15"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 16"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 17"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 18"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 19"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 20"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 21"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 22"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 23"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 24"/>
- <Label MouseEnter="{Background=Gray}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 25"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 1"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 2"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 3"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 4"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 5"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 6"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 7"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 8"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 9"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 10"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 11"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 12"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 13"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 14"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 15"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 16"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 17"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 18"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 19"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 20"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 21"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 22"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 23"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 24"/>
+ <Label MouseEnter="{Background=Grey}" MouseLeave="{Background=hgradient|0:DarkRed|1:Transparent}" Margin="5" Background="hgradient|0:DarkRed|1:Transparent" Font="droid,20" Text="label 25"/>
</VerticalStack>
</Scroller>
</Border>
<!--<VerticalStack Fit="true" Margin="50" Background="LimeGreen" CacheEnabled="false"
HorizontalAlignment="Right" VerticalAlignment="Bottom"
- MouseEnter="{Background=Gray}"
+ MouseEnter="{Background=Grey}"
MouseLeave="{Background=LimeGreen}">
<CheckBox Margin="20" Background="RoyalBlue"/>
@@ -48,11 +48,11 @@
<CheckBox/>
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{fps}" Background="RoyalBlue"/>
<Label HorizontalAlignment="Center" VerticalAlignment="Center" CacheEnabled="true"
- MouseEnter="{Background=DimGray}" Width="100"
+ MouseEnter="{Background=DimGrey}" Width="100"
MouseLeave="{Background=RoyalBlue}"
Margin="10" Text="{drawing}" Background="RoyalBlue"/>
</VerticalStack>--> \ No newline at end of file
diff --git a/Tests/Interfaces/Divers/colorPicker.crow b/Tests/Interfaces/Divers/colorPicker.crow
index fdfd8f3c..a081946f 100755
--- a/Tests/Interfaces/Divers/colorPicker.crow
+++ b/Tests/Interfaces/Divers/colorPicker.crow
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<VerticalStack>
- <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="DimGray" Margin="5" Fit="True" />
+ <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Margin="5" Fit="True" />
<GraphicObject Name="go" Width="100" Height="60" Background="DarkBlue"/>
<GraphicObject Name="go" Width="100" Height="60" Background="{../colorPicker.SelectedColor}"/>
<Label Text="{../colorPicker.SelectedColor}"/>
diff --git a/Tests/Interfaces/Divers/perfMeasures.crow b/Tests/Interfaces/Divers/perfMeasures.crow
index c0d0d8b9..ec13cf0e 100755
--- a/Tests/Interfaces/Divers/perfMeasures.crow
+++ b/Tests/Interfaces/Divers/perfMeasures.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Window Focusable="true" Caption="Measures" Width="30%" Height="Fit" MinimumSize="100,100">
+<Window Focusable="true" Caption="Measures" Width="30%" Height="300" MinimumSize="100,100">
<ListBox Data="{PerfMeasures}"
ItemTemplate="#Tests.Interfaces.perfMsr.crow"/>
</Window>
diff --git a/Tests/Interfaces/Divers/testDisable.crow b/Tests/Interfaces/Divers/testDisable.crow
index 85a3d3b9..68d1cebb 100644
--- a/Tests/Interfaces/Divers/testDisable.crow
+++ b/Tests/Interfaces/Divers/testDisable.crow
@@ -6,8 +6,8 @@
<Label Text="{fps}" IsEnabled="true" Font="30"/>
<Label Text="{fps}" IsEnabled="false" Font="30" Background="SeaGreen"/>
<Label Text="{fps}" IsEnabled="true" Font="30" Background="SeaGreen"/>
- <Button Caption="Button" IsEnabled="true" Background="Gray"/>
- <Button Caption="Button" IsEnabled="false" Background="Gray"/>
+ <Button Caption="Button" IsEnabled="true" Background="Grey"/>
+ <Button Caption="Button" IsEnabled="false" Background="Grey"/>
<Button Caption="Button" IsEnabled="true" />
<Button Caption="Button" IsEnabled="false" />
<Spinner Fit="true"/>
diff --git a/Tests/Interfaces/Divers/testFocus.crow b/Tests/Interfaces/Divers/testFocus.crow
new file mode 100755
index 00000000..97a57457
--- /dev/null
+++ b/Tests/Interfaces/Divers/testFocus.crow
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<VerticalStack>
+ <Menu>
+ <MenuItem Caption="File" Width="Fit">
+ <MenuItem Command="{CMDTest}"/>
+ <MenuItem Caption="Open"/>
+ <MenuItem Caption="Save"/>
+ <MenuItem Caption="Quit"/>
+ </MenuItem>
+ <MenuItem Caption="Edit" Name="edit" Width="Fit">
+ <MenuItem Caption="Cut"/>
+ <MenuItem Caption="Copy"/>
+ <MenuItem Caption="Paste"/>
+ <MenuItem Caption="Special" Name="special" Width="Fit">
+ <MenuItem Caption="Cut"/>
+ <MenuItem Caption="Copy"/>
+ <MenuItem Caption="Paste"/>
+ </MenuItem>
+ <MenuItem Caption="Special2" Name="special" Width="Fit">
+ <MenuItem Caption="Cut"/>
+ <MenuItem Caption="Copy"/>
+ <MenuItem Caption="Paste"/>
+ </MenuItem>
+ </MenuItem>
+ <MenuItem Caption="Help" Width="Fit">
+ <MenuItem Caption="About"/>
+ <MenuItem Caption="Help"/>
+ </MenuItem>
+ </Menu>
+ <HorizontalStack Height="Fit">
+ <Label Text="Hover:" Width="50" Foreground="Grey"/>
+ <Label Text="{HoverWidget}"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Focus:" Width="50" Foreground="Grey"/>
+ <Label Text="{FocusedWidget}"/>
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Active:" Width="50" Foreground="Grey"/>
+ <Label Text="{ActiveWidget}"/>
+ </HorizontalStack>
+ <Container Fit="true" Margin="50" Background="SlateGrey">
+ <Label Text="MouseEvents" Margin="3" Focusable="true" Fit="true"
+ Background="Jet"
+ Foreground="DimGrey"
+ TextAlignment="Center"
+ MouseEnter="{Foreground=White}"
+ MouseLeave="{Foreground=DimGrey}"
+ MouseDown="{Background=DarkRed}"
+ MouseClick="{Foreground=Green}"
+ MouseDoubleClick="{Foreground=Yellow}"
+ MouseUp="{Background=Jet}"/>
+ </Container>
+ <TextBox Width="300" Margin="10"/>
+ <Slider Width="300" Height="12"/>
+ <ComboBox Data="{TestList}" Width="120">
+ <ItemTemplate DataType="Crow.Color">
+ <HorizontalStack
+ HorizontalAlignment="Left"
+ Height="Fit" Width="200" Margin="1" Focusable="true"
+ MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}"
+ MouseLeave="{Background=Transparent}">
+ <GraphicObject Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/>
+ <Label Text="{}" Margin="0" Width="Stretched"/>
+ </HorizontalStack>
+ </ItemTemplate>
+ </ComboBox>
+ <HorizontalStack Height="Fit" Margin="1" Background="DimGrey" Width="200">
+ <VerticalStack Spacing="2" Width="50%">
+ <CheckBox Caption="test" MouseEnter="{Background=Blue}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox />
+ <CheckBox />
+ <CheckBox IsChecked="true"/>
+ </VerticalStack>
+ <VerticalStack Spacing="2" Width="50%">
+ <RadioButton Fit="true"/>
+ <RadioButton Fit="true" IsChecked="true"/>
+ <RadioButton Fit="true"/>
+ <RadioButton Fit="true"/>
+ </VerticalStack>
+ </HorizontalStack>
+</VerticalStack>
diff --git a/Tests/Interfaces/Divers/testImage.crow b/Tests/Interfaces/Divers/testImage.crow
index eddea8aa..ccdd87c0 100755
--- a/Tests/Interfaces/Divers/testImage.crow
+++ b/Tests/Interfaces/Divers/testImage.crow
@@ -41,24 +41,24 @@
</HorizontalStack>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="SCALED PROPORTIONNAL" Width="150"/>
- <Image Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Margin="10" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Background="Blue" Width="50" Height="100" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image Background="Blue" Path="#Crow.Icons.tetra.png"/>
+ <Image Margin="10" Background="Blue" Path="#Crow.Icons.tetra.png"/>
+ <Image Background="Blue" Width="20" Height="20" Path="#Crow.Icons.tetra.png"/>
+ <Image Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.Icons.tetra.png"/>
+ <Image Background="Blue" Width="50" Height="100" Path="#Crow.Icons.tetra.png"/>
<Image Margin="10" Background="Blue" Width="50" Height="100" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Margin="10" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
- <Image Margin="10" Background="Blue" Width="50" Height="Fit" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image Background="Blue" Width="100" Height="50" Path="#Crow.Icons.tetra.png"/>
+ <Image Margin="10" Background="Blue" Width="100" Height="50" Path="#Crow.Icons.tetra.png"/>
+ <Image Background="Blue" Width="50" Height="Fit" Path="#Crow.Icons.tetra.png"/>
+ <Image Margin="10" Background="Blue" Width="50" Height="Fit" Path="#Crow.Icons.tetra.png"/>
</HorizontalStack>
<HorizontalStack Fit="true" Background="hgradient|0:DarkRed|1:Transparent" Margin="5">
<Label Text="SCALED NOT PROPORTIONNAL" Width="150"/>
- <Image KeepProportions="false" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
- <Image KeepProportions="false" Margin="10" Background="Blue" Path="#Crow.Images.Icons.tetra.png"/>
- <Image KeepProportions="false" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
- <Image KeepProportions="false" Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.Images.Icons.tetra.png"/>
- <Image KeepProportions="false" Background="Blue" Width="50" Height="100" Path="#Crow.Images.Icons.tetra.png"/>
+ <Image KeepProportions="false" Background="Blue" Path="#Crow.Icons.tetra.png"/>
+ <Image KeepProportions="false" Margin="10" Background="Blue" Path="#Crow.Icons.tetra.png"/>
+ <Image KeepProportions="false" Background="Blue" Width="20" Height="20" Path="#Crow.Icons.tetra.png"/>
+ <Image KeepProportions="false" Margin="2" Background="Blue" Width="20" Height="20" Path="#Crow.Icons.tetra.png"/>
+ <Image KeepProportions="false" Background="Blue" Width="50" Height="100" Path="#Crow.Icons.tetra.png"/>
<Image KeepProportions="false" Margin="10" Background="Blue" Width="50" Height="100" Path="#Crow.Images.Icons.tetra.png"/>
<Image KeepProportions="false" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
<Image KeepProportions="false" Margin="10" Background="Blue" Width="100" Height="50" Path="#Crow.Images.Icons.tetra.png"/>
diff --git a/Tests/Interfaces/Divers/testMenu.crow b/Tests/Interfaces/Divers/testMenu.crow
new file mode 100755
index 00000000..08822445
--- /dev/null
+++ b/Tests/Interfaces/Divers/testMenu.crow
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<Menu>
+ <MenuItem Caption="File" Width="Fit">
+ <MenuItem Command="{CMDTest}"/>
+ </MenuItem>
+</Menu>
diff --git a/Tests/Interfaces/Divers/testOutOfClipUpdate.crow b/Tests/Interfaces/Divers/testOutOfClipUpdate.crow
index 738f2b11..22523b8c 100755
--- a/Tests/Interfaces/Divers/testOutOfClipUpdate.crow
+++ b/Tests/Interfaces/Divers/testOutOfClipUpdate.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Container Width="200" Height="100" Background="DimGray" Margin="5">
+<Container Width="200" Height="100" Background="DimGrey" Margin="5">
<Container Width="Stretched" Height="800" Background="DarkBlue">
<Label Text="{fps}" Background="RoyalBlue" VerticalAlignment="Center"/>
</Container>
diff --git a/Tests/Interfaces/Divers/testPropLess.crow b/Tests/Interfaces/Divers/testPropLess.crow
index 52742477..42282c11 100755
--- a/Tests/Interfaces/Divers/testPropLess.crow
+++ b/Tests/Interfaces/Divers/testPropLess.crow
@@ -1,2 +1,2 @@
<?xml version="1.0"?>
-<Label Margin="50" MinimumSize="10,10" Background="DimGray" Text="{PropertyLessBinding}"/> \ No newline at end of file
+<Label Margin="50" MinimumSize="10,10" Background="DimGrey" Text="{PropertyLessBinding}"/> \ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testShape.crow b/Tests/Interfaces/Divers/testShape.crow
index 4adada39..d1f9f3cc 100644
--- a/Tests/Interfaces/Divers/testShape.crow
+++ b/Tests/Interfaces/Divers/testShape.crow
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<Container Fit="true" Background="Red" Tooltip="test tooltip" >
- <Shape Foreground="Transparent" Background="DimGray" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"
- MouseEnter="{Background=hgradient|0:DimGray|0.5:RoyalBlue|1:Black}"
- MouseLeave="{Background=DimGray}"/>
+ <Shape Foreground="Transparent" Background="DimGrey" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z"
+ MouseEnter="{Background=hgradient|0:DimGrey|0.5:RoyalBlue|1:Black}"
+ MouseLeave="{Background=DimGrey}"/>
</Container> \ No newline at end of file
diff --git a/Tests/Interfaces/Divers/testStacks.crow b/Tests/Interfaces/Divers/testStacks.crow
index ac2cccc6..99279cd4 100755
--- a/Tests/Interfaces/Divers/testStacks.crow
+++ b/Tests/Interfaces/Divers/testStacks.crow
@@ -1,82 +1,82 @@
<?xml version="1.0"?>
<Window Width="500" Height="300" MinimumSize="50,50">
-<HorizontalStack Margin="5" Background="DimGray">
- <VerticalStack Width="200" Margin="5" Background="Gray">
- <VerticalStack Fit="true" Background="DimGray" Margin="5">
+<HorizontalStack Margin="5" Background="DimGrey">
+ <VerticalStack Width="200" Margin="5" Background="Grey">
+ <VerticalStack Fit="true" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</VerticalStack>
- <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+ <VerticalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="Stretched"/>
<TextRun Background="SkyBlue" Height="Stretched"/>
</VerticalStack>
- <HorizontalStack Fit="true" Background="DimGray" Margin="5">
+ <HorizontalStack Fit="true" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+ <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
+ <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="Stretched"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
</VerticalStack>
- <VerticalStack Width="Stretched" Height="Stretched" Margin="5" Background="Gray">
- <VerticalStack Fit="true" Background="DimGray" Margin="5">
+ <VerticalStack Width="Stretched" Height="Stretched" Margin="5" Background="Grey">
+ <VerticalStack Fit="true" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</VerticalStack>
- <VerticalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
+ <VerticalStack Width="Stretched" Height="Stretched" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="Stretched"/>
<TextRun TextAlignment="Center" Background="SkyBlue" Width="Stretched" Height="Stretched"/>
</VerticalStack>
- <HorizontalStack Fit="true" Background="DimGray" Margin="5">
+ <HorizontalStack Fit="true" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+ <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+ <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="Stretched"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
</VerticalStack>
- <VerticalStack Width="Fit" Margin="5" Background="Gray">
- <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+ <VerticalStack Width="Fit" Margin="5" Background="Grey">
+ <VerticalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue" HorizontalAlignment="Left"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</VerticalStack>
- <VerticalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+ <VerticalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="Stretched"/>
<TextRun Background="SkyBlue" Height="Stretched"/>
</VerticalStack>
- <HorizontalStack Fit="true" Background="DimGray" Margin="5">
+ <HorizontalStack Fit="true" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="Stretched" Height="Fit" Background="DimGray" Margin="5">
+ <HorizontalStack Width="Stretched" Height="Fit" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue"/>
</HorizontalStack>
- <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGray" Margin="5">
+ <HorizontalStack Width="Stretched" Height="Stretched" Background="DimGrey" Margin="5">
<TextRun Background="SkyBlue"/>
<TextRun Background="SkyBlue" Width="Stretched"/>
<TextRun Background="SkyBlue"/>
diff --git a/Tests/Interfaces/Divers/testTextBox.crow b/Tests/Interfaces/Divers/testTextBox.crow
index 8a98ff84..d0fe0af4 100755
--- a/Tests/Interfaces/Divers/testTextBox.crow
+++ b/Tests/Interfaces/Divers/testTextBox.crow
@@ -1,24 +1,24 @@
<?xml version="1.0"?>
<VerticalStack Background="SteelBlue" Fit="true">
<HorizontalStack Fit="true">
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="TopLeft"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Top"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="TopRight"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Left"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Center"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Right"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="BottomLeft"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="Bottom"/>
- <TextBox Background="DarkGray" Height="30" Width="50" TextAlignment="BottomRight"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="TopLeft"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Top"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="TopRight"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Left"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Center"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Right"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="BottomLeft"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="Bottom"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" TextAlignment="BottomRight"/>
</HorizontalStack>
<HorizontalStack Fit="true">
- <TextBox Background="DarkGray" Height="30" Width="70" TextAlignment="Top" HorizontalStretch="true" Text="TopStretch"/>
- <TextBox Background="DarkGray" Height="30" Width="60" TextAlignment="Center" HorizontalStretch="true" Text="HorizontalStretch" />
- <TextBox Background="DarkGray" Height="30" Width="60" TextAlignment="Bottom" HorizontalStretch="true" Text="BottomStretch"/>
- <TextBox Background="DarkGray" Height="10" Width="70" TextAlignment="Left" VerticalStretch="true" Text="LeftStretch"/>
- <TextBox Background="DarkGray" Height="10" Width="70" TextAlignment="Center" VerticalStretch="true" Text="VerticalStretch"/>
- <TextBox Background="DarkGray" Height="10" Width="70" TextAlignment="Right" VerticalStretch="true" Text="RightStretch"/>
- <TextBox Background="DarkGray" Height="30" Width="50" HorizontalStretch="true" VerticalStretch="true" Text="Fit"/>
+ <TextBox Background="DarkGrey" Height="30" Width="70" TextAlignment="Top" HorizontalStretch="true" Text="TopStretch"/>
+ <TextBox Background="DarkGrey" Height="30" Width="60" TextAlignment="Center" HorizontalStretch="true" Text="HorizontalStretch" />
+ <TextBox Background="DarkGrey" Height="30" Width="60" TextAlignment="Bottom" HorizontalStretch="true" Text="BottomStretch"/>
+ <TextBox Background="DarkGrey" Height="10" Width="70" TextAlignment="Left" VerticalStretch="true" Text="LeftStretch"/>
+ <TextBox Background="DarkGrey" Height="10" Width="70" TextAlignment="Center" VerticalStretch="true" Text="VerticalStretch"/>
+ <TextBox Background="DarkGrey" Height="10" Width="70" TextAlignment="Right" VerticalStretch="true" Text="RightStretch"/>
+ <TextBox Background="DarkGrey" Height="30" Width="50" HorizontalStretch="true" VerticalStretch="true" Text="Fit"/>
</HorizontalStack>
<TextBox Name="tb" Multiline="true" Font="droid,16" Margin="5" Text="A\nBB\nCCC\nDDDD"/>
<TextBox Multiline="true" Font="droid,16" Name="tb5" Margin="5" Text="{../tb.SelectedText}"/>
diff --git a/Tests/Interfaces/Divers/testVisibility.crow b/Tests/Interfaces/Divers/testVisibility.crow
new file mode 100755
index 00000000..70abcbdb
--- /dev/null
+++ b/Tests/Interfaces/Divers/testVisibility.crow
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<Container Margin="20" Background="Red" >
+ <Container Margin="20" Background="Green" MouseDown="{../go1.Visible=True}" >
+ <GraphicObject Name="go1" Margin="20" Background="DimGrey" Visible="false" MouseDown="{Visible=false}"
+ MouseEnter="{Background=Blue}"
+ MouseLeave="{Background=DimGrey}"/>
+ </Container>
+</Container>
diff --git a/Tests/Interfaces/Divers/welcome.crow b/Tests/Interfaces/Divers/welcome.crow
index 22dfd749..fb251487 100644
--- a/Tests/Interfaces/Divers/welcome.crow
+++ b/Tests/Interfaces/Divers/welcome.crow
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Border BorderStyle="Sunken" Fit="true" Background="0.7,0.7,0.7,0.5" CornerRadius="10">
<VerticalStack Margin="20">
- <Image Path="#Crow.Images.Icons.crow.svg"/>
+ <Image Path="#Crow.Icons.crow.svg"/>
<!-- <Label Font="Times bold, 60" Text="C.R.O.W"/>-->
<HorizontalStack Fit="true" DataSource="{CrowVersion}" Spacing="0">
<Label Foreground="Black" Font="mono, 12" Text="version: "/>
@@ -9,13 +9,13 @@
<Label Foreground="Black" Font="mono, 12" Text="."/>
<Label Foreground="Black" Font="mono, 12" Text="{Minor}"/>
<Label Foreground="Black" Font="mono, 12" Text="."/>
- <Label Foreground="DimGray" Font="mono, 12" Text="{Build}"/>
+ <Label Foreground="DimGrey" Font="mono, 12" Text="{Build}"/>
</HorizontalStack>
<GraphicObject Height="30"/>
<Label Font="20" Text="Press &lt;F2&gt; and &lt;F3&gt; to cycle into the examples"/>
<Label Font="20" Text="Those are basic tests used to validate changes,"/>
<GraphicObject Height="30"/>
- <Label Foreground="DimGray" Font="20" Text="&lt;F5&gt; => File dialog example"/>
- <Label Foreground="DimGray" Font="20" Text="&lt;F6&gt; => Window example"/>
+ <Label Foreground="DimGrey" Font="20" Text="&lt;F5&gt; => File dialog example"/>
+ <Label Foreground="DimGrey" Font="20" Text="&lt;F6&gt; => Window example"/>
</VerticalStack>
</Border> \ No newline at end of file
diff --git a/Tests/Interfaces/DragAndDrop/0.crow b/Tests/Interfaces/DragAndDrop/0.crow
index 356fa49a..ca1a7bb5 100755
--- a/Tests/Interfaces/DragAndDrop/0.crow
+++ b/Tests/Interfaces/DragAndDrop/0.crow
@@ -1,20 +1,20 @@
<?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%" Spacing="100" Focusable="true">
- <Container Name="source" StartDrag="{Background=DimGray}" EndDrag="{Background=SeaGreen}" Focusable="true" Fit="true"
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="90%" Spacing="100" Focusable="true">
+ <Container Name="source" StartDrag="{Background=DimGrey}" EndDrag="{Background=SeaGreen}" Focusable="true" Fit="true"
Drop="{../target.Background=Green}"
MouseEnter="{/txt.Foreground=Red}" MouseLeave="{/txt.Foreground=White}" MouseClick="{Background=SeaGreen}"
AllowDrag="true" Width="200" Height="200" Background="SeaGreen">
<VerticalStack Margin="50">
- <Label Name="txt" Text="Drag me" Foreground="Gray"/>
- <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Gray"/>
+ <Label Name="txt" Text="Drag me" Foreground="Grey"/>
+ <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Grey"/>
</VerticalStack>
</Container>
- <Container Name="target" DragEnter="{Background=SeaGreen}" DragLeave="{Background=DimGray}" Focusable="true" Fit="true"
+ <Container Name="target" DragEnter="{Background=SeaGreen}" DragLeave="{Background=DimGrey}" Focusable="true" Fit="true"
MouseEnter="{/txt.Foreground=Red}" MouseLeave="{/txt.Foreground=White}"
- AllowDrop="true" Background="DimGray">
+ AllowDrop="true" Background="DimGrey">
<VerticalStack Margin="50">
- <Label Name="txt" Text="Drop here" Foreground="Gray"/>
- <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Gray"/>
+ <Label Name="txt" Text="Drop here" Foreground="Grey"/>
+ <Label Text="Dragged" Visible="{../../IsDragged}" Foreground="Grey"/>
</VerticalStack>
</Container>
</HorizontalStack> \ No newline at end of file
diff --git a/Tests/Interfaces/Experimental/DockWindow.template b/Tests/Interfaces/Experimental/DockWindow.template
new file mode 100755
index 00000000..42f51163
--- /dev/null
+++ b/Tests/Interfaces/Experimental/DockWindow.template
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--<GraphicObject Background="{./Background}"/>-->
+<Border BorderWidth="1" Foreground="Black" CornerRadius="{./CornerRadius}"
+ Background="{./Background}"
+ MouseEnter="./onBorderMouseEnter"
+ MouseLeave="./onBorderMouseLeave">
+ <VerticalStack Spacing="0">
+ <HorizontalStack Height="Fit">
+ <Label Text="{./Name}" TextAlignment="Left" Width="Fit"
+ Foreground="White" />
+ <Label Text="{./DockingPosition}" TextAlignment="Left" Width="Fit"
+ Foreground="White" />
+ </HorizontalStack>
+ <Label Text="{./Width}" TextAlignment="Left" Width="Fit"
+ Foreground="White" />
+ <Label Text="{./Height}" TextAlignment="Left" Width="Fit"
+ Foreground="White" />
+
+ <HorizontalStack Visible="{./IsDocked}" Height="Fit" Margin="1" Background="Grey">
+ <Label Text="{./Caption}" TextAlignment="Left" Width="Stretched"
+ Foreground="Jet" />
+ <Image Width="8" Height="8" Focusable="true" Margin="0" Path="#Crow.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </HorizontalStack>
+ <HorizontalStack Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7"
+ Name="hs" Margin="0" Spacing="0" Height="Fit" Visible="{./IsFloating}">
+ <GraphicObject Width="5"/>
+ <Image Margin="1" Width="10" Height="10" Path="{./Icon}"/>
+ <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Left" Text="{./Caption}" />
+ <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="10" Width="10"
+ MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
+ <Image Focusable="true" Name="Image" Margin="0" Path="#Crow.Icons.exit2.svg"
+ MouseClick="./butQuitPress"/>
+ </Border>
+ <GraphicObject Width="5"/>
+ </HorizontalStack>
+ <Container Name="Content" MinimumSize="50,50"/>
+ </VerticalStack>
+</Border>
diff --git a/Tests/Interfaces/Experimental/testDock.crow b/Tests/Interfaces/Experimental/testDock.crow
index 94a936a6..c0e6e96b 100644
--- a/Tests/Interfaces/Experimental/testDock.crow
+++ b/Tests/Interfaces/Experimental/testDock.crow
@@ -1,16 +1,17 @@
<?xml version="1.0"?>
-<Window Height="50%" Width="60%">
- <DockStack Background="#60101050" Margin="10"/>
+<Window Width="Stretched" Height="Stretched" Background="Jet">
+ <DockStack Name="mainDock" Background="DarkRed" Margin="20">
+ </DockStack>
</Window>
-<!--- <DockWindow Left="400" Top="400" Width="150" Height="150" Background="MediumSeaGreen"/>
+<!---
<DockWindow Left="450" Top="450" Width="150" Height="150" Background="Maize"/>-->
-<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
- <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
- <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
- <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
- <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></Window>
+<!--<Group Background="DimGrey" Margin = "0" Focusable="true" >
+ <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Grey}" MouseLeave="{Background=Green}"/></Window>
+ <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></Window>
+ <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></Window>
+ <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></Window>
</Group>-->
<!--<Docker >
<DockWindow Resizable = "true" Top="100" Left="100" Caption="View 1" Width="300" Height="300">
@@ -20,7 +21,7 @@
<Label Text="{../../LogicalParent}" Background="Black"/>
</VerticalStack>
</DockWindow>
- <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></DockWindow>
- <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></DockWindow>
- <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></DockWindow>
+ <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></DockWindow>
+ <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></DockWindow>
+ <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></DockWindow>
</Docker>--> \ No newline at end of file
diff --git a/Tests/Interfaces/Experimental/testDock2.crow b/Tests/Interfaces/Experimental/testDock2.crow
index 700f965c..041d0d85 100644
--- a/Tests/Interfaces/Experimental/testDock2.crow
+++ b/Tests/Interfaces/Experimental/testDock2.crow
@@ -6,11 +6,11 @@
<DockWindow Left="400" Top="400" Width="150" Height="150" Background="DarkYellow"/>
<DockWindow Left="500" Top="500" Width="150" Height="150" Background="Yellow"/>
</Docker>
-<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
- <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
- <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
- <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
- <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></Window>
+<!--<Group Background="DimGrey" Margin = "0" Focusable="true" >
+ <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Grey}" MouseLeave="{Background=Green}"/></Window>
+ <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></Window>
+ <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></Window>
+ <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></Window>
</Group>-->
<!--<Docker >
<DockWindow Resizable = "true" Top="100" Left="100" Caption="View 1" Width="300" Height="300">
@@ -20,7 +20,7 @@
<Label Text="{../../LogicalParent}" Background="Black"/>
</VerticalStack>
</DockWindow>
- <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></DockWindow>
- <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></DockWindow>
- <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></DockWindow>
+ <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></DockWindow>
+ <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></DockWindow>
+ <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></DockWindow>
</Docker>--> \ No newline at end of file
diff --git a/Tests/Interfaces/Experimental/testStack.crow b/Tests/Interfaces/Experimental/testStack.crow
index 88e309dc..e17db3b1 100644
--- a/Tests/Interfaces/Experimental/testStack.crow
+++ b/Tests/Interfaces/Experimental/testStack.crow
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<Window Width="600" Height="500">
-<VerticalStack Margin="20" Background="DimGray" Spacing="10">
+<VerticalStack Margin="20" Background="DimGrey" Spacing="10">
<GraphicObject Height="100" Width="500" Background="Green"/>
<Splitter/>
<HorizontalStack>
@@ -12,11 +12,11 @@
<GraphicObject Height="100" Width="500" Background="Green"/>
</VerticalStack>
</Window>
-<!--<Group Background="DimGray" Margin = "0" Focusable="true" >
- <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Gray}" MouseLeave="{Background=Green}"/></Window>
- <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></Window>
- <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></Window>
- <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></Window>
+<!--<Group Background="DimGrey" Margin = "0" Focusable="true" >
+ <Window Top="100" Left="100" Focusable="true" Caption="View 1" Width="300" Height="300"><GraphicObject Background="Green" Focusable="true" MouseEnter="{Background=Grey}" MouseLeave="{Background=Green}"/></Window>
+ <Window Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></Window>
+ <Window Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></Window>
+ <Window Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></Window>
</Group>-->
<!--<Docker >
<DockWindow Resizable = "true" Top="100" Left="100" Caption="View 1" Width="300" Height="300">
@@ -26,7 +26,7 @@
<Label Text="{../../LogicalParent}" Background="Black"/>
</VerticalStack>
</DockWindow>
- <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Gray}" MouseLeave="{Background=Blue}"/></DockWindow>
- <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Gray}" MouseLeave="{Background=Yellow}"/></DockWindow>
- <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Gray}" MouseLeave="{Background=Black}"/></DockWindow>
+ <DockWindow Top="200" Left="200" Focusable="true" Caption="View 2" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Blue" MouseEnter="{Background=Grey}" MouseLeave="{Background=Blue}"/></DockWindow>
+ <DockWindow Top="300" Left="300" Focusable="true" Caption="View 3" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Yellow" MouseEnter="{Background=Grey}" MouseLeave="{Background=Yellow}"/></DockWindow>
+ <DockWindow Top="400" Left="400" Focusable="true" Caption="View 4" Resizable = "true" Width="300" Height="300"><GraphicObject Focusable="true" Background="Black" MouseEnter="{Background=Grey}" MouseLeave="{Background=Black}"/></DockWindow>
</Docker>--> \ No newline at end of file
diff --git a/Tests/Interfaces/GraphicObject/0.crow b/Tests/Interfaces/GraphicObject/0.crow
index 7fdd607f..97cda8a0 100755
--- a/Tests/Interfaces/GraphicObject/0.crow
+++ b/Tests/Interfaces/GraphicObject/0.crow
@@ -1,3 +1,2 @@
<?xml version="1.0"?>
-<GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
- MinimumSize="50,50"/> \ No newline at end of file
+<GraphicObject Background="SeaGreen"/> \ No newline at end of file
diff --git a/Tests/Interfaces/Group/0.crow b/Tests/Interfaces/Group/0.crow
index 9195ed4f..836231de 100755
--- a/Tests/Interfaces/Group/0.crow
+++ b/Tests/Interfaces/Group/0.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Group MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+<Group MinimumSize="50,50" Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
VerticalAlignment="Top"
MinimumSize="10,10"/>
diff --git a/Tests/Interfaces/Group/1.crow b/Tests/Interfaces/Group/1.crow
index 4f355f9b..540d4192 100755
--- a/Tests/Interfaces/Group/1.crow
+++ b/Tests/Interfaces/Group/1.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Width="90%" Height="90%">
+<Group Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
VerticalAlignment="Top"
HorizontalAlignment="Left"
diff --git a/Tests/Interfaces/Group/2.crow b/Tests/Interfaces/Group/2.crow
index de743d3a..6982fc2b 100755
--- a/Tests/Interfaces/Group/2.crow
+++ b/Tests/Interfaces/Group/2.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Fit="true">
+<Group Background="DimGrey" Margin="10" Fit="true">
<GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
VerticalAlignment="Top"
HorizontalAlignment="Left"
diff --git a/Tests/Interfaces/Group/3.crow b/Tests/Interfaces/Group/3.crow
index e323fd08..b6482063 100755
--- a/Tests/Interfaces/Group/3.crow
+++ b/Tests/Interfaces/Group/3.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Width="70%" Height="50%">
+<Group Background="DimGrey" Margin="10" Width="70%" Height="50%">
<GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
VerticalAlignment="Top"
HorizontalAlignment="Left"
diff --git a/Tests/Interfaces/Group/4.crow b/Tests/Interfaces/Group/4.crow
index b7704d5b..815ef495 100755
--- a/Tests/Interfaces/Group/4.crow
+++ b/Tests/Interfaces/Group/4.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Group Background="DimGray" Margin="10" Fit="true">
+<Group Background="DimGrey" Margin="10" Fit="true">
<Label Font="droid bold,40" Text="{fps}" Margin="10" Fit="true"/>
<GraphicObject Margin="10" Width="20%" Height="20%" Background="SeaGreen"
VerticalAlignment="Top"
diff --git a/Tests/Interfaces/Splitter/1.crow b/Tests/Interfaces/Splitter/1.crow
index e7eef87b..48c1ea1e 100755
--- a/Tests/Interfaces/Splitter/1.crow
+++ b/Tests/Interfaces/Splitter/1.crow
@@ -19,7 +19,7 @@
</Border>
<Splitter Thickness="3"/>
<Border Width="45%" CornerRadius="10" BorderWidth="1">
- <VerticalStack Width="50%" Height="50%" Background="DimGray">
+ <VerticalStack Width="50%" Height="50%" Background="DimGrey">
<RadioButton IsChecked="false" Caption="Choice 1" Background="hgradient|0:DarkRed|1:Transparent"/>
<RadioButton IsChecked="false" Caption="Choice 2" Background="hgradient|0:DarkRed|1:Transparent"/>
<RadioButton IsChecked="true" Caption="Choice 3" Background="hgradient|0:DarkRed|1:Transparent"/>
diff --git a/Tests/Interfaces/Stack/0.crow b/Tests/Interfaces/Stack/0.crow
index 467a063e..1cdc4981 100755
--- a/Tests/Interfaces/Stack/0.crow
+++ b/Tests/Interfaces/Stack/0.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+<VerticalStack MinimumSize="50,50" Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
MinimumSize="10,10"/>
<GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/0h.crow b/Tests/Interfaces/Stack/0h.crow
index 95ef1359..24ee8a49 100755
--- a/Tests/Interfaces/Stack/0h.crow
+++ b/Tests/Interfaces/Stack/0h.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<HorizontalStack MinimumSize="50,50" Background="DimGray" Margin="10" Width="90%" Height="90%">
+<HorizontalStack MinimumSize="50,50" Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
MinimumSize="10,10"/>
<GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/1.crow b/Tests/Interfaces/Stack/1.crow
index 8a6a3c3c..d0e0c350 100755
--- a/Tests/Interfaces/Stack/1.crow
+++ b/Tests/Interfaces/Stack/1.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<VerticalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
MinimumSize="10,10"/>
<GraphicObject Margin="10" Width="Stretched" Height="60%" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/1h.crow b/Tests/Interfaces/Stack/1h.crow
index c8ea266d..b4cb18d2 100755
--- a/Tests/Interfaces/Stack/1h.crow
+++ b/Tests/Interfaces/Stack/1h.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="10" Width="Stretched" Height="20%" Background="SeaGreen"
MinimumSize="10,10"/>
<GraphicObject Margin="10" Width="Stretched" Height="60%" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/2.crow b/Tests/Interfaces/Stack/2.crow
index a3f2c019..64006cce 100755
--- a/Tests/Interfaces/Stack/2.crow
+++ b/Tests/Interfaces/Stack/2.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="100%">
+<VerticalStack Background="DimGrey" Margin="10" Width="90%" Height="100%">
<GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
MinimumSize="10,10"/>
<GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/2h.crow b/Tests/Interfaces/Stack/2h.crow
index faa5956c..3bb7d5f0 100755
--- a/Tests/Interfaces/Stack/2h.crow
+++ b/Tests/Interfaces/Stack/2h.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="100%">
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="100%">
<GraphicObject Margin="10" Width="Stretched" Height="Fit" Background="SeaGreen"
MinimumSize="10,10"/>
<GraphicObject Margin="10" Width="Stretched" Height="Stretched" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/3.crow b/Tests/Interfaces/Stack/3.crow
index b7784b90..b7d3543a 100755
--- a/Tests/Interfaces/Stack/3.crow
+++ b/Tests/Interfaces/Stack/3.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<VerticalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
MinimumSize="2,2"/>
<GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/3h.crow b/Tests/Interfaces/Stack/3h.crow
index 620cdeee..a20a284b 100755
--- a/Tests/Interfaces/Stack/3h.crow
+++ b/Tests/Interfaces/Stack/3h.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="90%">
+<HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="90%">
<GraphicObject Margin="1" Width="Stretched" Height="Fit" Background="SeaGreen"
MinimumSize="2,2"/>
<GraphicObject Margin="1" Width="Stretched" Height="Stretched" Background="SeaGreen"
diff --git a/Tests/Interfaces/Stack/4.crow b/Tests/Interfaces/Stack/4.crow
index 6a7f2da7..33d57deb 100755
--- a/Tests/Interfaces/Stack/4.crow
+++ b/Tests/Interfaces/Stack/4.crow
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<VerticalStack>
- <HorizontalStack Background="DimGray" Margin="10" Width="90%" Height="20%">
+ <HorizontalStack Background="DimGrey" Margin="10" Width="90%" Height="20%">
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
@@ -12,7 +12,7 @@
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
</HorizontalStack>
- <HorizontalStack Background="DimGray" Margin="10" Width="Fit" Height="20%">
+ <HorizontalStack Background="DimGrey" Margin="10" Width="Fit" Height="20%">
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
<Label Font="droid bold, 20" Text="{fps}" Margin="5" Fit="true" Background="SeaGreen"/>
diff --git a/Tests/Interfaces/TabItem.template b/Tests/Interfaces/TabItem.template
index df580a85..fd0f310d 100644
--- a/Tests/Interfaces/TabItem.template
+++ b/Tests/Interfaces/TabItem.template
@@ -2,23 +2,23 @@
<GenericStack Orientation="Vertical" Spacing="0"
Background="{./Background}"
MouseEnter="{/caption.Foreground=White}"
- MouseLeave="{/caption.Foreground=Gray}">
+ MouseLeave="{/caption.Foreground=Grey}">
<HorizontalStack Left="{./TabOffset}"
Name="TabTitle"
HorizontalAlignment="Left"
Height="{./TabHeight}"
Width="{./TabWidth}">
- <Label Name="caption" Text="{./Caption}" Foreground="Gray" Width="Stretched"/>
+ <Label Name="caption" Text="{./Caption}" Foreground="Grey" Width="Stretched"/>
<Label Text="{./ViewIndex}" Foreground="Green"/>
<Label Text="{./TabOffset}" Foreground="Red"/>
<Border CornerRadius="5" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
- <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
+ <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Icons.exit2.svg"
MouseClick="./butCloseTabClick"/>
</Border>
</HorizontalStack>
<Container Margin="20">
- <Container Background="DimGray" Name="Content"/>
+ <Container Background="DimGrey" Name="Content"/>
</Container>
</GenericStack>
diff --git a/Tests/Interfaces/TemplatedContainer/0.crow b/Tests/Interfaces/TemplatedContainer/0.crow
index e600d37c..5b267402 100755
--- a/Tests/Interfaces/TemplatedContainer/0.crow
+++ b/Tests/Interfaces/TemplatedContainer/0.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<Expandable Fit="true" Caption="Test expandable" Background="DimGray">
+<Expandable Fit="true" Caption="Test expandable" Background="DimGrey">
<VerticalStack Margin="5" >
<CheckBox Name="chk1" />
<CheckBox Name="chk2" IsChecked="true"/>
diff --git a/Tests/Interfaces/TemplatedContainer/6.crow b/Tests/Interfaces/TemplatedContainer/6.crow
index c1362017..641d58f9 100755
--- a/Tests/Interfaces/TemplatedContainer/6.crow
+++ b/Tests/Interfaces/TemplatedContainer/6.crow
@@ -1,8 +1,8 @@
-<Expandable Width="Stretched" Background="Gray">
+<Expandable Width="Stretched" Background="Grey">
<Expandable Width="Stretched" Background="LightBlue">
<Expandable Width="Stretched" Background="Green">
<Expandable Width="Stretched" Background="LimeGreen">
- <Expandable Width="Stretched" Background="DimGray">
+ <Expandable Width="Stretched" Background="DimGrey">
<Expandable Width="Stretched" Background="Yellow">
<Expandable Width="Stretched" Background="SeaGreen">
<Expandable Width="Stretched" Background="Blue">
diff --git a/Tests/Interfaces/TemplatedContainer/7.crow b/Tests/Interfaces/TemplatedContainer/7.crow
index 648b7a82..99a75079 100755
--- a/Tests/Interfaces/TemplatedContainer/7.crow
+++ b/Tests/Interfaces/TemplatedContainer/7.crow
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<VerticalStack Height="Fit" Width="Fit">
<Label Width="Stretched"/>
- <Expandable Width="Fit" Background="Gray">
+ <Expandable Width="Fit" Background="Grey">
<Expandable Background="LightBlue">
<Expandable Background="Green">
<Expandable Background="LimeGreen">
- <Expandable Background="DimGray">
+ <Expandable Background="DimGrey">
<Expandable Width="Stretched" Background="Yellow">
<Expandable Background="SeaGreen">
<Expandable Width="Stretched" Background="Blue">
diff --git a/Tests/Interfaces/TemplatedContainer/testGroupBox.crow b/Tests/Interfaces/TemplatedContainer/testGroupBox.crow
index 416bb217..48581803 100755
--- a/Tests/Interfaces/TemplatedContainer/testGroupBox.crow
+++ b/Tests/Interfaces/TemplatedContainer/testGroupBox.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!--<Container Background="vgradient|0:DarkGray|1:DimGray">-->
+<!--<Container Background="vgradient|0:DarkGrey|1:DimGrey">-->
<GroupBox Fit="true" Background="vgradient|0:SteelBlue|1:Transparent"
Foreground="White">
<!-- <Label/>-->
diff --git a/Tests/Interfaces/TemplatedContainer/testPopper.crow b/Tests/Interfaces/TemplatedContainer/testPopper.crow
index 07e56b80..7d70da96 100755
--- a/Tests/Interfaces/TemplatedContainer/testPopper.crow
+++ b/Tests/Interfaces/TemplatedContainer/testPopper.crow
@@ -9,7 +9,7 @@
</VerticalStack>
</Border>
<GraphicObject Height="200"/>
- <Popper Caption="TestPopper" Width="100" Background="DimGray" PopDirection="{alignment}">
+ <Popper Caption="TestPopper" Width="100" Background="DimGrey" PopDirection="{alignment}">
<Border Fit="True" Background="SteelBlue">
<Image Fit="true" Path="#go.Images.Icons.tetra.png" Margin="10"/>
<VerticalStack Fit="true" Margin="10" Background="CornflowerBlue">
diff --git a/Tests/Interfaces/TemplatedContainer/testTabView.crow b/Tests/Interfaces/TemplatedContainer/testTabView.crow
index c9e211f8..e3717c82 100644
--- a/Tests/Interfaces/TemplatedContainer/testTabView.crow
+++ b/Tests/Interfaces/TemplatedContainer/testTabView.crow
@@ -5,8 +5,8 @@
<Label Text="Selected Tab:"/>
<Label Text="{../../tabview1.SelectedTab}"/>
</HorizontalStack>
- <TabView Name="tabview1" Background="DimGray" Orientation="Horizontal">
- <TabItem Name="TabItem1" Caption="tab item 1" Background="DimGray">
+ <TabView Name="tabview1" Background="DimGrey" Orientation="Horizontal">
+ <TabItem Name="TabItem1" Caption="tab item 1" Background="DimGrey">
<VerticalStack Margin="20">
<CheckBox/>
<CheckBox/>
@@ -14,7 +14,7 @@
<CheckBox/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem2" Caption="tab item 2" Background="DimGray">
+ <TabItem Name="TabItem2" Caption="tab item 2" Background="DimGrey">
<VerticalStack Height="Fit" Margin="10">
<RadioButton Fit="true"/>
<RadioButton/>
@@ -22,16 +22,16 @@
<RadioButton/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem3" Background="DimGray" Caption="tab item 3">
+ <TabItem Name="TabItem3" Background="DimGrey" Caption="tab item 3">
<Container Margin="5" CornerRadius="2" >
<TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
</Container>
</TabItem>
- <TabItem Name="TabItem4" Background="DimGray" Caption="tab item 4" Margin="0">
+ <TabItem Name="TabItem4" Background="DimGrey" Caption="tab item 4" Margin="0">
<TextBox/>
</TabItem>
</TabView>
- <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
+ <Button Background="vgradient|0:DimGrey|1:Black" HorizontalAlignment="Right"
Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick"/>
</VerticalStack>
</Group> \ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedContainer/testTabView2.crow b/Tests/Interfaces/TemplatedContainer/testTabView2.crow
index c02e991a..67b87b07 100644
--- a/Tests/Interfaces/TemplatedContainer/testTabView2.crow
+++ b/Tests/Interfaces/TemplatedContainer/testTabView2.crow
@@ -5,8 +5,8 @@
<Label Text="Selected Tab:"/>
<Label Text="{../../tabview1.SelectedTab}"/>
</HorizontalStack>
- <TabView Name="tabview1" Background="DimGray" Orientation="Horizontal" Margin="5" >
- <TabItem Name="TabItem1" Caption="tab-1.1" Background="DimGray">
+ <TabView Name="tabview1" Background="DimGrey" Orientation="Horizontal" Margin="5" >
+ <TabItem Name="TabItem1" Caption="tab-1.1" Background="DimGrey">
<VerticalStack Margin="20">
<CheckBox/>
<CheckBox/>
@@ -14,7 +14,7 @@
<CheckBox/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem2" Caption="tab-1.2" Background="DimGray">
+ <TabItem Name="TabItem2" Caption="tab-1.2" Background="DimGrey">
<VerticalStack Height="Fit" Margin="10">
<RadioButton Fit="true"/>
<RadioButton/>
@@ -22,13 +22,13 @@
<RadioButton/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem3" Background="DimGray" Caption="tab-1.3">
+ <TabItem Name="TabItem3" Background="DimGrey" Caption="tab-1.3">
<Container Margin="5" CornerRadius="2" >
<TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
</Container>
</TabItem>
</TabView>
- <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
+ <Button Background="vgradient|0:DimGrey|1:Black" HorizontalAlignment="Right"
Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick"/>
</VerticalStack>
<VerticalStack Width="40%">
@@ -36,8 +36,8 @@
<Label Text="Selected Tab:"/>
<Label Text="{../../tabview2.SelectedTab}"/>
</HorizontalStack>
- <TabView Name="tabview2" Background="DimGray" Orientation="Horizontal" >
- <TabItem Name="TabItem1" Caption="tab-2.1" Background="DimGray">
+ <TabView Name="tabview2" Background="DimGrey" Orientation="Horizontal" >
+ <TabItem Name="TabItem1" Caption="tab-2.1" Background="DimGrey">
<VerticalStack Margin="20">
<CheckBox/>
<CheckBox/>
@@ -45,7 +45,7 @@
<CheckBox/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem2" Caption="tab-2.2" Background="DimGray">
+ <TabItem Name="TabItem2" Caption="tab-2.2" Background="DimGrey">
<VerticalStack Height="Fit" Margin="10">
<RadioButton Fit="true"/>
<RadioButton/>
@@ -53,13 +53,13 @@
<RadioButton/>
</VerticalStack>
</TabItem>
- <TabItem Name="TabItem3" Background="DimGray" Caption="tab-2.3">
+ <TabItem Name="TabItem3" Background="DimGrey" Caption="tab-2.3">
<Container Margin="5" CornerRadius="2" >
<TextBox Margin="5" Multiline="true" TextAlignment="TopLeft"/>
</Container>
</TabItem>
</TabView>
- <Button Background="vgradient|0:DimGray|1:Black" HorizontalAlignment="Right"
+ <Button Background="vgradient|0:DimGrey|1:Black" HorizontalAlignment="Right"
Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick2"/>
</VerticalStack>
</HorizontalStack>
diff --git a/Tests/Interfaces/TemplatedControl/testButton.crow b/Tests/Interfaces/TemplatedControl/testButton.crow
index 69367eaa..8911619d 100755
--- a/Tests/Interfaces/TemplatedControl/testButton.crow
+++ b/Tests/Interfaces/TemplatedControl/testButton.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack Fit="true" Background="vgradient|0:DimGray|1:Black">
+<VerticalStack Fit="true" Background="vgradient|0:DimGrey|1:Black">
<HorizontalStack Fit="True">
<Button Caption="but" MouseClick="onButClick"/>
<Button Caption="but" MouseClick="onButClick" Fit="true"/>
diff --git a/Tests/Interfaces/TemplatedControl/testCheckbox.crow b/Tests/Interfaces/TemplatedControl/testCheckbox.crow
index 5147a151..7c8438c0 100755
--- a/Tests/Interfaces/TemplatedControl/testCheckbox.crow
+++ b/Tests/Interfaces/TemplatedControl/testCheckbox.crow
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
-<VerticalStack Fit="true" Margin="100" Background="DimGray" >
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
- <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+<VerticalStack Fit="true" Margin="100" Background="DimGrey" >
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
+ <CheckBox Background="Grey" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/>
</VerticalStack>
diff --git a/Tests/Interfaces/TemplatedControl/testCombobox.crow b/Tests/Interfaces/TemplatedControl/testCombobox.crow
index 3ef27ace..4363986e 100755
--- a/Tests/Interfaces/TemplatedControl/testCombobox.crow
+++ b/Tests/Interfaces/TemplatedControl/testCombobox.crow
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
-<Container Background="DimGray" Width="300">
+<Container Background="DimGrey" Width="300">
<ComboBox Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem.crow"/>
</Container> \ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedControl/testRadioButton.crow b/Tests/Interfaces/TemplatedControl/testRadioButton.crow
index 905cdeba..a01d9041 100755
--- a/Tests/Interfaces/TemplatedControl/testRadioButton.crow
+++ b/Tests/Interfaces/TemplatedControl/testRadioButton.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGray">
+<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGrey">
<RadioButton Caption="Radio1"/>
<RadioButton Caption="Radio2" IsChecked="true"/>
<RadioButton Caption="Radio3"/>
diff --git a/Tests/Interfaces/TemplatedControl/testScrollbar.crow b/Tests/Interfaces/TemplatedControl/testScrollbar.crow
index c494e347..f8c4a9ae 100755
--- a/Tests/Interfaces/TemplatedControl/testScrollbar.crow
+++ b/Tests/Interfaces/TemplatedControl/testScrollbar.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<Group Name="TopContainer" Width="400" Height="400"
- Focusable="True" Background="Gray">
- <ScrollBar Height="Stretched" Orientation="Vertical" Width="16" Maximum="100"/>
+ Focusable="True" Background="Grey">
+ <ScrollBar Height="16" Orientation="Horizontal" Width="Stretched" Maximum="100"/>
</Group> \ No newline at end of file
diff --git a/Tests/Interfaces/TemplatedControl/testSpinner.crow b/Tests/Interfaces/TemplatedControl/testSpinner.crow
index 07d62e65..01d53016 100755
--- a/Tests/Interfaces/TemplatedControl/testSpinner.crow
+++ b/Tests/Interfaces/TemplatedControl/testSpinner.crow
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<VerticalStack Name="TopContainer" Width="400" Height="Fit"
- Margin="20" Background="DarkGray">
+ Margin="20" Background="DarkGrey">
<HorizontalStack Fit="true" Margin="5" Background="SkyBlue">
<Spinner Name="sp1" Value="5" ValueChanged="onSpinnerValueChange"/>
diff --git a/Tests/Interfaces/basicTests/7.crow b/Tests/Interfaces/basicTests/7.crow
index 8df18346..8d1e441c 100755
--- a/Tests/Interfaces/basicTests/7.crow
+++ b/Tests/Interfaces/basicTests/7.crow
@@ -89,11 +89,11 @@
</VerticalStack>
<VerticalStack Width="33%" Margin="5" Spacing="5">
<Expandable Background="DimGray">
- <Image Path="#Crow.Images.Icons.crow.svg"/>
+ <Image Path="#Crow.Icons.crow.svg"/>
</Expandable>
<Popper Background="DimGray" PopDirection="Bottom">
<Border Fit="True" Background="DimGray" CornerRadius="0" BorderWidth="1">
- <Image Path="#Crow.Images.Icons.crow.svg" Width="100" Height="100" Margin="10"
+ <Image Path="#Crow.Icons.crow.svg" Width="100" Height="100" Margin="10"
MouseEnter="{Background=LightGray}"
MouseLeave="{Background=Transparent}"/>
</Border>
@@ -102,7 +102,7 @@
<Container Height="Fit" Background="Onyx" Margin="2" CornerRadius="5">
<ProgressBar Background="DimGray" Height="10" Value="50"/>
</Container>
- <Image Path="#Crow.Images.Icons.crow.svg" Width="60" Height="60" Background="LightGray" />
+ <Image Path="#Crow.Icons.crow.svg" Width="60" Height="60" Background="LightGray" />
<TabView Name="tabview1"
Height="120" Orientation="Horizontal" Spacing="15">
<TabItem Name="TabItem1" Caption="Tab 1" Margin="0">
diff --git a/Tests/Interfaces/colorItem2.crow b/Tests/Interfaces/colorItem2.crow
new file mode 100755
index 00000000..4e29d380
--- /dev/null
+++ b/Tests/Interfaces/colorItem2.crow
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<Border Foreground="Transparent" Focusable="true" HorizontalAlignment="Left" Height="Fit">
+ <HorizontalStack Margin="0"
+ MouseEnter="{Background=CornflowerBlue}"
+ MouseLeave="{Background=Transparent}">
+ <GraphicObject Height="8" Width="14" Background="{}" Margin="0" CornerRadius="2"/>
+ <Label Text="{}" Margin="0" Width="Stretched" Font="mono, 8"/>
+ </HorizontalStack>
+</Border>
+
diff --git a/Tests/Interfaces/perfMsr.crow b/Tests/Interfaces/perfMsr.crow
index d823ea42..22a62ea1 100755
--- a/Tests/Interfaces/perfMsr.crow
+++ b/Tests/Interfaces/perfMsr.crow
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
- <VerticalStack Spacing="0" Fit="true" Width="160">
- <HorizontalStack Background="Black">
+ <VerticalStack Spacing="1" Height="Fit" Width="Stretched">
+ <HorizontalStack Background="DarkSlateGrey">
<Label Text="{Name}" Width="Stretched" Font="doid bold, 10" Margin="2"/>
<Button Caption="Reset" MouseClick="onResetClick" Height="Fit"/>
</HorizontalStack>
@@ -21,6 +21,9 @@
<Label Text="Maximum:" Style="FpsLabel"/>
<Label Text="{maximum}" Style="FpsDisp"/>
</HorizontalStack>
+ <Border Foreground="White" Width="Stretched" Height="60">
+ <Trend Background="Black" NewValue="{current}" Minimum="0" Maximum="100"/>
+ </Border>
<!-- <HorizontalStack>
<Label Text="Total:" Style="FpsLabel"/>
<Label Text="{total}" Style="FpsDisp"/>
diff --git a/Tests/Interfaces/testBorder.goml.cs b/Tests/Interfaces/testBorder.goml.cs
deleted file mode 100644
index 8c7663a4..00000000
--- a/Tests/Interfaces/testBorder.goml.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// ------------------------------------------------------------------------------
-// <autogenerated>
-// This code was generated by a tool.
-// Mono Runtime Version: 4.0.30319.17020
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </autogenerated>
-// ------------------------------------------------------------------------------
-
-using System;
-
-
-namespace Crow {
-
- public partial class testBorder : Border {
- public testBorder() {
- this.BorderWidth = 5;
- this.Width = 200;
- this.Height = 200;
- this.CornerRadius = 20;
- this.Margin = 0;
- this.Background = Crow.Color.Mantis;
- this.SetChild(new Crow.GraphicObject());
- this.Child.CornerRadius = 0;
- this.Child.Background = Crow.Color.CornflowerBlue;
- this.Child.Height = 100;
- this.Child.Width = 100;
- }
- }
-}
diff --git a/Tests/OpenGL/Extensions.cs b/Tests/OpenGL/Extensions.cs
deleted file mode 100644
index 7b26f76b..00000000
--- a/Tests/OpenGL/Extensions.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// Extensions.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2017 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 Crow;
-
-namespace Crow
-{
- public static partial class Extensions {
- public static Vector4 ToVector4(this Color c){
- float[] f = c.floatArray;
- return new Vector4 (f [0], f [1], f [2], f [3]);
- }
- public static Vector3 Transform(this Vector3 v, Matrix4 m){
- return Vector4.Transform(new Vector4(v, 1), m).Xyz;
- }
- public static bool IsInBetween(this int v, int min, int max){
- return v >= min & v <= max;
- }
-
- }
-}
-
diff --git a/Tests/OpenGL/Shader.cs b/Tests/OpenGL/Shader.cs
deleted file mode 100644
index 1253ff72..00000000
--- a/Tests/OpenGL/Shader.cs
+++ /dev/null
@@ -1,336 +0,0 @@
-//
-// Shader.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 System.Diagnostics;
-using System.IO;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-
-namespace Crow
-{
- public class Shader : IDisposable
- {
- #region CTOR
- public Shader ()
- {
- Init ();
- }
- public Shader (string vertResPath, string fragResPath = null, string geomResPath = null)
- {
- VertSourcePath = vertResPath;
- FragSourcePath = fragResPath;
- GeomSourcePath = geomResPath;
-
- loadSourcesFiles ();
-
- Init ();
- }
- #endregion
-
- public string VertSourcePath,
- FragSourcePath,
- GeomSourcePath;
- #region Sources
- protected string _vertSource = @"
- #version 300 es
- precision lowp float;
-
- uniform mat4 mvp;
-
- layout(location = 0) in vec3 in_position;
- layout(location = 1) in vec2 in_tex;
-
- out vec2 texCoord;
-
- void main(void)
- {
- texCoord = in_tex;
- gl_Position = mvp * vec4(in_position, 1.0);
- }";
-
- protected string _fragSource = @"
- #version 300 es
- precision lowp float;
-
- uniform sampler2D tex;
-
- in vec2 texCoord;
- out vec4 out_frag_color;
-
- void main(void)
- {
- out_frag_color = texture( tex, texCoord);//vec4(1,0,0,1);
- }";
- string _geomSource = @"";
-// #version 330
-// layout(triangles) in;
-// layout(triangle_strip, max_vertices=3) out;
-// void main()
-// {
-// for(int i=0; i<3; i++)
-// {
-// gl_Position = gl_in[i].gl_Position;
-// EmitVertex();
-// }
-// EndPrimitive();
-// }";
- #endregion
-
- #region Private and protected fields
- public int vsId, fsId, gsId, pgmId, mvpLocation;
-
- Matrix4 mvp = Matrix4.Identity;
- #endregion
-
-
- #region Public properties
- public virtual string vertSource
- {
- get { return _vertSource;}
- set { _vertSource = value; }
- }
- public virtual string fragSource
- {
- get { return _fragSource;}
- set { _fragSource = value; }
- }
- public virtual string geomSource
- {
- get { return _geomSource; }
- set { _geomSource = value; }
- }
-
- public virtual Matrix4 MVP{
- set { mvp = value; }
- get { return mvp; }
- }
- #endregion
-
- #region Public functions
- /// <summary>
- /// configure sources and compile
- /// </summary>
- public virtual void Init()
- {
- Compile ();
- }
- public void Reload(){
- loadSourcesFiles ();
- Compile ();
- }
- public void SetSource(ShaderType shaderType, string _source){
- switch (shaderType) {
- case ShaderType.FragmentShader:
- fragSource = _source;
- return;
- case ShaderType.VertexShader:
- vertSource = _source;
- return;
- case ShaderType.GeometryShader:
- geomSource = _source;
- return;
- }
- }
- public string GetSource(ShaderType shaderType){
- switch (shaderType) {
- case ShaderType.FragmentShader:
- return fragSource;
- case ShaderType.VertexShader:
- return vertSource;
- case ShaderType.GeometryShader:
- return geomSource;
- }
- return "";
- }
- public string GetSourcePath(ShaderType shaderType){
- switch (shaderType) {
- case ShaderType.FragmentShader:
- return FragSourcePath;
- case ShaderType.VertexShader:
- return VertSourcePath;
- case ShaderType.GeometryShader:
- return GeomSourcePath;
- }
- return "";
- }
- public virtual void Compile()
- {
- Dispose ();
-
- pgmId = GL.CreateProgram();
-
- if (!string.IsNullOrEmpty(vertSource))
- {
- vsId = GL.CreateShader(ShaderType.VertexShader);
- compileShader(vsId, vertSource);
- }
- if (!string.IsNullOrEmpty(fragSource))
- {
- fsId = GL.CreateShader(ShaderType.FragmentShader);
- compileShader(fsId, fragSource);
-
- }
- if (!string.IsNullOrEmpty(geomSource))
- {
- gsId = GL.CreateShader(ShaderType.GeometryShader);
- compileShader(gsId,geomSource);
- }
-
- if (vsId != 0)
- GL.AttachShader(pgmId, vsId);
- if (fsId != 0)
- GL.AttachShader(pgmId, fsId);
- if (gsId != 0)
- GL.AttachShader(pgmId, gsId);
-
- BindVertexAttributes ();
-
- string info;
- GL.LinkProgram(pgmId);
- GL.GetProgramInfoLog(pgmId, out info);
-
- if (!string.IsNullOrEmpty (info)) {
- Debug.WriteLine ("Linkage:");
- Debug.WriteLine (info);
- }
-
- info = null;
-
- GL.ValidateProgram(pgmId);
- GL.GetProgramInfoLog(pgmId, out info);
- if (!string.IsNullOrEmpty (info)) {
- Debug.WriteLine ("Validation:");
- Debug.WriteLine (info);
- }
-
- GL.UseProgram (pgmId);
-
- GetUniformLocations ();
- BindSamplesSlots ();
-
- Disable ();
- }
-
- protected virtual void BindVertexAttributes()
- {
- GL.BindAttribLocation(pgmId, 0, "in_position");
- GL.BindAttribLocation(pgmId, 1, "in_tex");
- }
- protected virtual void GetUniformLocations()
- {
- mvpLocation = GL.GetUniformLocation(pgmId, "mvp");
- }
- protected virtual void BindSamplesSlots(){
- GL.Uniform1(GL.GetUniformLocation (pgmId, "tex"), 0);
- }
- public void SetMVP(Matrix4 _mvp){
- GL.UniformMatrix4(mvpLocation, false, ref _mvp);
- }
- public virtual void Enable(){
- GL.UseProgram (pgmId);
- }
- public virtual void Disable(){
- GL.UseProgram (0);
- }
- public static void Enable(Shader s)
- {
- if (s == null)
- return;
- s.Enable ();
- }
- public static void Disable(Shader s)
- {
- if (s == null)
- return;
- s.Disable ();
- }
- #endregion
-
- void loadSourcesFiles(){
- Stream s;
-
- if (!string.IsNullOrEmpty (VertSourcePath)) {
- s = Crow.Interface.StaticGetStreamFromPath (VertSourcePath);
- if (s != null) {
- using (StreamReader sr = new StreamReader (s)) {
- vertSource = sr.ReadToEnd ();
- }
- }
- }
-
- if (!string.IsNullOrEmpty (FragSourcePath)) {
- s = Crow.Interface.StaticGetStreamFromPath (FragSourcePath);
- if (s != null) {
- using (StreamReader sr = new StreamReader (s)) {
- fragSource = sr.ReadToEnd ();
- }
- }
- }
-
- if (!string.IsNullOrEmpty (GeomSourcePath)) {
- s = Crow.Interface.StaticGetStreamFromPath (GeomSourcePath);
- if (s != null) {
- using (StreamReader sr = new StreamReader (s)) {
- geomSource = sr.ReadToEnd ();
- }
- }
- }
- }
- void compileShader(int shader, string source)
- {
- GL.ShaderSource(shader, source);
- GL.CompileShader(shader);
-
- string info;
- GL.GetShaderInfoLog(shader, out info);
- Debug.WriteLine(info);
-
- int compileResult;
- GL.GetShader(shader, ShaderParameter.CompileStatus, out compileResult);
- if (compileResult != 1)
- {
- Debug.WriteLine("Compile Error!");
- Debug.WriteLine(source);
- }
- }
- public override string ToString ()
- {
- return string.Format ("{0} {1} {2}", VertSourcePath, FragSourcePath, GeomSourcePath);
- }
-
- #region IDisposable implementation
- public virtual void Dispose ()
- {
- if (GL.IsProgram (pgmId))
- GL.DeleteProgram (pgmId);
-
- if (GL.IsShader (vsId))
- GL.DeleteShader (vsId);
- if (GL.IsShader (fsId))
- GL.DeleteShader (fsId);
- if (GL.IsShader (gsId))
- GL.DeleteShader (gsId);
- }
- #endregion
- }
-}
-
diff --git a/Tests/OpenGL/Texture.cs b/Tests/OpenGL/Texture.cs
deleted file mode 100644
index 08215ada..00000000
--- a/Tests/OpenGL/Texture.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// Texture.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 System.Drawing;
-using OpenTK.Graphics.OpenGL;
-using System.Drawing.Imaging;
-using System.IO;
-using System.Diagnostics;
-
-namespace Crow
-{
- public class Texture
- {
- public string Map;
- public int texRef;
- public int Width;
- public int Height;
-
- public Texture(string _mapPath, bool flipY = true)
- {
- using (Stream s = Interface.StaticGetStreamFromPath (_mapPath)) {
-
- try {
- Map = _mapPath;
-
- Bitmap bitmap = new Bitmap (s);
-
- if (flipY)
- bitmap.RotateFlip (RotateFlipType.RotateNoneFlipY);
-
- BitmapData data = bitmap.LockBits (new System.Drawing.Rectangle (0, 0, bitmap.Width, bitmap.Height),
- ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
-
- createTexture (data.Scan0, data.Width, data.Height);
-
- bitmap.UnlockBits (data);
-
- GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
- GL.TexParameter (TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
-
- GL.GenerateMipmap (GenerateMipmapTarget.Texture2D);
-
- } catch (Exception ex) {
- Debug.WriteLine ("Error loading texture: " + Map + ":" + ex.Message);
- }
- }
- }
-
- public Texture(int width, int height)
- {
- createTexture (IntPtr.Zero, width, height);
- GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
- GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
- GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Clamp);
- GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Clamp);
- }
-
- void createTexture(IntPtr data, int width, int height)
- {
- Width = width;
- Height = height;
-
- GL.GenTextures(1, out texRef);
- GL.BindTexture(TextureTarget.Texture2D, texRef);
- GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, width, height, 0,
- OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data);
- }
-
- public static implicit operator int(Texture t)
- {
- return t == null ? 0: t.texRef;
- }
- }
-
-}
diff --git a/Tests/OpenGL/vaoMesh.cs b/Tests/OpenGL/vaoMesh.cs
deleted file mode 100644
index 19acd737..00000000
--- a/Tests/OpenGL/vaoMesh.cs
+++ /dev/null
@@ -1,221 +0,0 @@
-//
-// vaoMesh.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;
-
-namespace Crow
-{
- public class vaoMesh : IDisposable
- {
- public int vaoHandle,
- positionVboHandle,
- texVboHandle,
- eboHandle;
-
- public Vector3[] positions;
- public Vector2[] texCoords;
- public int[] indices;
-
- public vaoMesh()
- {
- }
-
- public vaoMesh (Vector3[] _positions, Vector2[] _texCoord, int[] _indices)
- {
- positions = _positions;
- texCoords = _texCoord;
- indices = _indices;
-
- CreateBuffers ();
- }
-
- public vaoMesh (float x, float y, float z, float width, float height, float TileX = 1f, float TileY = 1f)
- {
- positions =
- new Vector3[] {
- new Vector3 (x - width / 2, y + height / 2, z),
- new Vector3 (x - width / 2, y - height / 2, z),
- new Vector3 (x + width / 2, y + height / 2, z),
- new Vector3 (x + width / 2, y - height / 2, z)
- };
- texCoords = new Vector2[] {
- new Vector2 (0, TileY),
- new Vector2 (0, 0),
- new Vector2 (TileX, TileY),
- new Vector2 (TileX, 0)
- };
- indices = new int[] { 0, 1, 2, 3 };
-
- CreateBuffers ();
- }
- public static vaoMesh CreateCube(){
- vaoMesh tmp = new vaoMesh ();
- tmp.positions = new Vector3[]
- {
- new Vector3(-1.0f, -1.0f, -1.0f),
- new Vector3( -1.0f, -1.0f, 1.0f),
- new Vector3( 1.0f, -1.0f, -1.0f),
- new Vector3(1.0f, -1.0f, 1.0f),
- new Vector3(1.0f, 1.0f, -1.0f),
- new Vector3( 1.0f, 1.0f, 1.0f),
- new Vector3( -1.0f, 1.0f, -1.0f),
- new Vector3(-1.0f, 1.0f, 1.0f)
- };
- tmp.indices = new int[]
- {
- // front face
- 0, 2, 1, 1, 2, 3,
- // top face
- 2, 4, 3, 3, 4, 5,
- // back face
- 4, 6, 5, 5, 6, 7,
- // left face
- 6, 0, 7, 7, 0, 1,
- // bottom face
- 1, 3, 7, 7, 3, 5,
- // right face
-// 1, 5, 6, 6, 2, 1,
- };
- tmp.texCoords = new Vector2[]
- {
- new Vector2(0, 0),
- new Vector2(0, 1),
- new Vector2(1, 0),
- new Vector2(1, 1),
- new Vector2(0, 0),
- new Vector2(0, 1),
- new Vector2(1, 0),
- new Vector2(1, 1),
- };
- tmp.CreateBuffers ();
- return tmp;
-// Normals = new Vector3[]
-// {
-// new Vector3(-1.0f, -1.0f, 1.0f),
-// new Vector3( 1.0f, -1.0f, 1.0f),
-// new Vector3( 1.0f, 1.0f, 1.0f),
-// new Vector3(-1.0f, 1.0f, 1.0f),
-// new Vector3(-1.0f, -1.0f, -1.0f),
-// new Vector3( 1.0f, -1.0f, -1.0f),
-// new Vector3( 1.0f, 1.0f, -1.0f),
-// new Vector3(-1.0f, 1.0f, -1.0f),
-// };
-//
-// Colors = new int[]
-// {
-// Utilities.ColorToRgba32(Color.DarkRed),
-// Utilities.ColorToRgba32(Color.DarkRed),
-// Utilities.ColorToRgba32(Color.Gold),
-// Utilities.ColorToRgba32(Color.Gold),
-// Utilities.ColorToRgba32(Color.DarkRed),
-// Utilities.ColorToRgba32(Color.DarkRed),
-// Utilities.ColorToRgba32(Color.Gold),
-// Utilities.ColorToRgba32(Color.Gold),
-// };
- }
- public void CreateBuffers(){
- CreateVBOs ();
- CreateVAOs ();
- }
- protected void CreateVBOs()
- {
- positionVboHandle = GL.GenBuffer();
- GL.BindBuffer(BufferTarget.ArrayBuffer, positionVboHandle);
- GL.BufferData<Vector3>(BufferTarget.ArrayBuffer,
- new IntPtr(positions.Length * Vector3.SizeInBytes),
- positions, BufferUsageHint.StaticDraw);
-
- if (texCoords != null) {
- texVboHandle = GL.GenBuffer ();
- GL.BindBuffer (BufferTarget.ArrayBuffer, texVboHandle);
- GL.BufferData<Vector2> (BufferTarget.ArrayBuffer,
- new IntPtr (texCoords.Length * Vector2.SizeInBytes),
- texCoords, BufferUsageHint.StaticDraw);
- }
-
- GL.BindBuffer(BufferTarget.ArrayBuffer, 0);
-
- if (indices != null) {
- eboHandle = GL.GenBuffer ();
- GL.BindBuffer (BufferTarget.ElementArrayBuffer, eboHandle);
- GL.BufferData (BufferTarget.ElementArrayBuffer,
- new IntPtr (sizeof(uint) * indices.Length),
- indices, BufferUsageHint.StaticDraw);
- GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);
- }
- }
- protected void CreateVAOs()
- {
- vaoHandle = GL.GenVertexArray();
- GL.BindVertexArray(vaoHandle);
-
- GL.EnableVertexAttribArray(0);
- GL.BindBuffer(BufferTarget.ArrayBuffer, positionVboHandle);
- GL.VertexAttribPointer(0, 3, VertexAttribPointerType.Float, true, Vector3.SizeInBytes, 0);
-
- if (texCoords != null) {
- GL.EnableVertexAttribArray (1);
- GL.BindBuffer (BufferTarget.ArrayBuffer, texVboHandle);
- GL.VertexAttribPointer (1, 2, VertexAttribPointerType.Float, true, Vector2.SizeInBytes, 0);
- }
- if (indices != null)
- GL.BindBuffer(BufferTarget.ElementArrayBuffer, eboHandle);
-
- GL.BindVertexArray(0);
- }
-
- public void Render(BeginMode _primitiveType){
- GL.BindVertexArray(vaoHandle);
- if (indices == null)
- GL.DrawArrays (_primitiveType, 0, positions.Length);
- else
- GL.DrawElements(_primitiveType, indices.Length,
- DrawElementsType.UnsignedInt, IntPtr.Zero);
- GL.BindVertexArray (0);
- }
- public void Render(BeginMode _primitiveType, int[] _customIndices){
- GL.BindVertexArray(vaoHandle);
- GL.DrawElements(_primitiveType, _customIndices.Length,
- DrawElementsType.UnsignedInt, _customIndices);
- GL.BindVertexArray (0);
- }
- public void Render(BeginMode _primitiveType, int instances){
-
- GL.BindVertexArray(vaoHandle);
- GL.DrawElementsInstanced(_primitiveType, indices.Length,
- DrawElementsType.UnsignedInt, IntPtr.Zero, instances);
- GL.BindVertexArray (0);
- }
-
- #region IDisposable implementation
- public void Dispose ()
- {
- GL.DeleteBuffer (positionVboHandle);
- GL.DeleteBuffer (texVboHandle);
- GL.DeleteBuffer (eboHandle);
- GL.DeleteVertexArray (vaoHandle);
- }
- #endregion
-
- }
-} \ No newline at end of file
diff --git a/Tests/Showcase.cs b/Tests/Showcase.cs
index da9b99dc..ca72bf10 100644
--- a/Tests/Showcase.cs
+++ b/Tests/Showcase.cs
@@ -25,8 +25,6 @@
// THE SOFTWARE.
using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
using Crow;
using System.IO;
using System.Collections.Generic;
@@ -35,46 +33,48 @@ using System.Linq;
using System.Text;
using Crow.IML;
-namespace Tests
+namespace tests
{
- class Showcase : CrowWindow
+ class Showcase : Interface
{
+ public Container crowContainer;
+
[STAThread]
static void Main ()
{
- Showcase win = new Showcase ();
- win.Run (30);
- }
+ using (Showcase app = new Showcase ()) {
+ //app.Keyboard.KeyDown += App_KeyboardKeyDown;
- public Showcase ()
- : base(1024, 800,"Showcase")
- {
- }
+ GraphicObject g = app.AddWidget ("#Tests.ui.showcase.crow");
+ g.DataSource = app;
+ app.crowContainer = g.FindByName ("CrowContainer") as Container;
+ //I set an empty object as datasource at this level to force update when new
+ //widgets are added to the interface
+ app.crowContainer.DataSource = new object ();
+ app.hideError ();
+ app.LoadIMLFragment(@"<Window Width='150' Height='150' Name='dock1'/>");
+ app.Run();
- Container crowContainer;
+ }
+ }
- protected override void OnLoad (EventArgs e)
+ static void App_KeyboardKeyDown (object sender, KeyEventArgs e)
{
- base.OnLoad (e);
-
- this.CrowKeyDown += Showcase_CrowKeyDown;
- GraphicObject g = Load ("#Tests.ui.showcase.crow");
- g.DataSource = this;
- crowContainer = g.FindByName ("CrowContainer") as Container;
- //I set an empty object as datasource at this level to force update when new
- //widgets are added to the interface
- crowContainer.DataSource = new object ();
- hideError ();
+ #if DEBUG_LOG
+ switch (e.Key) {
+ case Key.F2:
+ DebugLog.save (sender as Interface);
+ break;
+ }
+ #endif
}
- void Showcase_CrowKeyDown (object sender, OpenTK.Input.KeyboardKeyEventArgs e)
+ public Showcase ()
+ : base(1024, 800)
{
- if (e.Key == OpenTK.Input.Key.Escape) {
- Quit (null, null);
- return;
- }
}
+
void Dv_SelectedItemChanged (object sender, SelectionChangeEventArgs e)
{
FileSystemInfo fi = e.NewValue as FileSystemInfo;
@@ -83,17 +83,22 @@ namespace Tests
if (fi is DirectoryInfo)
return;
hideError();
- lock (this.CurrentInterface.UpdateMutex) {
- try {
- GraphicObject g = this.CurrentInterface.Load (fi.FullName);
- crowContainer.SetChild (g);
- g.DataSource = this;
- } catch (InstantiatorException ex) {
- showError (ex);
- }
- }
+ lock (UpdateMutex) {
+ try
+ {
+ GraphicObject g = Load(fi.FullName);
+ crowContainer.SetChild(g);
+ g.DataSource = this;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex.ToString());
+ if (ex is InstantiatorException)
+ showError((InstantiatorException)ex);
+ }
+ }
- string source = "";
+ string source = "";
using (Stream s = new FileStream (fi.FullName, FileMode.Open)) {
using (StreamReader sr = new StreamReader (s)) {
source = sr.ReadToEnd ();
@@ -115,24 +120,22 @@ namespace Tests
hideError();
GraphicObject g = null;
try {
- lock (this.ifaceControl [0].CrowInterface.UpdateMutex) {
+ lock (UpdateMutex) {
Instantiator inst = null;
using (MemoryStream ms = new MemoryStream (Encoding.UTF8.GetBytes (e.Text))){
- inst = new Instantiator (this.ifaceControl [0].CrowInterface, ms);
+ inst = new Instantiator (this, ms);
}
g = inst.CreateInstance ();
crowContainer.SetChild (g);
g.DataSource = this;
}
- } catch (InstantiatorException ex) {
- System.Diagnostics.Debug.WriteLine (ex.ToString ());
- showError (ex);
+ } catch (Exception ex) {
+ Console.WriteLine (ex.ToString ());
+ if (ex is InstantiatorException)
+ showError ((InstantiatorException)ex);
}
- }
- public override void OnRender (FrameEventArgs e)
- {
- base.OnRender (e);
- }
+ }
+
#region Test values for Binding
public int intValue = 500;
diff --git a/Tests/Tests.NetStd.csproj b/Tests/Tests.NetStd.csproj
new file mode 100644
index 00000000..20239315
--- /dev/null
+++ b/Tests/Tests.NetStd.csproj
@@ -0,0 +1,39 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+
+ <OutputType>Exe</OutputType>
+ <StartupObject>tests.Showcase</StartupObject>
+
+ <OutputPath>$(SolutionDir)build/$(Configuration)</OutputPath>
+ <IntermediateOutputPath>$(SolutionDir)build/obj/$(Configuration)</IntermediateOutputPath>
+
+ <EnableDefaultItems>false</EnableDefaultItems>
+ <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugType>portable</DebugType>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="*.cs" />
+
+ <ProjectReference Include="..\Crow\Crow.NetStd.csproj" />
+
+ <EmbeddedResource Include="image\**\*.*">
+ <LogicalName>Tests.image.%(Filename)%(Extension)</LogicalName>
+ </EmbeddedResource>
+
+ <EmbeddedResource Include="ui\**\*.*">
+ <LogicalName>Tests.ui.%(Filename)%(Extension)</LogicalName>
+ </EmbeddedResource>
+
+ <EmbeddedResource Include="test.style" />
+
+ <None Include="Interfaces\**\*.*">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
+
+</Project>
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj
index c86ff9cb..69437acc 100644
--- a/Tests/Tests.csproj
+++ b/Tests/Tests.csproj
@@ -8,10 +8,9 @@
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>Tests.BasicTests</StartupObject>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <StartupObject>tests.Showcase</StartupObject>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ReleaseVersion>0.5</ReleaseVersion>
+ <ReleaseVersion>0.8.0</ReleaseVersion>
<OutputPath>$(SolutionDir)build/$(Configuration)</OutputPath>
<IntermediateOutputPath>$(SolutionDir)build/obj/$(Configuration)</IntermediateOutputPath>
<CustomCommands>
@@ -19,6 +18,7 @@
<Command type="Execute" command="${TargetName}" workingdir="${SolutionDir}/build/${ProjectConfigName}" />
</CustomCommands>
</CustomCommands>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -26,10 +26,15 @@
<Optimize>false</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
<DefineConstants>DEBUG;TRACE;MEASURE_TIME</DefineConstants>
<IntermediateOutputPath>$(SolutionDir)build\obj\$(Configuration)</IntermediateOutputPath>
<OutputPath>$(SolutionDir)build\Debug</OutputPath>
+ <EnvironmentVariables>
+ <EnvironmentVariables>
+ <Variable name="MONO_CAIRO_DEBUG_DISPOSE" value="1" />
+ </EnvironmentVariables>
+ </EnvironmentVariables>
+ <ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
@@ -75,35 +80,29 @@
<StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(RunConfiguration)' == 'Custom Command' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>%24{TargetName}</StartProgram>
+ <StartWorkingDirectory>%24{SolutionDir}\build\%24{ProjectConfigName}</StartWorkingDirectory>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Drawing" />
- <Reference Include="OpenTK">
- <HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
- </Reference>
+ <Reference Include="Mono.Posix" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Compile Include="BasicTests.cs" />
- <Compile Include="OpenGL\Shader.cs" />
- <Compile Include="OpenGL\vaoMesh.cs" />
- <Compile Include="OpenGL\Texture.cs" />
- <Compile Include="HelloWorld.cs" />
- <Compile Include="CrowWindow.cs" />
- <Compile Include="Hello3D.cs" />
- <Compile Include="OpenGL\Extensions.cs" />
- <Compile Include="InterfaceControler.cs" />
<Compile Include="Showcase.cs" />
<Compile Include="GraphicObjects\ColorCircleSelector.cs" />
<Compile Include="GraphicObjects\SimpleGauge.cs" />
- <Compile Include="Tutorials\T1_HelloWorld.cs" />
- <Compile Include="Tutorials\T3_OpenGLCube.cs" />
- <Compile Include="Tutorials\T4_Gauge.cs" />
- <Compile Include="Tutorials\T2_IML.cs" />
<Compile Include="GraphicObjects\HexaContainer.cs" />
<Compile Include="GraphicObjects\TechBorder.cs" />
+ <Compile Include="keysyms.cs" />
+ <Compile Include="GraphicObjects\LaggingGraphicObject.cs" />
</ItemGroup>
<ItemGroup>
<None Include="image\u.svg">
@@ -351,7 +350,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="OpenTK.dll.config" />
- <None Include="packages.config" />
<None Include="Interfaces\Divers\testShape.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
@@ -382,6 +380,18 @@
<None Include="Interfaces\TemplatedContainer\testTabView2.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
+ <None Include="Interfaces\Divers\testFocus.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\Divers\testMenu.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\Divers\testVisibility.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ <None Include="Interfaces\CheckBox2.imlt">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
@@ -395,7 +405,6 @@
<Folder Include="Interfaces\TemplatedContainer\" />
<Folder Include="Interfaces\TemplatedGroup\" />
<Folder Include="GraphicObjects\" />
- <Folder Include="Tutorials\" />
<Folder Include="Interfaces\DragAndDrop\" />
<Folder Include="Interfaces\Experimental\" />
</ItemGroup>
@@ -417,18 +426,26 @@
<EmbeddedResource Include="ui\MenuItem.style" />
<EmbeddedResource Include="test.style" />
<EmbeddedResource Include="Interfaces\treeList.crow" />
- <EmbeddedResource Include="Interfaces\CheckBox2.imlt" />
<EmbeddedResource Include="Interfaces\perfMsr.crow" />
<EmbeddedResource Include="ui\showcase.crow" />
- <EmbeddedResource Include="Tutorials\test.crow">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </EmbeddedResource>
<EmbeddedResource Include="Interfaces\TabItem.template">
<LogicalName>Crow.TabItem.template</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="ui\dbgLog.crow" />
+ <EmbeddedResource Include="Interfaces\Experimental\DockWindow.template">
+ <LogicalName>Crow.DockWindow.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="ui\MenuItem.template">
+ <LogicalName>Crow.MenuItem.template</LogicalName>
+ </EmbeddedResource>
+ <EmbeddedResource Include="image\blank-file.svg" />
+ <EmbeddedResource Include="ui\dbgLogColors.crow" />
+ <EmbeddedResource Include="Interfaces\colorItem2.crow">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Crow.csproj">
+ <ProjectReference Include="..\Crow\Crow.csproj">
<Project>{C2980F9B-4798-4C05-99E2-E174810F7C7B}</Project>
<Name>Crow</Name>
</ProjectReference>
diff --git a/Tests/Tutorials/T1_HelloWorld.cs b/Tests/Tutorials/T1_HelloWorld.cs
deleted file mode 100644
index 539085d5..00000000
--- a/Tests/Tutorials/T1_HelloWorld.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-
-namespace Tutorials
-{
- class T1_HelloWorld : CrowWindow
- {
- public T1_HelloWorld ()
- : base(800, 600,"Hello World")
- {
- }
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
- AddWidget (new Label (CurrentInterface) { Text = "Hello World" });
- }
-
- [STAThread]
- static void Main ()
- {
- T1_HelloWorld win = new T1_HelloWorld ();
- win.Run (30);
- }
- }
-} \ No newline at end of file
diff --git a/Tests/Tutorials/T2_IML.cs b/Tests/Tutorials/T2_IML.cs
deleted file mode 100644
index 57eea835..00000000
--- a/Tests/Tutorials/T2_IML.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-
-namespace Tutorials
-{
- class T2_IML : CrowWindow
- {
- public T2_IML ()
- : base(800, 600,"First app with OpenTK")
- {
- }
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
- Load ("#Tests.Tutorials.test.crow");
- }
-
- [STAThread]
- static void Main ()
- {
- T2_IML win = new T2_IML ();
- win.Run (30);
- }
- }
-} \ No newline at end of file
diff --git a/Tests/Tutorials/T3_OpenGLCube.cs b/Tests/Tutorials/T3_OpenGLCube.cs
deleted file mode 100644
index 2cada668..00000000
--- a/Tests/Tutorials/T3_OpenGLCube.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// HelloCube.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using OpenTK;
-using OpenTK.Graphics.OpenGL;
-using Crow;
-
-namespace Tutorials
-{
- class T3_OpenGLCube : CrowWindow
- {
- [STAThread]
- static void Main ()
- {
- T3_OpenGLCube win = new T3_OpenGLCube ();
- win.Run (30);
- }
-
- public T3_OpenGLCube ()
- : base(800, 600,"Crow Test with OpenTK")
- {
- }
-
- vaoMesh cube;
- Texture texture;
- Matrix4 projection, modelview;
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
-
- GL.Enable (EnableCap.CullFace);
- GL.Enable (EnableCap.Blend);
- GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
-
- cube = vaoMesh.CreateCube ();
- texture = new Texture ("image/textest.png");
-
- projection =
- Matrix4.CreatePerspectiveFieldOfView (
- MathHelper.PiOver4,
- ClientRectangle.Width / (float)ClientRectangle.Height, 1.0f, 10.0f);
- modelview = Matrix4.LookAt(new Vector3(5,5,5), Vector3.Zero, Vector3.UnitZ);
-
- AddWidget(
- new Window (this.CurrentInterface)
- {
- Caption = "Hello World"
- }
- );
- }
- public override void OnRender (FrameEventArgs e)
- {
- base.OnRender (e);
-
- shader.SetMVP(modelview * projection);
-
- GL.BindTexture (TextureTarget.Texture2D, texture);
- cube.Render (BeginMode.Triangles);
- GL.BindTexture (TextureTarget.Texture2D, 0);
- }
- }
-} \ No newline at end of file
diff --git a/Tests/Tutorials/T4_Gauge.cs b/Tests/Tutorials/T4_Gauge.cs
deleted file mode 100644
index d909843e..00000000
--- a/Tests/Tutorials/T4_Gauge.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// HelloWorld.cs
-//
-// Author:
-// Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// Copyright (c) 2013-2017 Jean-Philippe Bruyère
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-using Crow;
-
-namespace Tutorials
-{
- class T4_Gauge : CrowWindow
- {
- public T4_Gauge ()
- : base(800, 600,"Simple Gauge Tutorial")
- {
- }
-
- protected override void OnLoad (EventArgs e)
- {
- base.OnLoad (e);
- AddWidget (new SimpleGauge (CurrentInterface) {
- Level = 40,
- Width = 30, Height = "50%",
- Foreground = Color.DarkBlue, Background = Color.DimGray
- });
- }
-
- [STAThread]
- static void Main ()
- {
- T4_Gauge win = new T4_Gauge ();
- win.Run (30);
- }
- }
-} \ No newline at end of file
diff --git a/Tests/Tutorials/test.crow b/Tests/Tutorials/test.crow
deleted file mode 100755
index a1299e79..00000000
--- a/Tests/Tutorials/test.crow
+++ /dev/null
@@ -1,3 +0,0 @@
-<Window Height="400" Width="50%" Caption="My first Window">
- <Label Text="Hello World"/>
-</Window> \ No newline at end of file
diff --git a/Tests/image/blank-file.svg b/Tests/image/blank-file.svg
new file mode 100644
index 00000000..8136979e
--- /dev/null
+++ b/Tests/image/blank-file.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generated by IcoMoon.io -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16">
+<path fill="#FFFFFF" d="M10 0h-8v16h12v-12l-4-4zM9 5h4v10h-10v-14h6v4zM10 4v-3l3 3h-3z"></path>
+</svg>
diff --git a/Tests/keysyms.cs b/Tests/keysyms.cs
new file mode 100644
index 00000000..e33add92
--- /dev/null
+++ b/Tests/keysyms.cs
@@ -0,0 +1,85 @@
+//
+// keysyms.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using System.IO;
+
+namespace Tests
+{
+ static class keysyms
+ {
+ public static void Main(string[] args)
+ {
+ using (StreamWriter sw = new StreamWriter ("test.cs")) {
+ using (StreamReader r = new StreamReader ("/usr/include/xkbcommon/xkbcommon-keysyms.h")) {
+ bool skip = false;
+ int maxChar = 0;
+ sw.WriteLine ("/* autogenerated */");
+ sw.WriteLine ("using System;\n");
+ sw.WriteLine ("namespace Crow.XCB");
+ sw.WriteLine ("{");
+ sw.WriteLine ("\t[Flags]");
+ sw.WriteLine ("\tpublic enum KeySym");
+ sw.WriteLine ("\t{");
+ r.ReadLine ();
+ r.ReadLine ();
+ while (!r.EndOfStream) {
+ string s = r.ReadLine ().Trim();
+ if (skip) {
+ if (s.EndsWith ("*/"))
+ skip = false;
+ continue;
+ }
+ if (s.StartsWith ("/*")) {
+ if (!s.EndsWith ("*/"))
+ skip = true;
+ continue;
+ }
+ if (!s.StartsWith ("#define"))
+ continue;
+ string[] tmp = s.Split (new char[] {' ', '\t'}, StringSplitOptions.RemoveEmptyEntries);
+
+ string keyName = tmp [1].Substring (8);
+ if (char.IsDigit (keyName [0]))
+ keyName = "key_" + keyName;
+
+ if (keyName.Length > maxChar)
+ maxChar = keyName.Length;
+
+ int nbTab = keyName.Length / 4;
+ nbTab = 8 - nbTab;
+
+ sw.WriteLine ("\t\t{0}{1}= {2},", keyName, new String('\t',nbTab), tmp[2]);
+ }
+ sw.WriteLine ("\t}");
+ sw.WriteLine ("}");
+ Console.WriteLine ("max char: " + maxChar.ToString ());
+ }
+
+ }
+ }
+ }
+}
+
diff --git a/Tests/packages.config b/Tests/packages.config
deleted file mode 100644
index b3717663..00000000
--- a/Tests/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="OpenTK" version="2.0.0" targetFramework="net45" />
-</packages> \ No newline at end of file
diff --git a/Tests/test.style b/Tests/test.style
index 5539b3d0..14971b88 100644
--- a/Tests/test.style
+++ b/Tests/test.style
@@ -3,7 +3,7 @@
Font = "droid, 10";
Margin = "0";
TextAlignment = "Center";
- Background = "DimGray";
+ Background = "DimGrey";
}
FpsDisp {
Font = "droid bold, 10";
@@ -13,13 +13,13 @@ FpsDisp {
Background = "MediumSeaGreen";
}
CheckBox2 {
- Template= "#Tests.Interfaces.CheckBox2.imlt";
+ Template= "Interfaces/CheckBox2.imlt";
Background = "Jet";
Checked="{Background=MediumSeaGreen}";
Unchecked = "{Background=Jet}";
}
RadioButton2 {
- Template="#Tests.Interfaces.CheckBox2.imlt";
+ Template="Interfaces/CheckBox2.imlt";
Background = "Jet";
Checked = "{Background=MediumSeaGreen}";
Unchecked = "{Background=Jet}";
@@ -32,3 +32,12 @@ labPerfVal{
Font = "droid, 8";
Width = "50%";
}
+DbgLogViewer{
+ Background = "Onyx";
+ Font = "mono, 8";
+ Foreground = "LightGrey";
+ Focusable = "true";
+}
+DockWindow{
+ Background = "0.1,0.1,0.1,0.5";
+} \ No newline at end of file
diff --git a/Tests/ui/LabelButton.style b/Tests/ui/LabelButton.style
index 7182d868..4e61c38b 100644
--- a/Tests/ui/LabelButton.style
+++ b/Tests/ui/LabelButton.style
@@ -1,8 +1,8 @@
-MouseEnter = "{Background = Gray;Foreground = White;}";
+MouseEnter = "{Background = Grey;Foreground = White;}";
Fit = "true";
-MouseLeave = "{Background=Transparent;Foreground=Gray;}";
+MouseLeave = "{Background=Transparent;Foreground=Grey;}";
MouseDown = "{Background=Red;Foreground=White;}";
-MouseUp = "{Background=Gray;Foreground=White;}";
-Foreground="Gray";
+MouseUp = "{Background=Grey;Foreground=White;}";
+Foreground="Grey";
Margin="5";
CornerRadius="5";
diff --git a/Tests/ui/MenuItem.style b/Tests/ui/MenuItem.style
index 969a4abc..2c0ada73 100644
--- a/Tests/ui/MenuItem.style
+++ b/Tests/ui/MenuItem.style
@@ -4,8 +4,8 @@ MinimumSize="60;10";
Margin="2";
CornerRadius="0";
TextAlignment="Left";
-Foreground="Gray";
-MouseEnter = "{Background=SeaGreen;Foreground=White;}";
-MouseLeave = "{Background=Transparent;Foreground=Gray;}";
-MouseDown = "{Background=White;Foreground=DimGray;}";
+Foreground="Grey";
+//MouseEnter = "{Background=SeaGreen;Foreground=White;}";
+//MouseLeave = "{Background=Transparent;Foreground=Grey;}";
+MouseDown = "{Background=White;Foreground=DimGrey;}";
MouseUp = "{Background=SeaGreen;Foreground=White;}";
diff --git a/Tests/ui/MenuItem.template b/Tests/ui/MenuItem.template
new file mode 100644
index 00000000..e959b7d2
--- /dev/null
+++ b/Tests/ui/MenuItem.template
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<Popper Font="{./Font}" Caption="{./Caption}" Background="{./Background}" PopDirection="{./PopDirection}"
+ Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseClick="./onMI_Click"
+ IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}" IsEnabled="{./IsEnabled}">
+ <Template>
+ <CheckBox IsChecked="{²./IsPopped}" Caption="{./Caption}" Background="{./Background}" Foreground="{./Foreground}">
+ <Template>
+ <Border Name="border1"
+ MinimumSize = "40,0"
+ Foreground="Transparent"
+ Background="{./Background}">
+ <HorizontalStack HorizontalAlignment="Left" Margin="1">
+ <Image Width="10" Height="10" Picture="{../../../../../Icon}"/>
+ <Label Text="{./Caption}"
+ Foreground="{./Foreground}"
+ Font="{./Font}" />
+ </HorizontalStack>
+ </Border>
+ </Template>
+ </CheckBox>
+ </Template>
+ <Border Foreground="DimGrey" Width="{../PopWidth}" Height="{../PopHeight}" Background="Jet">
+ <VerticalStack Name="ItemsContainer"/>
+ </Border>
+</Popper>
diff --git a/Tests/ui/dbgLog.crow b/Tests/ui/dbgLog.crow
new file mode 100755
index 00000000..cf7e2ae4
--- /dev/null
+++ b/Tests/ui/dbgLog.crow
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<Window Width="Stretched" Height="Stretched">
+ <VerticalStack>
+ <HorizontalStack Height="Fit">
+ <Label Text="Scale X:"/>
+ <Label Text="{../../view.XScale}"/>
+ <Label Text="Scroll X:"/>
+ <Label Text="{../../view.ScrollX}"/>
+ <Label Text="Max Scroll X:"/>
+ <Label Text="{../../view.MaxScrollX}"/>
+ <Label Text="Scroll Y:"/>
+ <Label Text="{../../view.ScrollY}"/>
+ <Label Text="Visible Lines:"/>
+ <Label Text="{../../view.VisibleLines}"/>
+ <Label Text="Visible Ticks:"/>
+ <Label Text="{../../view.VisibleTicks}"/>
+ <Label Text="CurrentLine:"/>
+ <Label Text="{../../view.CurrentLine}"/>
+ </HorizontalStack>
+ <HorizontalStack>
+ <DbgLogViewer Margin="0" Name="view" LogFile="debug.log" MouseWheelSpeed="10"/>
+ <ScrollBar Name="scrollbar1" Orientation="Vertical"
+ Value="{²../view.ScrollY}" Maximum="{../view.MaxScrollY}"
+ CursorSize="{../view.ChildHeightRatio}"
+ LargeIncrement="{../view.PageHeight}" SmallIncrement="30"
+ Width="12" />
+ </HorizontalStack>
+ <ScrollBar Style="HScrollBar" Name="scrollbarX" Orientation="Horizontal"
+ Value="{²../view.ScrollX}" Maximum="{../view.MaxScrollX}"
+ CursorSize="{../view.ChildWidthRatio}"
+ LargeIncrement="{../view.PageWidth}" SmallIncrement="30"
+ Height="12" />
+ </VerticalStack>
+</Window> \ No newline at end of file
diff --git a/Tests/ui/dbgLogColors.crow b/Tests/ui/dbgLogColors.crow
new file mode 100755
index 00000000..cc9fdb24
--- /dev/null
+++ b/Tests/ui/dbgLogColors.crow
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<Window Template="#Crow.ToolWindow.template" AlwaysOnTop="true" Width="400" Height="300"
+ HorizontalAlignment="Right" VerticalAlignment="Bottom">
+ <VerticalStack>
+ <Button Caption="update" MouseClick="onColorUpdate"/>
+ <HorizontalStack Height="Fit" DataSource="{../kvpList.SelectedItem}" Margin="10">
+ <Label Text="{Key}" Margin="0" Width="Stretched" Font="mono, 8"/>
+ <ComboBox Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem2.crow" Name="combo"
+ SelectedItem="{Value}">
+ <Template>
+ <Popper Caption="{./SelectedItem}" Name="popper" PopDirection="Bottom" Foreground="{./Foreground}" Background="{./Background}">
+ <Template>
+ <CheckBox Caption="{./Caption}" IsChecked="{²./IsPopped}" Foreground="{./Foreground}" Background="{./Background}">
+ <Template>
+ <Border CornerRadius="0" Foreground="LightGrey">
+ <HorizontalStack Margin="0" Spacing="1">
+ <!---<GraphicObject Height="8" Width="14" Background="{./Caption}" Margin="0" CornerRadius="2"/>-->
+ <Label MinimumSize="80,10" Text="{./Caption}" Margin="0" Width="Stretched" Font="mono, 8"/>
+ <Button Width="14" Height="14" Focusable="false"
+ Template="#Crow.Templates.ArrowBut.template">
+ <Image Margin="0" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/>
+ </Button>
+ </HorizontalStack>
+ </Border>
+ </Template>
+ </CheckBox>
+ </Template>
+ <Border Background="DimGrey" BorderWidth="1" Margin="1"
+ MinimumSize="{../../MinimumPopupSize}" Fit="true">
+ <Scroller Name="scroller1" Margin="2"
+ MaximumSize="0,200"
+ HorizontalAlignment="Left">
+ <VerticalStack
+ Height="Fit" Name="ItemsContainer" Margin="0"
+ HorizontalAlignment="Left"
+ VerticalAlignment="Top"/>
+ </Scroller>
+ </Border>
+ </Popper>
+ </Template>
+ </ComboBox>
+ <GraphicObject Height="8" Width="14" Background="{Value}" Margin="0" CornerRadius="2"/>
+ </HorizontalStack>
+ <HorizontalStack>
+ <ListBox Name="kvpList" Data="{ColorsKVPList}" Margin="0"
+ Template="#Crow.Templates.ScrollingListBox.template">
+ <ItemTemplate>
+ <Border Foreground="Transparent" Focusable="true" HorizontalAlignment="Left" Height="Fit">
+ <HorizontalStack Margin="0"
+ MouseEnter="{Background=CornflowerBlue}"
+ MouseLeave="{Background=Transparent}">
+ <GraphicObject Height="8" Width="14" Background="{Value}" Margin="0" CornerRadius="2"/>
+ <Label Text="{Key}" Margin="0" Width="Stretched" Font="mono, 8"/>
+ </HorizontalStack>
+ </Border>
+ </ItemTemplate>
+ </ListBox>
+ </HorizontalStack>
+ </VerticalStack>
+</Window> \ No newline at end of file
diff --git a/Tests/ui/showcase.crow b/Tests/ui/showcase.crow
index 956e236d..f14e965c 100755
--- a/Tests/ui/showcase.crow
+++ b/Tests/ui/showcase.crow
@@ -3,7 +3,7 @@
<DirectoryView Name="dv" CurrentDirectory="Interfaces" Width="25%" SelectedItemChanged="Dv_SelectedItemChanged"/>
<Splitter Width="6"/>
<VerticalStack>
- <Container Name="CrowContainer" Height="60%" Background="DimGray"/>
+ <Container Name="CrowContainer" Height="60%" Background="DimGrey"/>
<Splitter/>
<HorizontalStack>
<Scroller Name="scroller1" Background="White"
diff --git a/Tests/ui/test.crow b/Tests/ui/test.crow
index 64ba349e..663fd934 100755
--- a/Tests/ui/test.crow
+++ b/Tests/ui/test.crow
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<Window Font="droid bold, 10" Caption="Open GL" HorizontalAlignment="Left" Width="30%" Height="90%">
<VerticalStack>
- <HorizontalStack Background="DimGray" Height="Fit" Width="Stretched" Margin="2">
+ <HorizontalStack Background="DimGrey" Height="Fit" Width="Stretched" Margin="2">
<Popper Caption="File" Template="#Tests.ui.Popper.template" Width="Fit">
- <Border Fit="True" Foreground="Gray" Background="DimGray">
+ <Border Fit="True" Foreground="Grey" Background="DimGrey">
<VerticalStack Height="Fit" Width="Fit" Margin="2">
<Label Text="New File" Style="#Tests.ui.MenuItem.style" />
<Label Text="Open..." Style="#Tests.ui.MenuItem.style"/>
diff --git a/Tests/ui/test.style b/Tests/ui/test.style
index fe85d912..932fb6b7 100644
--- a/Tests/ui/test.style
+++ b/Tests/ui/test.style
@@ -1,3 +1,3 @@
BlueLabel {
- Background = Blue;
+ Background = "Blue";
}