diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-08-03 19:49:15 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2019-08-03 19:49:15 +0200 |
| commit | e6030fa04a8de3fdae1dc19d081bf5feb3d3d73c (patch) | |
| tree | 89f392cd974d1109a203ade305da467bd378ee48 /Samples/common/ui/Interfaces/TemplatedContainer | |
| parent | cad504c62d45952b4651603579f34df0d230841e (diff) | |
sample directory
Diffstat (limited to 'Samples/common/ui/Interfaces/TemplatedContainer')
13 files changed, 328 insertions, 0 deletions
diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/0.crow b/Samples/common/ui/Interfaces/TemplatedContainer/0.crow new file mode 100755 index 00000000..5b267402 --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/0.crow @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<Expandable Fit="true" Caption="Test expandable" Background="DimGrey"> + <VerticalStack Margin="5" > + <CheckBox Name="chk1" /> + <CheckBox Name="chk2" IsChecked="true"/> + <CheckBox Name="chk3" /> + <CheckBox Name="chk4" /> + <HorizontalStack Fit="true" Margin="2" Background="SeaGreen"> + <Label Name="captionFps" Text="Fps:" Width="30" TextAlignment="Right"/> + <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="Fit" TextAlignment="Center" Background="SeaGreen"/> + </HorizontalStack> + </VerticalStack> +</Expandable> diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/6.crow b/Samples/common/ui/Interfaces/TemplatedContainer/6.crow new file mode 100755 index 00000000..641d58f9 --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/6.crow @@ -0,0 +1,21 @@ +<Expandable Width="Stretched" Background="Grey"> + <Expandable Width="Stretched" Background="LightBlue"> + <Expandable Width="Stretched" Background="Green"> + <Expandable Width="Stretched" Background="LimeGreen"> + <Expandable Width="Stretched" Background="DimGrey"> + <Expandable Width="Stretched" Background="Yellow"> + <Expandable Width="Stretched" Background="SeaGreen"> + <Expandable Width="Stretched" Background="Blue"> + <Expandable Width="Stretched" Background="RoyalBlue"> + <Expandable Width="Stretched" Background="Green"> + <Label Background="Red" Text="{fps}"/> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/7.crow b/Samples/common/ui/Interfaces/TemplatedContainer/7.crow new file mode 100755 index 00000000..99a75079 --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/7.crow @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<VerticalStack Height="Fit" Width="Fit"> + <Label Width="Stretched"/> + <Expandable Width="Fit" Background="Grey"> + <Expandable Background="LightBlue"> + <Expandable Background="Green"> + <Expandable Background="LimeGreen"> + <Expandable Background="DimGrey"> + <Expandable Width="Stretched" Background="Yellow"> + <Expandable Background="SeaGreen"> + <Expandable Width="Stretched" Background="Blue"> + <Expandable Width="Stretched" Background="RoyalBlue"> + <Expandable Width="Stretched" Background="Green"> + <Label Background="Red" Text="{fps}"/> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> + </Expandable> +</VerticalStack> diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testGroupBox.crow b/Samples/common/ui/Interfaces/TemplatedContainer/testGroupBox.crow new file mode 100755 index 00000000..48581803 --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testGroupBox.crow @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!--<Container Background="vgradient|0:DarkGrey|1:DimGrey">--> + <GroupBox Fit="true" Background="vgradient|0:SteelBlue|1:Transparent" + Foreground="White"> +<!-- <Label/>--> + </GroupBox> +<!--</Container>--> diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testMsgBox.crow b/Samples/common/ui/Interfaces/TemplatedContainer/testMsgBox.crow new file mode 100755 index 00000000..d60c281e --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testMsgBox.crow @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<MessageBox Caption="message" Message="this is a message box"/> +<!-- Ok="onMsgBoxOk" + Cancel="onMsgBoxCancel"/>-->
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testPopper.crow b/Samples/common/ui/Interfaces/TemplatedContainer/testPopper.crow new file mode 100755 index 00000000..beac8734 --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testPopper.crow @@ -0,0 +1,27 @@ +<?xml version="1.0"?> +<VerticalStack> + <Border Fit="true" Margin="10"> + <VerticalStack Width="150" Height="Fit"> + <RadioButton Caption="Left" IsChecked="true" Checked="change_alignment"/> + <RadioButton Caption="Right" Checked="change_alignment"/> + <RadioButton Caption="Top" Checked="change_alignment"/> + <RadioButton Caption="Bottom" Checked="change_alignment"/> + </VerticalStack> + </Border> + <Widget Height="200"/> + <Popper Caption="TestPopper" Width="100" Background="DimGrey" PopDirection="{alignment}"> + <Border Fit="True" Background="SteelBlue"> + <Image Fit="true" Path="#Crow.Icons.crow.svg" Margin="10"/> + <VerticalStack Fit="true" Margin="10" Background="CornflowerBlue"> + <CheckBox Name="chk1" Background="Red"/> + <CheckBox Name="chk2" IsChecked="true"/> + <CheckBox Name="chk3"/> + <CheckBox Name="chk4"/> + <HorizontalStack Fit="true" Margin="20"> + <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/> + <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" Background="SeaGreen"/> + </HorizontalStack> + </VerticalStack> + </Border> + </Popper> +</VerticalStack> diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testTabView.crow b/Samples/common/ui/Interfaces/TemplatedContainer/testTabView.crow new file mode 100644 index 00000000..e3717c82 --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testTabView.crow @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<Group Height="90%" Width="95%"> +<VerticalStack > + <HorizontalStack Height="Fit"> + <Label Text="Selected Tab:"/> + <Label Text="{../../tabview1.SelectedTab}"/> + </HorizontalStack> + <TabView Name="tabview1" Background="DimGrey" Orientation="Horizontal"> + <TabItem Name="TabItem1" Caption="tab item 1" Background="DimGrey"> + <VerticalStack Margin="20"> + <CheckBox/> + <CheckBox/> + <CheckBox/> + <CheckBox/> + </VerticalStack> + </TabItem> + <TabItem Name="TabItem2" Caption="tab item 2" Background="DimGrey"> + <VerticalStack Height="Fit" Margin="10"> + <RadioButton Fit="true"/> + <RadioButton/> + <RadioButton/> + <RadioButton/> + </VerticalStack> + </TabItem> + <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="DimGrey" Caption="tab item 4" Margin="0"> + <TextBox/> + </TabItem> + </TabView> + <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/Samples/common/ui/Interfaces/TemplatedContainer/testTabView2.crow b/Samples/common/ui/Interfaces/TemplatedContainer/testTabView2.crow new file mode 100644 index 00000000..67b87b07 --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testTabView2.crow @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<HorizontalStack Height="90%" Width="99%" Spacing="50"> + <VerticalStack Width="40%"> + <HorizontalStack Height="Fit"> + <Label Text="Selected Tab:"/> + <Label Text="{../../tabview1.SelectedTab}"/> + </HorizontalStack> + <TabView Name="tabview1" Background="DimGrey" Orientation="Horizontal" Margin="5" > + <TabItem Name="TabItem1" Caption="tab-1.1" Background="DimGrey"> + <VerticalStack Margin="20"> + <CheckBox/> + <CheckBox/> + <CheckBox/> + <CheckBox/> + </VerticalStack> + </TabItem> + <TabItem Name="TabItem2" Caption="tab-1.2" Background="DimGrey"> + <VerticalStack Height="Fit" Margin="10"> + <RadioButton Fit="true"/> + <RadioButton/> + <RadioButton/> + <RadioButton/> + </VerticalStack> + </TabItem> + <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:DimGrey|1:Black" HorizontalAlignment="Right" + Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick"/> + </VerticalStack> + <VerticalStack Width="40%"> + <HorizontalStack Height="Fit"> + <Label Text="Selected Tab:"/> + <Label Text="{../../tabview2.SelectedTab}"/> + </HorizontalStack> + <TabView Name="tabview2" Background="DimGrey" Orientation="Horizontal" > + <TabItem Name="TabItem1" Caption="tab-2.1" Background="DimGrey"> + <VerticalStack Margin="20"> + <CheckBox/> + <CheckBox/> + <CheckBox/> + <CheckBox/> + </VerticalStack> + </TabItem> + <TabItem Name="TabItem2" Caption="tab-2.2" Background="DimGrey"> + <VerticalStack Height="Fit" Margin="10"> + <RadioButton Fit="true"/> + <RadioButton/> + <RadioButton/> + <RadioButton/> + </VerticalStack> + </TabItem> + <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:DimGrey|1:Black" HorizontalAlignment="Right" + Caption="Add new tab" Width="Fit" Height="30" MouseDown="onAddTabButClick2"/> + </VerticalStack> +</HorizontalStack> diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testTreeView.crow b/Samples/common/ui/Interfaces/TemplatedContainer/testTreeView.crow new file mode 100755 index 00000000..099ce66d --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testTreeView.crow @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<Border Margin="5" Height="90%" Width="50%"> + <DirectoryView Name="dv" CurrentDirectory="/" Margin="1"/> +</Border>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testWindow.goml b/Samples/common/ui/Interfaces/TemplatedContainer/testWindow.goml new file mode 100755 index 00000000..e42a5c9f --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testWindow.goml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<Window Left="10" Top="10" Caption="Test window" + Width="250" Height="550" > + <VerticalStack Name="contentVSStack" Margin="10" Spacing="10" Background="0.4,0.4,0.4,0.4"> + <Slider Name="slider" Height="12" Width="Stretched" CornerRadius="3"/> + <GroupBox Caption="test" Height="Fit" Width="Stretched" Margin="5"> + <VerticalStack Height="Fit" Width="Stretched" > + <RadioButton Caption="Radio 1" Background="Red" Width="Stretched"/> + <RadioButton Caption="Radio 2" IsChecked="true" /> + <RadioButton Caption="Radio 3" /> + <RadioButton Caption="Radio 1" Background="SkyBlue" Width="Stretched"/> + </VerticalStack> + </GroupBox> + <HorizontalStack Width="Stretched" Height="Fit" Margin="10" CornerRadius="5" Background="SkyBlue"> + <RadioButton Width="80" Height="Fit" Caption="Radio 2" IsChecked="true" /> + <Widget Width="Stretched"/> + <RadioButton Width="80" Height="Fit" Caption="Radio 3" /> + </HorizontalStack> + <HorizontalStack Width="Stretched" Height="Stretched" MinimumSize="10,40" Margin="0" CornerRadius="5" + Background="vgradient|0:White|0.1:SteelBlue|0.9:SteelBlue|1:Transparent"> + <CheckBox Height="Fit" Width="80"/> + <Widget Width="Stretched"/> + <CheckBox Height="Fit" Width="80" IsChecked="true"/> + </HorizontalStack> + <Border Fit="true" CornerRadius="5" BorderWidth="1" > + <Container Name="MainGrp" Background="0.5,0.5,0.5,0.4" Width="120" Fit="true" + Margin="10" Focusable="True" > + <VerticalStack Fit="true" Name="vsFps" Spacing="10" > + <HorizontalStack Fit="true"> + <Label Text="Layouting:" Width="50" TextAlignment="Right"/> + <Label Name="labLayouting" Text="{layouting}" Font="droid,12" Width="80" TextAlignment="Center" + Background="vgradient|0:SeaGreen|1:Black"/> + </HorizontalStack> + <HorizontalStack Fit="true"> + <Label Text="Clipping:" Width="50" TextAlignment="Right"/> + <Label Text="{update}" Font="droid,12" Width="80" TextAlignment="Center" + Background="vgradient|0:SeaGreen|1:Black"/> + </HorizontalStack> + <HorizontalStack Fit="true"> + <Label Text="Drawing:" Width="50" TextAlignment="Right"/> + <Label Name="labDrawing" Text="{drawing}" Font="droid,12" Width="80" TextAlignment="Center" + Background="vgradient|0:SeaGreen|1:Black"/> + </HorizontalStack> + <HorizontalStack Fit="true"> + <Label Name="captionFps" Text="Fps:" Width="50" TextAlignment="Right"/> + <Label Name="valueFps" Text="{fps}" Font="droid , 12" Width="50" TextAlignment="Center" + Background="vgradient|0:SeaGreen|1:Black"/> + </HorizontalStack> + <HorizontalStack Fit="true"> + <Label Text="Min:" Width="50" TextAlignment="Right"/> + <Label Text="{fpsMin}" Font="droid , 12" Width="50" TextAlignment="Center" + Background="vgradient|0:SeaGreen|1:Black"/> + </HorizontalStack> + <HorizontalStack Fit="true"> + <Label Text="Max:" Width="50" TextAlignment="Right"/> + <Label Text="{fpsMax}" Font="droid , 12" Width="50" TextAlignment="Center" + Background="vgradient|0:SeaGreen|1:Black"/> + </HorizontalStack> + </VerticalStack> + </Container> + </Border> + <HorizontalStack Fit="true" Background="RoyalBlue" Margin="3"> + <Widget Margin="10" Background="LimeGreen" Width="5" Height="5"/> + <TextBox Font="droid, 16" Multiline="true" Text="this is a test\nmultiline" Margin="2"/> + <Widget Margin="10" Background="LimeGreen" Width="5" Height="5"/> + </HorizontalStack> + </VerticalStack> +</Window>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testWindow2.goml b/Samples/common/ui/Interfaces/TemplatedContainer/testWindow2.goml new file mode 100755 index 00000000..cf88e8cb --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testWindow2.goml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<Window Focusable="true" Caption="Measures" Width="30%" Height="Fit" MinimumSize="100,100"> + <VerticalStack Width="90%" Height="Fit" Spacing="1" Margin="10"> + <HorizontalStack Height="Fit"> + <Label Text="Fps:" Style="FpsLabel"/> + <Label Text="{fps}" Style="FpsDisp"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Min:" Style="FpsLabel"/> + <Label Text="{fpsMin}" Style="FpsDisp"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Max:" Style="FpsLabel"/> + <Label Text="{fpsMax}" Style="FpsDisp"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Update:" Style="FpsLabel"/> + <Label Text="{update}" Style="FpsDisp"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Layouting:" Style="FpsLabel"/> + <Label Text="{layouting}" Style="FpsDisp"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Clipping:" Style="FpsLabel"/> + <Label Text="{clipping}" Style="FpsDisp"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Drawing:" Style="FpsLabel"/> + <Label Text="{drawing}" Style="FpsDisp"/> + </HorizontalStack> + </VerticalStack> +</Window> diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/testWindow3.goml b/Samples/common/ui/Interfaces/TemplatedContainer/testWindow3.goml new file mode 100755 index 00000000..869615bf --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/testWindow3.goml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<Window Left="10" Top="10" Caption="Test window" Width="200" Height="200" Background="0.5,0.5,0.5,0.8" + Focusable="True" CornerRadius="20" MinimumSize="100,100" MaximumSize="500,500"> + <Template> + <Container Margin="20" Name="Content" Height="{../HeightPolicy}" Width="{../WidthPolicy}" Background="0.5,0.5,0.5,0.5"/> + </Template> +<!-- <Group Background="Green">--> + <Widget Height="50" Width="50" Background="Red" Margin="5"/> +<!-- <Scrollbar Orientation="Vertical" Height="Stretched" Width="10" Background="Blue" Margin="0" HorizontalAlignment="Right"/>--> +<!-- </Group>--> +</Window> diff --git a/Samples/common/ui/Interfaces/TemplatedContainer/test_Listbox.crow b/Samples/common/ui/Interfaces/TemplatedContainer/test_Listbox.crow new file mode 100755 index 00000000..47adb8ce --- /dev/null +++ b/Samples/common/ui/Interfaces/TemplatedContainer/test_Listbox.crow @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<!--<ListBox Data="{TestList}" Focusable="true"/>--> +<Border Margin="50"> + <VerticalStack > + <Label Text="{../ColorList.SelectedItem}" Background="DarkGreen"/> + <Label Text="{Hover}" Background="DarkGreen"/> + <Button Caption="Clear" Width="Stretched" MouseClick="OnClear"/> + <ListBox Name="ColorList" Data="{TestList}" Width="200" Height="200" + ItemTemplate="#Tests.Interfaces.colorItem.crow"> + </ListBox> + <Button Caption="Load list" Width="Stretched" MouseClick="OnLoadList"/> + </VerticalStack> +</Border>
\ No newline at end of file |