diff options
Diffstat (limited to 'Tests/Interfaces/TemplatedControl')
7 files changed, 88 insertions, 0 deletions
diff --git a/Tests/Interfaces/TemplatedControl/testButton.crow b/Tests/Interfaces/TemplatedControl/testButton.crow new file mode 100755 index 00000000..69367eaa --- /dev/null +++ b/Tests/Interfaces/TemplatedControl/testButton.crow @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<VerticalStack Fit="true" Background="vgradient|0:DimGray|1:Black"> + <HorizontalStack Fit="True"> + <Button Caption="but" MouseClick="onButClick"/> + <Button Caption="but" MouseClick="onButClick" Fit="true"/> + <Button Width="60" Height="40" MouseClick="onButClick"/> + <Button Caption="Long text button" MouseClick="onButClick"/> + <Button Font="droid, 20" Caption="Button"/> + </HorizontalStack> +</VerticalStack>
\ No newline at end of file diff --git a/Tests/Interfaces/TemplatedControl/testCheckbox.crow b/Tests/Interfaces/TemplatedControl/testCheckbox.crow new file mode 100755 index 00000000..5147a151 --- /dev/null +++ b/Tests/Interfaces/TemplatedControl/testCheckbox.crow @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<VerticalStack Fit="true" Margin="100" Background="DimGray" > + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> + <CheckBox Background="Gray" MouseEnter="{Background=Red}" MouseLeave="{Background=Transparent}"/> +</VerticalStack> diff --git a/Tests/Interfaces/TemplatedControl/testCombobox.crow b/Tests/Interfaces/TemplatedControl/testCombobox.crow new file mode 100755 index 00000000..2ef6d391 --- /dev/null +++ b/Tests/Interfaces/TemplatedControl/testCombobox.crow @@ -0,0 +1,4 @@ +<?xml version="1.0"?> +<Container Background="Onyx" Width="300"> + <ComboBox Data="{TestList}" ItemTemplate="#Tests.Interfaces.colorItem.crow"/> +</Container>
\ No newline at end of file diff --git a/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow b/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow new file mode 100755 index 00000000..5f860719 --- /dev/null +++ b/Tests/Interfaces/TemplatedControl/testItemTemplateTag.crow @@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<Border BorderWidth="2" Fit="true"> + <VerticalStack Fit="true" Margin="5"> + <ListBox Data="{TestList}" Background="0.5,0.5,0.5,0.7" + HorizontalAlignment="Center" Width="200" Height="200" Margin="5"> + <Template> + <Border BorderWidth="1" Height="{../HeightPolicy}" Width="{../WidthPolicy}"> + <HorizontalStack Margin="1" Height="{../../HeightPolicy}" Width="{../../WidthPolicy}" > + <Scroller Name="scroller1" Height="{../../../HeightPolicy}" Width="{../../../WidthPolicy}" + Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}" + ValueChanged="../../../_scroller_ValueChanged"> + <VerticalStack Width="{../../../../WidthPolicy}" Height="Fit" MinimumSize="10,10" + Name="List" Margin="0" + VerticalAlignment="Top" + HorizontalAlignment="Left" + LayoutChanged="../../../../_list_LayoutChanged"/> + </Scroller> + <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}" + Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" + Width="14" Height="{../../../HeightPolicy}" /> + </HorizontalStack> + </Border> + </Template> + <ItemTemplate DataType="Crow.Color"> + <HorizontalStack + HorizontalAlignment="Left" + Height="Fit" Width="200" Margin="1" Focusable="true" + MouseEnter="{Background=hgradient|0:DarkRed|1:Transparent}" + MouseLeave="{Background=Transparent}"> + <GraphicObject Height="12" Width="20" Background="{}" Margin="0" CornerRadius="3"/> + <Label Text="{Name}" Margin="0" Width="Stretched"/> + </HorizontalStack> + </ItemTemplate> + </ListBox> + <HorizontalStack Fit="true" HorizontalAlignment="Right"> + <Button Caption="Load list" MouseClick="OnLoadList"/> + <Button Caption="Clear" MouseClick="OnClear"/> + </HorizontalStack> + </VerticalStack> +</Border>
\ No newline at end of file diff --git a/Tests/Interfaces/TemplatedControl/testRadioButton.crow b/Tests/Interfaces/TemplatedControl/testRadioButton.crow new file mode 100755 index 00000000..905cdeba --- /dev/null +++ b/Tests/Interfaces/TemplatedControl/testRadioButton.crow @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<VerticalStack Width="200" Height="Fit" Margin="20" Background="DimGray"> + <RadioButton Caption="Radio1"/> + <RadioButton Caption="Radio2" IsChecked="true"/> + <RadioButton Caption="Radio3"/> + <RadioButton Caption="Radio4"/> +</VerticalStack> diff --git a/Tests/Interfaces/TemplatedControl/testScrollbar.goml b/Tests/Interfaces/TemplatedControl/testScrollbar.goml new file mode 100755 index 00000000..c494e347 --- /dev/null +++ b/Tests/Interfaces/TemplatedControl/testScrollbar.goml @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<Group Name="TopContainer" Width="400" Height="400" + Focusable="True" Background="Gray"> + <ScrollBar Height="Stretched" Orientation="Vertical" Width="16" Maximum="100"/> +</Group>
\ No newline at end of file diff --git a/Tests/Interfaces/TemplatedControl/testSpinner.goml b/Tests/Interfaces/TemplatedControl/testSpinner.goml new file mode 100755 index 00000000..4efd587a --- /dev/null +++ b/Tests/Interfaces/TemplatedControl/testSpinner.goml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<VerticalStack Name="TopContainer" Width="400" Height="Fit" + Margin="20" Background="DarkGray"> + + <HorizontalStack Fit="true" Margin="5" Background="SkyBlue"> + <Spinner Value="{IntValue}" ValueChanged="onSpinnerValueChange"/> + <Spinner Value="5"/> + <Spinner Value="5"/> + <Button/> + </HorizontalStack> +</VerticalStack>
\ No newline at end of file |