aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/dockableWindows/dockableWindows.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-08-20 20:23:23 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-08-20 20:23:23 +0200
commit5ded9101522573336813c88d49e2ed27d70429fb (patch)
treec1882937d54dab93be02a084b05dfb23cae517a1 /Samples/dockableWindows/dockableWindows.cs
parent36f62cf1ca61cb10c6958787376ae76efb71a1ea (diff)
keep only HelloWorld, ShowCase and PerfTests samplesv0.9.5-beta
Diffstat (limited to 'Samples/dockableWindows/dockableWindows.cs')
-rw-r--r--Samples/dockableWindows/dockableWindows.cs62
1 files changed, 0 insertions, 62 deletions
diff --git a/Samples/dockableWindows/dockableWindows.cs b/Samples/dockableWindows/dockableWindows.cs
deleted file mode 100644
index 1dccc7b8..00000000
--- a/Samples/dockableWindows/dockableWindows.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using Crow;
-using Glfw;
-using Samples;
-
-namespace tests
-{
- public class BasicTests : SampleBase
- {
- static void Main ()
- {
- using (BasicTests app = new BasicTests ()) {
- app.SolidBackground = false;
- app.Run ();
- }
- }
-
- Color[] colors =
- {
- Colors.Blue,
- Colors.Red,
- Colors.Green,
- Colors.DarkOrchid,
- Colors.DarkOrange,
- Colors.DarkOliveGreen,
- Colors.Cyan,
- Colors.Chartreuse,
- };
- DockStack mainStack;
- protected override void OnInitialized () {
- Load ("#ui.test.crow").DataSource = this;
- mainStack = FindByName ("mainDock") as DockStack;
- AddWidget (new DockWindow (this) { Background = Colors.Blue, Left = 10, Top = 110, Resizable = true, Caption = "win1" });
- AddWidget (new DockWindow (this) { Background = Colors.Red, Left = 30, Top = 130, Resizable = true, Caption = "win2" });
- AddWidget (new DockWindow (this) { Background = Colors.Green, Left = 50, Top = 150, Resizable = true, Caption = "win3" });
- AddWidget (new DockWindow (this) { Background = Colors.BurlyWood, Left = 70, Top = 170, Resizable = true, Caption = "win4" });
- AddWidget (new DockWindow (this) { Background = Colors.DarkOrchid, Left = 90, Top = 190, Resizable = true, Caption = "win5" });
- }
- private void refreshGraphicTree (object sender, MouseButtonEventArgs e) {
- NotifyValueChanged ("GraphicTree", (object)null);
- NotifyValueChanged ("GraphicTree", GraphicTree);
- }
- int colorIdx = 0;
- int nameIdx = 6;
- public override bool OnKeyDown (Key key) {
- if (colorIdx >= colors.Length)
- colorIdx = 0;
- switch (key) {
- case Key.F6:
- AddWidget (new DockWindow (this) { Background = colors[colorIdx++], Left = 90, Top = 190, Resizable = true, Caption = $"win{nameIdx++}" });
- return true;
- case Key.F2:
- Configuration.Global.Set<string> ("WindowConfigTest", mainStack.ExportConfig());
- return true;
- case Key.F3:
- mainStack.ImportConfig (Configuration.Global.Get<string> ("WindowConfigTest"));
- return true;
- default:
- return base.OnKeyDown (key);
- }
- }
- }
-}