aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/dockableWindows/ui
diff options
context:
space:
mode:
Diffstat (limited to 'Samples/dockableWindows/ui')
-rw-r--r--Samples/dockableWindows/ui/TabView.template32
-rw-r--r--Samples/dockableWindows/ui/dock.style12
-rw-r--r--Samples/dockableWindows/ui/dockWin.template24
-rw-r--r--Samples/dockableWindows/ui/test.crow11
4 files changed, 74 insertions, 5 deletions
diff --git a/Samples/dockableWindows/ui/TabView.template b/Samples/dockableWindows/ui/TabView.template
new file mode 100644
index 00000000..9490aa7f
--- /dev/null
+++ b/Samples/dockableWindows/ui/TabView.template
@@ -0,0 +1,32 @@
+<?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
new file mode 100644
index 00000000..ef3f43e1
--- /dev/null
+++ b/Samples/dockableWindows/ui/dock.style
@@ -0,0 +1,12 @@
+DockStack {
+ Margin="0";
+ Spacing="0";
+ //Background="DimGrey";
+}
+DockWindow {
+ Template="#ui.dockWin.template";
+}
+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
new file mode 100644
index 00000000..c53b260c
--- /dev/null
+++ b/Samples/dockableWindows/ui/dockWin.template
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Border Name="SizeHandle" BorderWidth="1" Foreground="Black" CornerRadius="{./CornerRadius}" StickyMouse="8" StickyMouseEnabled="{./IsFloating}"
+ Background="{./Background}">
+ <VerticalStack Spacing="0">
+ <HorizontalStack Height="Fit" IsVisible="{./IsDocked}" Background="Black">
+ <Label Text="{./Caption}"/>
+ <Label Text="{./DockingPosition}"/>
+ </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 Width="Stretched" Foreground="White" Margin="1" TextAlignment="Left" Text="{./DockingPosition}" />
+ <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="./onQuitPress"/>
+ </Border>
+ <Widget Width="5"/>
+ </HorizontalStack>
+ <Container Name="Content" MinimumSize="50,50"/>
+ </VerticalStack>
+</Border>
diff --git a/Samples/dockableWindows/ui/test.crow b/Samples/dockableWindows/ui/test.crow
index f576fbbd..1e4e81e4 100644
--- a/Samples/dockableWindows/ui/test.crow
+++ b/Samples/dockableWindows/ui/test.crow
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<VerticalStack>
+<VerticalStack Background="DimGrey">
<VerticalStack Name="Watches" Background="Black" Height="Fit" Width="Stretched">
<HorizontalStack Height="Fit">
<Label Style="smallLabel" Text="hover:" Width="50"/>
@@ -14,11 +14,11 @@
<Label Style="smallLabel" Text="{ActiveWidget}"/>
</HorizontalStack>
</VerticalStack>
- <Label Text="Press 'F6' to add new windows"/>
- <DockStack Name="mainDock" Height="Stretched"/>
+ <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}">
+ <TreeView IsRoot="true" Name="treeView" Data="{GraphicTree}" Height="200">
<ItemTemplate>
<Border Width="Stretched" Focusable="true" Foreground="Transparent">
<HorizontalStack Spacing="5">
@@ -28,6 +28,7 @@
</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>
@@ -41,5 +42,5 @@
Path="#ui.GTreeExp.itemp"/>
<ItemTemplate DataType="Crow.TemplatedGroup" Data="GetChildren"
Path="#ui.GTreeExp.itemp"/>
- </TreeView> -->
+ </TreeView>-->
</VerticalStack>