aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/dockableWindows
diff options
context:
space:
mode:
Diffstat (limited to 'Samples/dockableWindows')
-rw-r--r--Samples/dockableWindows/dockableWindows.cs62
-rw-r--r--Samples/dockableWindows/dockableWindows.csproj13
-rw-r--r--Samples/dockableWindows/ui/GTreeExp.itemp32
-rw-r--r--Samples/dockableWindows/ui/TabView.template32
-rw-r--r--Samples/dockableWindows/ui/dock.style15
-rw-r--r--Samples/dockableWindows/ui/dockWin.template43
-rw-r--r--Samples/dockableWindows/ui/test.crow46
7 files changed, 0 insertions, 243 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);
- }
- }
- }
-}
diff --git a/Samples/dockableWindows/dockableWindows.csproj b/Samples/dockableWindows/dockableWindows.csproj
deleted file mode 100644
index 3c9729fe..00000000
--- a/Samples/dockableWindows/dockableWindows.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project Sdk="Microsoft.NET.Sdk">
- <ItemGroup>
- <EmbeddedResource Include="ui\*.*">
- <LogicalName>ui.%(Filename)%(Extension)</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Update="ui\GTreeExp.itemp">
- <LogicalName>ui.%(Filename)%(Extension)</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/Samples/dockableWindows/ui/GTreeExp.itemp b/Samples/dockableWindows/ui/GTreeExp.itemp
deleted file mode 100644
index f2a7c2ba..00000000
--- a/Samples/dockableWindows/ui/GTreeExp.itemp
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<Expandable IsExpanded="{²IsExpanded}" MouseDoubleClick="/onClickForExpand">
- <Template>
- <VerticalStack>
- <Border CornerRadius="2" Margin="0" Height="Fit"
- Foreground="Transparent"
- MouseEnter="{Foreground=DimGrey}"
- MouseLeave="{Foreground=Transparent}">
- <HorizontalStack Spacing="1">
- <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
- Path="{./Image}"
- Visible="{./IsExpandable}"
- SvgSub="{./IsExpanded}"
- MouseEnter="{Background=LightGrey}"
- MouseLeave="{Background=Transparent}"/>
- <Border Width="16" Height="16" Foreground="Black" Background="DimGrey">
- <Image Margin="2" Path="{GetIcon}" />
- </Border>
- <Widget Width="5" Height="5" Background="Blue" Visible="{IsHover}"/>
- <Widget Width="5" Height="5" Background="Green" Visible="{Visible}"/>
- <Label Text="{Name}" Width="Fit"/>
- <Label Text="{LogicalParent}" Width="Stretched" Foreground="Yellow"/>
- </HorizontalStack>
- </Border>
- <Container Name="Content" Visible="false"/>
- </VerticalStack>
- </Template>
- <HorizontalStack Height="Fit">
- <Widget Width="8" Height="10"/>
- <VerticalStack Height="Fit" Name="ItemsContainer"/>
- </HorizontalStack>
-</Expandable>
diff --git a/Samples/dockableWindows/ui/TabView.template b/Samples/dockableWindows/ui/TabView.template
deleted file mode 100644
index 9490aa7f..00000000
--- a/Samples/dockableWindows/ui/TabView.template
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Spacing="0" Background="{./Background}">
- <ListBox Data="{./Items}" Fit="true" HorizontalAlignment="Left" VerticalAlignment="Top" SelectedItem="{²./SelectedItem}">
- <Template>
- <HorizontalStack Name="ItemsContainer" />
- </Template>
- <ItemTemplate>
- <!--<ListItem Fit="true" Background="Transparent" IsSelected="{IsVisible}"
- Selected="{.DataSource.Visible='true'};{Background=.DataSource.Background}"
- Unselected="{.DataSource.Visible='false'};{Background=Transparent}">
- <Label Text="{Caption}" Margin="5" />
- </ListItem>-->
- <ListItem Fit="true" Background="Transparent" IsSelected="{IsVisible}"
- Selected="{.DataSource.Visible='true'};{Background=.DataSource.Background}"
- Unselected="{.DataSource.Visible='false'};{Background=Transparent}">
- <HorizontalStack Margin="2" >
- <Label Text="{Caption}" Margin="3" />
- <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="10" Width="10" VerticalAlignment="Center"
- MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
- <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Icons.exit2.svg"
- MouseClick="onQuitPress"/>
- </Border>
- </HorizontalStack>
- </ListItem>
- </ItemTemplate>
- </ListBox>
- <VerticalStack>
- <Group Name="ItemsContainer" />
- <Label DataSource="{../../../SelectedItem}" Text="{Caption}" Background="White" Foreground="Black"/>
- </VerticalStack>
-</VerticalStack>
-
diff --git a/Samples/dockableWindows/ui/dock.style b/Samples/dockableWindows/ui/dock.style
deleted file mode 100644
index 49c7f03c..00000000
--- a/Samples/dockableWindows/ui/dock.style
+++ /dev/null
@@ -1,15 +0,0 @@
-DockStack {
- Margin="0";
- Spacing="0";
- //Background="DimGrey";
-}
-DockWindow {
- Template="#ui.dockWin.template";
- AllowedStates="Normal|Maximized|Minimized";
- Width="260";
- Height="200";
-}
-TabView {
- Template="#ui.TabView.template";
- //Background="Onyx";
-} \ No newline at end of file
diff --git a/Samples/dockableWindows/ui/dockWin.template b/Samples/dockableWindows/ui/dockWin.template
deleted file mode 100644
index 971be0c4..00000000
--- a/Samples/dockableWindows/ui/dockWin.template
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<Border Name="SizeHandle" BorderWidth="1" Foreground="Black" CornerRadius="{./CornerRadius}" StickyMouse="8" StickyMouseEnabled="{./IsFloating}"
- Background="{./Background}">
- <VerticalStack Spacing="0" Name="MoveHandle">
- <HorizontalStack Height="Fit" IsVisible="{./IsDocked}" Background="Black">
- <Label Text="{./Caption}"/>
- <Label Text="{./CurrentState}" Margin="1" Foreground="Black" Background="Grey"/>
- <Label Text="{./DockingPosition}"/>
- <ListBox Data="{./DockCommands}" Fit="true">
- <Template>
- <HorizontalStack Name="ItemsContainer" />
- </Template>
- <ItemTemplate Path="#Crow.WindowButton.template"/>
- </ListBox>
- <ListBox Data="{./Commands}" Fit="true">
- <Template>
- <HorizontalStack Name="ItemsContainer" />
- </Template>
- <ItemTemplate Path="#Crow.WindowButton.template"/>
- </ListBox>
- </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}">
- <Widget Width="5"/>
- <Image Margin="1" Width="10" Height="10" Path="{./Icon}"/>
- <Label Text="{./Caption}"/>
- <Label Text="{./CurrentState}" Margin="1" Foreground="Black" Background="Grey"/>
- <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Left" Text="{./DockingPosition}" />
- <ListBox Data="{./DockCommands}" Fit="true">
- <Template>
- <HorizontalStack Name="ItemsContainer" />
- </Template>
- <ItemTemplate Path="#Crow.WindowButton.template"/>
- </ListBox>
- <ListBox Data="{./Commands}" Fit="true">
- <Template>
- <HorizontalStack Name="ItemsContainer" />
- </Template>
- <ItemTemplate Path="#Crow.WindowButton.template"/>
- </ListBox> </HorizontalStack>
- <Container Name="Content" MinimumSize="50,50"/>
- </VerticalStack>
-</Border>
diff --git a/Samples/dockableWindows/ui/test.crow b/Samples/dockableWindows/ui/test.crow
deleted file mode 100644
index 1e4e81e4..00000000
--- a/Samples/dockableWindows/ui/test.crow
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<VerticalStack Background="DimGrey">
- <VerticalStack Name="Watches" Background="Black" Height="Fit" Width="Stretched">
- <HorizontalStack Height="Fit">
- <Label Style="smallLabel" Text="hover:" Width="50"/>
- <Label Style="smallLabel" Text="{HoverWidget}"/>
- </HorizontalStack>
- <HorizontalStack Height="Fit">
- <Label Style="smallLabel" Text="focus:" Width="50"/>
- <Label Style="smallLabel" Text="{FocusedWidget}"/>
- </HorizontalStack>
- <HorizontalStack Height="Fit">
- <Label Style="smallLabel" Text="active:" Width="50"/>
- <Label Style="smallLabel" Text="{ActiveWidget}"/>
- </HorizontalStack>
- </VerticalStack>
- <Label Text="Press 'F6' to add new windows, 'F2'/'F3' for save/restore"/>
- <DockStack Name="mainDock" Height="Stretched" />
- <!--<Splitter/>
- <Button Caption="Refresh tree" MouseClick="refreshGraphicTree"/>
- <TreeView IsRoot="true" Name="treeView" Data="{GraphicTree}" Height="200">
- <ItemTemplate>
- <Border Width="Stretched" Focusable="true" Foreground="Transparent">
- <HorizontalStack Spacing="5">
- <Widget Width="5" Height="5"/>
- <Border Width="16" Height="16" Foreground="Black" Background="DimGrey">
- <Image Margin="2" Path="{GetIcon}" />
- </Border>
- <Widget Width="2" Height="5" Background="Blue" Visible="{IsHover}"/>
- <Widget Width="5" Height="5" Background="Green" Visible="{Visible}"/>
- <Label Text="{Caption}" Width="Fit"/>
- <Label Text="{Name}" Width="Fit"/>
- <Label Text="{LogicalParent}" Width="Stretched" Foreground="Yellow"/>
- </HorizontalStack>
- </Border>
- </ItemTemplate>
- <ItemTemplate DataType="Crow.Group" Data="GetChildren"
- Path="#ui.GTreeExp.itemp"/>
- <ItemTemplate DataType="Crow.Container" Data="GetChildren"
- Path="#ui.GTreeExp.itemp"/>
- <ItemTemplate DataType="Crow.TemplatedContainer" Data="GetChildren"
- Path="#ui.GTreeExp.itemp"/>
- <ItemTemplate DataType="Crow.TemplatedGroup" Data="GetChildren"
- Path="#ui.GTreeExp.itemp"/>
- </TreeView>-->
-</VerticalStack>