aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/Divers
diff options
context:
space:
mode:
Diffstat (limited to 'Samples/common/ui/Interfaces/Divers')
-rw-r--r--Samples/common/ui/Interfaces/Divers/colorPicker.crow2
-rw-r--r--Samples/common/ui/Interfaces/Divers/colorSlider.crow75
-rw-r--r--Samples/common/ui/Interfaces/Divers/colorSlider2.crow78
-rw-r--r--Samples/common/ui/Interfaces/Divers/colorSlider3.crow47
-rw-r--r--Samples/common/ui/Interfaces/Divers/colorSlider4.crow13
-rw-r--r--Samples/common/ui/Interfaces/Divers/image.crow2
-rw-r--r--Samples/common/ui/Interfaces/Divers/observableList.crow3
-rw-r--r--Samples/common/ui/Interfaces/Divers/testShape.crow9
-rw-r--r--Samples/common/ui/Interfaces/Divers/testSlider.crow3
9 files changed, 227 insertions, 5 deletions
diff --git a/Samples/common/ui/Interfaces/Divers/colorPicker.crow b/Samples/common/ui/Interfaces/Divers/colorPicker.crow
index dc4a6abe..c1912be6 100644
--- a/Samples/common/ui/Interfaces/Divers/colorPicker.crow
+++ b/Samples/common/ui/Interfaces/Divers/colorPicker.crow
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<VerticalStack>
- <ColorPicker CurrentColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Width="250" />
+ <ColorPicker CurrentColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Width="400" />
<Widget Name="go" Width="100" Height="60" Background="DarkBlue"/>
<Widget Width="100" Height="60" Background="{../colorPicker.CurrentColor}"/>
<Label Text="{../colorPicker.CurrentColor}"/>
diff --git a/Samples/common/ui/Interfaces/Divers/colorSlider.crow b/Samples/common/ui/Interfaces/Divers/colorSlider.crow
new file mode 100644
index 00000000..012fd2dd
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Divers/colorSlider.crow
@@ -0,0 +1,75 @@
+<VerticalStack Margin="50" Spacing="20" Background="DimGrey">
+ <HorizontalStack Height="Fit" Width="400" Spacing="5" Margin="5" Background="Jet">
+ <Label Style="labColor" Text="G:"/>
+ <ColorSlider Name="cs" Component="Red" CurrentColor="Green" CursorType="Circle" ClipToClientRect="false" Background="Black" Margin="5" Height="20" />
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ <Container Width="100" Height="100" Background="Red" Margin="5">
+ <Widget Width="20" Height="20" Background="Blue" HorizontalAlignment="Left" VerticalAlignment="Top"/>
+ </Container>
+ </HorizontalStack>
+ <Label Text="{../slider1.Value}"/>
+ <Widget Width="380" Height="5" Background="Blue"/>
+ <Slider Name="slider1" Orientation="Horizontal" Width="400" Height="30" Background="Jet" Foreground="LightGrey" Margin="0" Inverted="false">
+ <Template>
+ <Container Background="{./Background}" CornerRadius="{./CornerRadius}" Margin="10">
+ <Widget Name="Cursor" Background="{./Foreground}" CornerRadius="{./CornerRadius}" />
+ </Container>
+ </Template>
+ </Slider>
+ <Slider Background="RoyalBlue" Height="50" Width="400" CursorSize="50" Inverted="{../../inverted.IsChecked}">
+ <Template>
+ <Group Background="DarkGrey" >
+ <ColorGauge Height="50%" Background="Onyx" Value="{./Value}" Maximum="{./Maximum}" Minimum="{Minimum}" Orientation="{./Orientation}"
+ Inverted="{./Inverted}"/>
+ <Container Name="Cursor" Background="White" >
+ <Label Text="{./Value}" Foreground="Black"/>
+ </Container>
+ </Group>
+ </Template>
+ </Slider>
+ <ColorPicker>
+ <Template>
+ <Border Background="{./Background}" Foreground="{./Foreground}" Width="Stretched"
+ CornerRadius="{./CornerRadius}" BorderWidth="1">
+ <VerticalStack Margin="2">
+ <Widget Width="30" Height="16" Background="{./CurrentColor}"/>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="R:"/>
+ <ColorSlider Name="cs" Component="Red" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="G:"/>
+ <ColorSlider Name="cs" Component="Green" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="B:"/>
+ <ColorSlider Name="cs" Component="Blue" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="A:"/>
+ <ColorSlider Name="cs" Component="Alpha" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="H:"/>
+ <ColorSlider Name="cs" Component="Hue" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="S:"/>
+ <ColorSlider Name="cs" Component="Saturation" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="V:"/>
+ <ColorSlider Name="cs" Component="Value" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ </VerticalStack>
+ </Border>
+ </Template>
+ </ColorPicker>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Divers/colorSlider2.crow b/Samples/common/ui/Interfaces/Divers/colorSlider2.crow
new file mode 100644
index 00000000..111ce06f
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Divers/colorSlider2.crow
@@ -0,0 +1,78 @@
+<VerticalStack Margin="50" Spacing="20" Background="DimGrey">
+ <Label Text="{../slider1.Value}"/>
+ <Slider Background="Onyx" Height="30" Width="400" >
+ <Template>
+ <Group Background="{./Background}">
+ <ColorGauge Component="Red" Height="Stretched" Value="{./Value}" Maximum="{./Maximum}" Minimum="{Minimum}" Orientation="{./Orientation}" Margin="11"
+ Inverted="{./Inverted}"/>
+ <Border Name="Cursor" Foreground="White" CornerRadius="7" BorderWidth="2">
+ <Label Text="{./Value}" Foreground="WhiteSmoke"/>
+ </Border>
+ </Group>
+ </Template>
+ </Slider>
+ <Slider Background="Onyx" Height="30" Width="400" CursorSize="20" >
+ <Template>
+ <Group Background="{./Background}" ClipToClientRect="false">
+ <ColorGauge Component="Red" Height="Stretched" Value="{./Value}" Maximum="{./Maximum}" Minimum="{Minimum}" Orientation="{./Orientation}" Margin="10" ClipToClientRect="false"
+ Inverted="{./Inverted}"/>
+ <Shape Height="Stretched" Name="Cursor" Size="30,30" Path="M 0,30 L 15,0 L 30,30 Z G" StrokeWidth="1" ClipToClientRect="false" Scaled="false" />
+ </Group>
+ </Template>
+ </Slider>
+ <ColorPicker>
+ <Template>
+ <Border Background="{./Background}" Foreground="{./Foreground}" Width="Stretched"
+ CornerRadius="{./CornerRadius}" BorderWidth="1">
+ <VerticalStack Margin="2">
+ <Widget Width="50" Height="30" CornerRadius="10" Background="{./CurrentColor}"/>
+ <Slider Background="Onyx" Height="Fit" Width="Stretched" Foreground="{²./CurrentColor}" Maximum="255" Value="{².cg.Value}">
+ <Template>
+ <Group Background="{./Background}">
+ <ColorGauge Name="cg" Component="Red" Height="Stretched" Value="{²./Value}" Maximum="{./Maximum}" Minimum="{Minimum}" Orientation="{./Orientation}" Margin="0" CurrentColor="{²./Foreground}"/>
+ <Border Name="Cursor" Foreground="White" CornerRadius="7" BorderWidth="2">
+ <Label Text="{./Value}" Foreground="WhiteSmoke"/>
+ </Border>
+ </Group>
+ </Template>
+ </Slider>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="R:"/>
+ <ColorSlider Name="cs" Component="Red" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="G:"/>
+ <ColorSlider Name="cs" Component="Green" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="B:"/>
+ <ColorSlider Name="cs" Component="Blue" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="A:"/>
+ <ColorSlider Name="cs" Component="Alpha" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="H:"/>
+ <ColorSlider Name="cs" Component="Hue" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="S:"/>
+ <ColorSlider Name="cs" Component="Saturation" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="V:"/>
+ <ColorSlider Name="cs" Component="Value" CurrentColor="{²./CurrentColor}"/>
+ <Label Style="labColorV" Text="{../cs.CurrentValue}" />
+ </HorizontalStack>
+ </VerticalStack>
+ </Border>
+ </Template>
+ </ColorPicker>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Divers/colorSlider3.crow b/Samples/common/ui/Interfaces/Divers/colorSlider3.crow
new file mode 100644
index 00000000..4236b929
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Divers/colorSlider3.crow
@@ -0,0 +1,47 @@
+<VerticalStack Margin="50" Spacing="20" Background="Black">
+ <ColorPicker>
+ <Template>
+<Border Background="{./Background}" Foreground="{./Foreground}" Width="Stretched"
+ CornerRadius="{./CornerRadius}" BorderWidth="1">
+ <VerticalStack Margin="2">
+ <Widget Width="30" Height="16" Background="{./CurrentColor}"/>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="R:"/>
+ <ColorSlider Name="cs" Component="Red" CurrentColor="{./CurrentColor}" Value="{²./Red}"/>
+ <Label Style="labColorV" Text="{../cs.Value}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="G:"/>
+ <ColorSlider Name="cs" Component="Green" CurrentColor="{./CurrentColor}" Value="{²./Green}"/>
+ <Label Style="labColorV" Text="{../cs.Value}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="B:"/>
+ <ColorSlider Name="cs" Component="Blue" CurrentColor="{./CurrentColor}" Value="{²./Blue}"/>
+ <Label Style="labColorV" Text="{../cs.Value}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="A:"/>
+ <ColorSlider Name="cs" Component="Alpha" CurrentColor="{./CurrentColor}" Value="{²./Alpha}"/>
+ <Label Style="labColorV" Text="{../cs.Value}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="H:"/>
+ <ColorSlider Name="cs" Component="Hue" CurrentColor="{./CurrentColor}" Value="{²./Hue}"/>
+ <Label Style="labColorV" Text="{../cs.Value}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="S:"/>
+ <ColorSlider Name="cs" Component="Saturation" CurrentColor="{./CurrentColor}" Value="{²./Saturation}"/>
+ <Label Style="labColorV" Text="{../cs.Value}" />
+ </HorizontalStack>
+ <HorizontalStack Height="Fit">
+ <Label Style="labColor" Text="V:"/>
+ <ColorSlider Name="cs" Component="Value" CurrentColor="{./CurrentColor}" Value="{²./Value}"/>
+ <Label Style="labColorV" Text="{../cs.Value}" />
+ </HorizontalStack>
+ </VerticalStack>
+</Border>
+ </Template>
+ </ColorPicker>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Divers/colorSlider4.crow b/Samples/common/ui/Interfaces/Divers/colorSlider4.crow
new file mode 100644
index 00000000..95463636
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Divers/colorSlider4.crow
@@ -0,0 +1,13 @@
+<ColorSlider Width="400" Component="Red" Background="Grey" Height="34" CursorSize="24" >
+<Template>
+ <Group Background="{./Background}" >
+ <ColorGauge Component="{./Component}" CurrentColor="{./CurrentColor}" Orientation="{./Orientation}" Margin="10" Height="Stretched" CornerRadius="10"/>
+ <Border Name="Cursor" Foreground="White" CornerRadius="15" BorderWidth="2">
+ <Group Fit="true">
+ <Label Left="2" Top="2" Text="{./Value}" Foreground="Black" Font="mono bold, 10"/>
+ <Label Text="{./Value}" Foreground="WhiteSmoke" Font="mono bold, 10"/>
+ </Group>
+ </Border>
+ </Group>
+</Template>
+</ColorSlider> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Divers/image.crow b/Samples/common/ui/Interfaces/Divers/image.crow
new file mode 100644
index 00000000..829507ac
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Divers/image.crow
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<Image Path="#Crow.Icons.file.svg" Width="16" Height="16"/>
diff --git a/Samples/common/ui/Interfaces/Divers/observableList.crow b/Samples/common/ui/Interfaces/Divers/observableList.crow
index 9caa0b43..6d568820 100644
--- a/Samples/common/ui/Interfaces/Divers/observableList.crow
+++ b/Samples/common/ui/Interfaces/Divers/observableList.crow
@@ -4,8 +4,9 @@
<HorizontalStack Height="Fit">
<Button Command="{CMDObsListAdd}" />
<Button Command="{CMDObsListRemove}" IsEnabled="{../lb.SelectionIsEmpty}" />
+ <Button Command="{CMDObsListRemove2}"/>
</HorizontalStack>
- <ListBox Name="lb" Data="{ObservableTestList}" >
+ <ListBox Name="lb" Data="{ObservableTestList}" SelectedItem="{²ObservableTestListSelectedItem}" >
<Template>
<Border Style="ControlBorder" MinimumSize="10,10" Background="{./Background}" CornerRadius="{./CornerRadius}">
<Scroller Name="scroller1" >
diff --git a/Samples/common/ui/Interfaces/Divers/testShape.crow b/Samples/common/ui/Interfaces/Divers/testShape.crow
index 14af0f21..14df5bfc 100644
--- a/Samples/common/ui/Interfaces/Divers/testShape.crow
+++ b/Samples/common/ui/Interfaces/Divers/testShape.crow
@@ -1,5 +1,10 @@
<?xml version="1.0"?>
<VerticalStack>
- <TextBox Text="{²../shape.Path}"/>
- <Shape Margin="0" Width="400" Height="400" Name="shape" Foreground="Blue" Background="DimGrey" Size="100,100" Path="M 5.5,0.5 L 10.5,10.5 L 0.5,10.5 Z G"/>
+ <TextBox Text="{²../shape.Path}"/>
+ <Container Background="Navy" Height="100" Width="100">
+ <Shape Height="20" Width="10" Name="shape" Foreground="White" Size="11,11" Path="M 5.5,1.5 L 9.5,3.5 L 9.5,9.5 L 1.5,9.5 L 1.5,3.5 Z G" Scaled="true" KeepProportions="false" StrokeWidth="2"/>
+ </Container>
+ <Container Background="Navy" Height="100" Width="100">
+ <Shape Height="Fit" Width="Fit" Foreground="White" Size="11,11" Path="{²../../shape.Path}" Scaled="false" KeepProportions="false" StrokeWidth="2"/>
+ </Container>
</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Divers/testSlider.crow b/Samples/common/ui/Interfaces/Divers/testSlider.crow
index d7050000..8b6e57af 100644
--- a/Samples/common/ui/Interfaces/Divers/testSlider.crow
+++ b/Samples/common/ui/Interfaces/Divers/testSlider.crow
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<HorizontalStack Margin="50">
- <CheckBox Name="inverted" Background="DarkSlateGrey" Caption="Inverted" Width="Fit" Foreground="Black"/>
<VerticalStack Spacing="10" Width="50%">
<Slider Background="DarkGrey" Height="20" Width="Stretched" Inverted="{../../inverted.IsChecked}"/>
@@ -31,6 +30,8 @@
<Slider ClipToClientRect='false' Background="DarkGrey" CursorSize="50" Height="12" CornerRadius="5" Inverted="{../../inverted.IsChecked}" />
<Slider ClipToClientRect='false' CacheEnabled='false' Background="Transparent" CursorSize="20" Height="12" Width="Stretched" Inverted="{../../inverted.IsChecked}" />
+
+ <CheckBox Name="inverted" Background="DarkSlateGrey" Caption="Inverted" Width="Fit" Foreground="Black"/>
</VerticalStack>
<HorizontalStack Spacing="10" >