diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-07 07:43:48 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-07 07:43:48 +0100 |
| commit | 158bc472eff0771479d48e5bd74a8141d62ab60a (patch) | |
| tree | 492f2d255de49b5c04ebba237ecb40b265bd6534 /Crow.ControlsLib/Templates | |
| parent | a330b907a9c9252c480ea352606d961bdc7c3ecb (diff) | |
:book: , renames, move some controls to other project file
Diffstat (limited to 'Crow.ControlsLib/Templates')
21 files changed, 297 insertions, 0 deletions
diff --git a/Crow.ControlsLib/Templates/AnalogMeter0.goml b/Crow.ControlsLib/Templates/AnalogMeter0.goml new file mode 100755 index 00000000..8187aac4 --- /dev/null +++ b/Crow.ControlsLib/Templates/AnalogMeter0.goml @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<Group Margin="0" Width="-1" Height="-1" Focusable="false"> + <Image Name="Image" Path="#go.Images.meter.svg" SvgSub="background"/> +<!-- <Image Name="Image" Path="#go.Images.meter.svg" SvgSub="gauge"/>--> +</Group>
\ No newline at end of file diff --git a/Crow.ControlsLib/Templates/Checkbox2.goml b/Crow.ControlsLib/Templates/Checkbox2.goml new file mode 100755 index 00000000..0a67fce7 --- /dev/null +++ b/Crow.ControlsLib/Templates/Checkbox2.goml @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<HorizontalStack Margin="0" Spacing="1" Focusable="false"> + <Image Name="Image" Width="16" Height="16" Path="#go.Images.Icons.checkbox.svg"/> + <Label Name="Caption" Background="Red"/> +</HorizontalStack>
\ No newline at end of file diff --git a/Crow.ControlsLib/Templates/DockingView.template b/Crow.ControlsLib/Templates/DockingView.template new file mode 100755 index 00000000..0a3b4e01 --- /dev/null +++ b/Crow.ControlsLib/Templates/DockingView.template @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}" + Background="{./Background}" + MouseEnter="./onBorderMouseEnter" + MouseLeave="./onBorderMouseLeave"> + <VerticalStack Spacing="0"> +<!-- <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit" + Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">--> + <HorizontalStack Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7" + Name="hs" Margin="2" Spacing="0" Height="Fit"> + <GraphicObject Width="5"/> + <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> + <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" /> + <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg" + MouseClick="./butQuitPress"/> + </Border> + <GraphicObject Width="5"/> + </HorizontalStack> +<!-- </Border>--> + <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/> + </VerticalStack> +</Border> diff --git a/Crow.ControlsLib/Templates/ListBox.template b/Crow.ControlsLib/Templates/ListBox.template new file mode 100755 index 00000000..f6d6214d --- /dev/null +++ b/Crow.ControlsLib/Templates/ListBox.template @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Margin="1" MinimumSize="10,10"> + <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"> + <VerticalStack + Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/> + </Scroller> +</Border> diff --git a/Crow.ControlsLib/Templates/Menu.template b/Crow.ControlsLib/Templates/Menu.template new file mode 100644 index 00000000..c560043c --- /dev/null +++ b/Crow.ControlsLib/Templates/Menu.template @@ -0,0 +1,2 @@ +<?xml version="1.0"?> +<HorizontalStack Name="ItemsContainer" Margin="0" Background="{./Background}"/> diff --git a/Crow.ControlsLib/Templates/MenuItem.template b/Crow.ControlsLib/Templates/MenuItem.template new file mode 100644 index 00000000..0f93b20c --- /dev/null +++ b/Crow.ControlsLib/Templates/MenuItem.template @@ -0,0 +1,23 @@ +<?xml version="1.0"?> +<Popper Font="{./Font}" Caption="{./Caption}" Background="{./Background}" PopDirection="{./PopDirection}" + Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseClick="./onMI_Click" + IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}"> + <Template> + <Border Name="border1" + MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}" + MouseLeave="{Foreground=Transparent}" + MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}" + MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}" + MinimumSize = "60,0" + Foreground="Transparent" + Background="{./Background}"> + <Label Text="{./Caption}" + Foreground="{./Foreground}" + Margin="1" HorizontalAlignment="Left" + Font="{./Font}" /> + </Border> + </Template> + <Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx"> + <VerticalStack Name="ItemsContainer"/> + </Border> +</Popper> diff --git a/Crow.ControlsLib/Templates/MessageBox.template b/Crow.ControlsLib/Templates/MessageBox.template new file mode 100644 index 00000000..c33eb869 --- /dev/null +++ b/Crow.ControlsLib/Templates/MessageBox.template @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<Border CornerRadius="0" + MouseEnter="./onBorderMouseEnter" + MouseLeave="./onBorderMouseLeave"> + <VerticalStack Background="{./Background}"> + <Border BorderWidth="0" Foreground="White" Height="Fit" Width="Stretched" MinimumSize="200,0" + Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9"> + <HorizontalStack Name="hs" Margin="2" Spacing="1" Height="Fit" > + <GraphicObject Width="5" Height="5"/> + <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> + <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" /> + <Border CornerRadius="3" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Name="Image" Path="#Crow.Images.Icons.exit2.svg" + MouseClick="./butQuitPress"/> + </Border> + <GraphicObject Width="5" Height="5"/> + </HorizontalStack> + </Border> + <HorizontalStack Margin="5"> + <Image Name="Image" Width="20%" Height="30" Path="{./MsgIcon}" /> + <Label Margin="5" Font="{./Font}" Width="Fit" Text="{./Message}" + TextAlignment="Left" + Multiline="true" /> + </HorizontalStack> + <HorizontalStack Margin="1" Spacing="0" Height="Fit" Width="60%" HorizontalAlignment="Right"> + <Button Width="50%" Caption="{./OkMessage}" MouseClick="./onOkButtonClick" /> + <Button Width="50%" Caption="{./CancelMessage}" MouseClick="./onCancelButtonClick" /> + </HorizontalStack> + </VerticalStack> +</Border> diff --git a/Crow.ControlsLib/Templates/Popper.template b/Crow.ControlsLib/Templates/Popper.template new file mode 100755 index 00000000..0bc7c741 --- /dev/null +++ b/Crow.ControlsLib/Templates/Popper.template @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<Border Background="{./Background}" BorderWidth="1" Foreground="{./Foreground}" Height="Fit"> + <HorizontalStack Spacing="1" Height="Fit"> + <Image Style="Icon" Margin="1" Width="9" Height="9" + Path="#Crow.Images.Icons.expandable.svg" SvgSub="{./IsPopped}"/> + <Label Text="{./Caption}" /> + </HorizontalStack> +</Border>
\ No newline at end of file diff --git a/Crow.ControlsLib/Templates/RadioButton.template b/Crow.ControlsLib/Templates/RadioButton.template new file mode 100755 index 00000000..b96eec2c --- /dev/null +++ b/Crow.ControlsLib/Templates/RadioButton.template @@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<HorizontalStack Style="Control" Background="{./Background}"> + <Image Style="Icon" Path="#Crow.Images.Icons.radiobutton.svg" + SvgSub="{./IsChecked}"/> + <Label Text="{./Caption}"/> +</HorizontalStack>
\ No newline at end of file diff --git a/Crow.ControlsLib/Templates/ScrollBar.template b/Crow.ControlsLib/Templates/ScrollBar.template new file mode 100755 index 00000000..70dce93e --- /dev/null +++ b/Crow.ControlsLib/Templates/ScrollBar.template @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Foreground="LightGray"> + <GenericStack Orientation="{./Orientation}" Spacing="0"> + <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollBack" + Template="#Crow.Templates.ArrowButTemplate.crow"> + <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="up"/> + </Button> + <Slider Name="Slider" + Orientation="{./Orientation}" + Value="{²./Value}" + Maximum="{./Maximum}" + Height="{./HeightPolicy}" Width="{./WidthPolicy}" + LargeIncrement="{./LargeIncrement}" + SmallIncrement="{./SmallIncrement}" + Background="hgradient|0:DimGray|0.1:Gray|0.95:Gray|1:White"/> + <Button MouseRepeat="true" Width="12" Height="12" MouseClick="./onScrollForth" + Template="#Crow.Templates.ArrowButTemplate.crow"> + <Image Margin="1" Path="#Crow.Images.Icons.updown.svg" SvgSub="down"/> + </Button> + </GenericStack> +</Border>
\ No newline at end of file diff --git a/Crow.ControlsLib/Templates/ScrollingListBox.goml b/Crow.ControlsLib/Templates/ScrollingListBox.goml new file mode 100644 index 00000000..f294aea6 --- /dev/null +++ b/Crow.ControlsLib/Templates/ScrollingListBox.goml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Background="{./Background}"> + <HorizontalStack Margin="1"> + <Scroller Name="scroller1" + Margin="2" VerticalScrolling="true" ScrollY="{../scrollbar1.Value}"> + <VerticalStack Height="Fit" MinimumSize="10,10" + Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/> + </Scroller> + <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}" + Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical" + Width="14" /> + </HorizontalStack> +</Border> diff --git a/Crow.ControlsLib/Templates/Slider.template b/Crow.ControlsLib/Templates/Slider.template new file mode 100755 index 00000000..9c7bb705 --- /dev/null +++ b/Crow.ControlsLib/Templates/Slider.template @@ -0,0 +1 @@ +<?xml version="1.0"?> diff --git a/Crow.ControlsLib/Templates/Spinner (copier).goml b/Crow.ControlsLib/Templates/Spinner (copier).goml new file mode 100755 index 00000000..fcb849c3 --- /dev/null +++ b/Crow.ControlsLib/Templates/Spinner (copier).goml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<Border CornerRadius="5" Margin="1" BorderWidth="1" Fit="True" Background="SteelBlue"> + <HorizontalStack Name="hstack" Margin="0" Spacing="5"> + <Label Name="labCpt" Text="55"/> + <VerticalStack Spacing="1" Name="vstack"> + <Button Width="10" Height="8" MouseClick="onUp"> + <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="up"/> + </Button> + <Button Width="10" Height="8" MouseClick="onDown"> + <Image Margin="1" Path="#go.Images.Icons.updown.svg" SvgSub="down"/> + </Button> + </VerticalStack> + </HorizontalStack> +</Border>
\ No newline at end of file diff --git a/Crow.ControlsLib/Templates/Spinner.template b/Crow.ControlsLib/Templates/Spinner.template new file mode 100755 index 00000000..4d3569bf --- /dev/null +++ b/Crow.ControlsLib/Templates/Spinner.template @@ -0,0 +1,18 @@ +<?xml version="1.0"?> +<HorizontalStack MinimumSize="40,10" Name="hstack" Margin="0" Spacing="0"> + <Border BorderWidth="1" Width="80%" Background="White" + Foreground="{./Foreground}" Margin="0"> + <TextBox Foreground="{./Foreground}" Font="{./Font}" Width="Stretched" + Text="{²./Value}" TextAlignment="Right" Margin="0"/> + </Border> + <VerticalStack MinimumSize="8,10" Width="20%" Height="Stretched" Spacing="0" Margin="0" Background="Red"> + <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onUp" + Template="#Crow.Templates.ArrowButTemplate.crow"> + <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="up" Margin="0"/> + </Button> + <Button MouseRepeat="true" Width="Stretched" Height="50%" Margin="0" MouseClick="./onDown" + Template="#Crow.Templates.ArrowButTemplate.crow"> + <Image Path="#Crow.Images.Icons.updown.svg" SvgSub="down" Margin="0"/> + </Button> + </VerticalStack> +</HorizontalStack> diff --git a/Crow.ControlsLib/Templates/TabItem.template b/Crow.ControlsLib/Templates/TabItem.template new file mode 100644 index 00000000..f82b79c9 --- /dev/null +++ b/Crow.ControlsLib/Templates/TabItem.template @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<GenericStack Orientation="Vertical" Spacing="0" + Background="Onyx" + MouseEnter="{caption.Foreground=White}" + MouseLeave="{caption.Foreground=Gray}"> + <HorizontalStack Margin="2" Left="{./TabOffset}" + Name="TabTitle" + HorizontalAlignment="Left" + Height="{./TabThickness}" + Width="Fit"> + <Label Name="caption" Text="{./Caption}" Foreground="Gray"/> + <Border CornerRadius="5" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg" + MouseClick="./butCloseTabClick"/> + </Border> + </HorizontalStack> + <Container Name="Content"/> +</GenericStack> + diff --git a/Crow.ControlsLib/Templates/ToolWindow.template b/Crow.ControlsLib/Templates/ToolWindow.template new file mode 100755 index 00000000..f021f6ee --- /dev/null +++ b/Crow.ControlsLib/Templates/ToolWindow.template @@ -0,0 +1,24 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}" + Background="{./Background}" + MouseEnter="./onBorderMouseEnter" + MouseLeave="./onBorderMouseLeave"> + <VerticalStack Spacing="0"> +<!-- <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit" + Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">--> + <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9" + Name="hs" Margin="2" Spacing="0" Height="Fit"> + <GraphicObject Width="5"/> + <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> + <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" /> + <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg" + MouseClick="./butQuitPress"/> + </Border> + <GraphicObject Width="5"/> + </HorizontalStack> +<!-- </Border>--> + <Container Name="Content" MinimumSize="50,50" Background="0.5,0.5,0.5,0.5"/> + </VerticalStack> +</Border> diff --git a/Crow.ControlsLib/Templates/TreeView.template b/Crow.ControlsLib/Templates/TreeView.template new file mode 100644 index 00000000..c29e34c5 --- /dev/null +++ b/Crow.ControlsLib/Templates/TreeView.template @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<HorizontalStack> + <Scroller Name="scroller1" Margin="1" VerticalScrolling="true" + Background="{./Background}" + ScrollY="{../scrollbar1.Value}"> + <VerticalStack + Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/> + </Scroller> + <ScrollBar + Name="scrollbar1" + Value="{../scroller1.ScrollY}" + Maximum="{../scroller1.MaximumScroll}" + Width="14" Orientation="Vertical"/> +</HorizontalStack> diff --git a/Crow.ControlsLib/Templates/Window.template b/Crow.ControlsLib/Templates/Window.template new file mode 100755 index 00000000..20b23147 --- /dev/null +++ b/Crow.ControlsLib/Templates/Window.template @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}" + Background="{./Background}" + MouseEnter="./onBorderMouseEnter" + MouseLeave="./onBorderMouseLeave"> + <VerticalStack Spacing="0"> +<!-- <Border Name="TitleBar" BorderWidth="1" Foreground="White" Width="{./WidthPolicy}" Height="Fit" + Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9">--> + <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9" + Name="hs" Margin="2" Spacing="0" Height="Fit"> + <GraphicObject Width="5"/> + <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> + <Label Width="Stretched" Foreground="White" Margin="2" TextAlignment="Center" Text="{./Caption}" /> + <Border Visible="{./ShowMinimize}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Path="#Crow.Images.Icons.minimize.svg" + MouseClick="./onMinimized"/> + </Border> + <Border Visible="{./ShowNormal}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Path="#Crow.Images.Icons.normalize.svg" + MouseClick="./onUnmaximized"/> + </Border> + <Border Visible="{./ShowMaximize}" BorderWidth="1" Foreground="Transparent" Height="12" Width="12" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Path="#Crow.Images.Icons.maximize.svg" + MouseClick="./onMaximized"/> + </Border> + <Border BorderWidth="1" Foreground="Transparent" Height="14" Width="14" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Path="#Crow.Images.Icons.exit2.svg" + MouseClick="./butQuitPress"/> + </Border> + <GraphicObject Width="5"/> + </HorizontalStack> +<!-- </Border>--> + <Container Name="Content" MinimumSize="0,0" Background="0.5,0.5,0.5,0.5"/> + </VerticalStack> +</Border> diff --git a/Crow.ControlsLib/Templates/imgItemTemplate.goml b/Crow.ControlsLib/Templates/imgItemTemplate.goml new file mode 100755 index 00000000..c08f390e --- /dev/null +++ b/Crow.ControlsLib/Templates/imgItemTemplate.goml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> + <VerticalStack Width="0" Height="-1" Focusable="true" + MouseEnter="{Background=BlueCrayola}" + MouseLeave="{Background=Transparent}"> + <Image Width="-1" Height="-1" Path="{FullName}" MaximumSize="80,80"/> + <Label Text="{Name}" Width="-1" Height="-1" Margin="0" MaximumSize="100,0"/> + </VerticalStack> + diff --git a/Crow.ControlsLib/Templates/tmpDirItem.goml b/Crow.ControlsLib/Templates/tmpDirItem.goml new file mode 100755 index 00000000..01aef1e6 --- /dev/null +++ b/Crow.ControlsLib/Templates/tmpDirItem.goml @@ -0,0 +1,11 @@ +<?xml version="1.0"?> + <HorizontalStack Width="-1" Height="-1" Focusable="true" + HorizontalAlignment="Left" + MouseEnter="{Background=BlueCrayola}" + MouseLeave="{Background=Transparent}"> + <Image Width="16" Height="16" Path="#Tests.image.folder1.svg" SvgSub="{Attributes}"/> + <Label Text="{Name}" Width="-1" Height="-1" Margin="0"/> +<!-- <Label Text="{Attributes}" Width="-1" Height="-1" Margin="0"/> + <Label Text="{Extension}" Width="-1" Height="-1" Margin="0"/>--> + </HorizontalStack> + diff --git a/Crow.ControlsLib/Templates/treeList.crow b/Crow.ControlsLib/Templates/treeList.crow new file mode 100755 index 00000000..d47621af --- /dev/null +++ b/Crow.ControlsLib/Templates/treeList.crow @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<VerticalStack + Height="Fit" Name="ItemsContainer"/> |