diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-09-27 05:27:06 +0000 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2021-09-28 08:33:35 +0000 |
| commit | 942155da0d427b7c4f98fa91da390461b5f1dd9f (patch) | |
| tree | 486e26368ac109dfdef99b52fb22f547a4e87525 /Samples | |
| parent | c0fc101f87d4b4b55dbe7958d68e2a416e191217 (diff) | |
wip
Diffstat (limited to 'Samples')
8 files changed, 250 insertions, 10 deletions
diff --git a/Samples/common/ui/Interfaces/Divers/fitListWithStretchedItems.crow b/Samples/common/ui/Interfaces/Divers/fitListWithStretchedItems.crow index f159a6b2..73693535 100644 --- a/Samples/common/ui/Interfaces/Divers/fitListWithStretchedItems.crow +++ b/Samples/common/ui/Interfaces/Divers/fitListWithStretchedItems.crow @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<ListBox Data="{TestList}" Width="Fit" Focusable="true" > +<ListBox Data="{TestList}" Width="Fit" Focusable="true" Foreground="Red" > <Template> <Scroller Name="ItemsScroller" Height="Stretched" Background="Onyx" Margin="10"> <VerticalStack Name="ItemsContainer" Orientation="Horizontal" VerticalAlignment="Top" Height="Fit" Background="Grey" Margin="20"/> @@ -10,7 +10,7 @@ <ListItem Width="Stretched" Margin="1" CornerRadius="5" Selected="{Background=Yellow}" Unselected="{Background=Transparent}"> - <Label Text="{}" TextAlignment="Center" Font="mono, 9" Foreground="Black" Margin="6" Background="{}" Width="Stretched" /> + <Label Text="{}" TextAlignment="Center" Font="mono, 9" Foreground="{Foreground}" Margin="6" Background="{}" Width="Stretched" /> </ListItem> </ItemTemplate> diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView2.crow b/Samples/common/ui/Interfaces/Experimental/directoryView2.crow new file mode 100644 index 00000000..8035f749 --- /dev/null +++ b/Samples/common/ui/Interfaces/Experimental/directoryView2.crow @@ -0,0 +1,40 @@ +<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}"> + <Template> + <VerticalStack> + <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/> + <HorizontalStack Background="Grey" Margin="5"> + <Scroller Name="scroller1"> + <Wrapper Orientation="Vertical" Height="Fit" VerticalAlignment="Top" + Name="ItemsContainer" Margin="0" Spacing="2"/> + </Scroller> + <ScrollBar Name="scrollbar1" Orientation="Vertical" + Value="{²../scroller1.ScrollY}" Maximum="{../scroller1.MaxScrollY}" + CursorRatio="{../scroller1.ChildHeightRatio}" + LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" + Width="14" /> + </HorizontalStack> + </VerticalStack> + </Template> + <ItemTemplate DataType="System.IO.FileInfo"> + <ListItem Width="70" Height="60" + BubbleEvents="All" Tooltip="{Name}" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <VerticalStack> + <Image Margin="8" Width="Fit" Height="Stretched" Path="${FileIcon}" Scaled="true"/> + <Label Text="{Name}" Background="Jet" Width="Stretched" TextAlignment="Center" Multiline="true" Font="sans,9" /> + </VerticalStack> + </ListItem> + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo"> + <ListItem Width="90" Height="60" + BubbleEvents="All" Tooltip="{Name}" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <VerticalStack> + <Image Margin="0" Width="Fit" Height="Stretched" Path="${FolderIcon}" Scaled="true"/> + <Label Text="{Name}" Background="Jet" Width="Stretched" TextAlignment="Center" Multiline="true" Font="sans,9"/> + </VerticalStack> + </ListItem> + </ItemTemplate> +</DirectoryView2>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView3.crow b/Samples/common/ui/Interfaces/Experimental/directoryView3.crow new file mode 100644 index 00000000..1dd1d88d --- /dev/null +++ b/Samples/common/ui/Interfaces/Experimental/directoryView3.crow @@ -0,0 +1,35 @@ +<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}"> + <Template> + <VerticalStack> + <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/> + <VerticalStack Background="Grey" Margin="5"> + <Scroller Name="scroller1"> + <Wrapper Orientation="Horizontal" Height="Stretched" Width="Fit" HorizontalAlignment="Left" + Name="ItemsContainer" Margin="0" Spacing="2"/> + </Scroller> + </VerticalStack> + </VerticalStack> + </Template> + <ItemTemplate DataType="System.IO.FileInfo"> + <ListItem Width="Fit" Height="Fit" + BubbleEvents="All" Tooltip="{Name}" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <HorizontalStack Spacing="5"> + <Image Margin="0" Width="16" Height="16" Path="${FileIcon}" Scaled="true"/> + <Label Text="{Name}" Width="Fit" Font="sans,9" /> + </HorizontalStack> + </ListItem> + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo"> + <ListItem Width="Fit" Height="Fit" + BubbleEvents="All" Tooltip="{Name}" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <HorizontalStack Spacing="5"> + <Image Margin="0" Width="16" Height="16" Path="${FolderIcon}" Scaled="true"/> + <Label Text="{Name}" Width="Fit" Font="sans,9"/> + </HorizontalStack> + </ListItem> + </ItemTemplate> +</DirectoryView2>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView4.crow b/Samples/common/ui/Interfaces/Experimental/directoryView4.crow new file mode 100644 index 00000000..ee3e8b1b --- /dev/null +++ b/Samples/common/ui/Interfaces/Experimental/directoryView4.crow @@ -0,0 +1,40 @@ +<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}"> + <Template> + <VerticalStack> + <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/> + <VerticalStack Background="Grey" Margin="5"> + <Scroller Name="scroller1"> + <VerticalStack Height="Fit" Width="Stretched" VerticalAlignment="Top" + Name="ItemsContainer" Margin="0" Spacing="2"/> + </Scroller> + </VerticalStack> + </VerticalStack> + </Template> + <ItemTemplate DataType="System.IO.FileInfo"> + <ListItem Width="Stretched" Height="Fit" + BubbleEvents="All" Tooltip="{Name}" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <HorizontalStack Spacing="5"> + <Image Margin="0" Width="16" Height="16" Path="${FileIcon}" Scaled="true"/> + <Label Text="{Name}" Width="Stretched" Font="sans,9" /> + <Label Text="{Length}" Width="Fit" Font="sans,9"/> + <Label Text="{Attributes}" Width="Fit" Font="sans,9"/> + <Label Text="{LastAccessTime}" Width="Fit" Font="sans,9"/> + </HorizontalStack> + </ListItem> + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo"> + <ListItem Width="Stretched" Height="Fit" + BubbleEvents="All" Tooltip="{Name}" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <HorizontalStack Spacing="5"> + <Image Margin="0" Width="16" Height="16" Path="${FolderIcon}" Scaled="true"/> + <Label Text="{Name}" Width="Stretched" Font="sans,9"/> + <Label Text="{Attributes}" Width="Fit" Font="sans,9"/> + <Label Text="{LastAccessTime}" Width="Fit" Font="sans,9"/> + </HorizontalStack> + </ListItem> + </ItemTemplate> +</DirectoryView2>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView5.crow b/Samples/common/ui/Interfaces/Experimental/directoryView5.crow new file mode 100644 index 00000000..62b743ab --- /dev/null +++ b/Samples/common/ui/Interfaces/Experimental/directoryView5.crow @@ -0,0 +1,36 @@ +<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}"> + <Template> + <VerticalStack> + <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/> + <VerticalStack Background="DarkGrey" Margin="0"> + <Scroller Name="scroller1"> + <Table Columns=",20;Name,Stretched;Size,100;Accessed,Fit" Height="Fit" Width="Stretched" VerticalAlignment="Top" + Name="ItemsContainer" Margin="0" Spacing="0" RowsMargin="0" ColumnSpacing="10" + HorizontalLineWidth="0" VerticalLineWidth="1" /> + </Scroller> + </VerticalStack> + </VerticalStack> + </Template> + <ItemTemplate DataType="System.IO.DirectoryInfo"> + <TableRow Width="Stretched" Height="Fit" Focusable="true" + BubbleEvents="All" Tooltip="{Name}" + Selected="{Background=${ControlHighlight}}" + Unselected="{Background=Transparent}"> + <Image Width="Stretched" Height="Stretched" Path="${FolderIcon}" Margin="0" /> + <Label Text="{Name}" Width="Fit" Font="sans,11" Margin="3"/> + <Label Text="" Font="sans,9"/> + <Label Text="{LastAccessTime}" Font="sans,9"/> + </TableRow> + </ItemTemplate> + <ItemTemplate DataType="System.IO.FileInfo"> + <TableRow Width="Stretched" Height="Fit" Focusable="true" + BubbleEvents="All" Tooltip="{Name}" + Selected="{Background=${ControlHighlight}}" + Unselected="{Background=Transparent}"> + <Image Width="Stretched" Height="Stretched" Path="${FileIcon}" Margin="2" /> + <Label Text="{Name}" Width="Fit" Font="sans,11" Margin="3"/> + <Label Text="{Length}" Font="sans,9" TextAlignment="Right"/> + <Label Text="{LastAccessTime}" Font="sans,9"/> + </TableRow> + </ItemTemplate> +</DirectoryView2>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Experimental/fileDialog.crow b/Samples/common/ui/Interfaces/Experimental/fileDialog.crow index 90f9c70c..977cbf31 100644 --- a/Samples/common/ui/Interfaces/Experimental/fileDialog.crow +++ b/Samples/common/ui/Interfaces/Experimental/fileDialog.crow @@ -12,6 +12,95 @@ <Label Text="{ActiveWidget}" Font="mono, 8"/> </HorizontalStack> <Container> - <FileDialog Focusable="true" Resizable="true"/> + <FileDialog Focusable="true" Resizable="true"> + <Template> + <Border Name="SizeHandle" Style="winBorder" CornerRadius="{./CornerRadius}" Background="{./Background}"> + <VerticalStack Spacing="0"> + <HorizontalStack Background="${WindowTitleBarBackground}" Margin="0" Spacing="0" Height="Fit"> + <Widget Width="5"/> + <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> + <Label Name="MoveHandle" Width="Stretched" Foreground="${WindowTitleBarForeground" Margin="2" TextAlignment="Center" Text="{./Caption}" /> + <Border CornerRadius="0" 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.Icons.exit2.svg" + MouseClick="./onQuitPress"/> + </Border> + <Widget Width="5"/> + </HorizontalStack> + <Container Name="Content" MinimumSize="50,50" Background="Jet"> + <VerticalStack Spacing="2" Margin="1"> + <HorizontalStack Height="Fit" Margin="2"> + <Button MinimumSize="1,1" Fit="true" Caption="Up" MouseClick="./goUpDirClick"> + <Image Margin="2" Width="18" Height="18" + Path="#Crow.Icons.level-up.svg"/> + </Button> + <TextBox Style="TxtInFileDialog" Text="{²./CurrentDirectory}" Margin="3"/> + </HorizontalStack> + <DirectoryView ShowHidden="{²../cbShowHidden.IsChecked}" FileMask="{²../txtFileMask.Text}" + ShowFiles="{²../cbShowFiles.IsChecked}" Name="fv" CurrentDirectory="{./CurrentDirectory}" + SelectedItemChanged="./onFVSelectedItemChanged" + Width="100%" Margin="1" MouseDoubleClick="./onFileSelectDblClick"> + <Template> + <ListBox Name="fileView" Data="{./FileSystemEntries}" + SelectedItemChanged="./onSelectedItemChanged"> + <Template> + <HorizontalStack Background="Grey"> + <Scroller Name="scroller1"> + <VerticalStack Height="Fit" VerticalAlignment="Top" + Name="ItemsContainer" Margin="2" Spacing="1"/> + </Scroller> + <ScrollBar Name="scrollbar1" Orientation="Vertical" + Value="{²../scroller1.ScrollY}" Maximum="{../scroller1.MaxScrollY}" + CursorRatio="{../scroller1.ChildHeightRatio}" + LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" + Width="14" /> + </HorizontalStack> + </Template> + <ItemTemplate> + <Widget Height="16" Background="Red"/> + </ItemTemplate> + <ItemTemplate DataType="System.IO.FileInfo"> + <ListItem Height="Fit" + BubbleEvents="All" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <HorizontalStack Spacing="5"> + <Image Width="20" Height="20" Path="#Crow.Icons.file.svg"/> + <Label Margin="2" Text="{Name}" Width="Stretched"/> + </HorizontalStack> + </ListItem> + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo"> + <ListItem Height="Fit" + BubbleEvents="All" + Selected = "{Background=${ControlHighlight}}" + Unselected = "{Background=Transparent}"> + <HorizontalStack Spacing="5"> + <Image Width="20" Height="20" Path="#Crow.Icons.folder.svg"/> + <Label Margin="2" Text="{Name}" Width="Stretched"/> + <Label Margin="2" Text="{LastAccessTime}" /> + </HorizontalStack> + </ListItem> + </ItemTemplate> + </ListBox> + </Template> + </DirectoryView> + <HorizontalStack Height="Fit"> + <TextBox Style="TxtInFileDialog" Text="{²./SelectedFile}"/> + <TextBox Style="TxtInFileDialog" Width="50" Name="txtFileMask" Text="{²./SearchPattern}"/> + </HorizontalStack> + <HorizontalStack Height="Fit" Margin="2" Spacing="2"> + <CheckBox Style="CheckBoxAlt" Name="cbShowFiles" Caption="Show Files" IsChecked="{²./ShowFiles}" Width="Fit"/> + <CheckBox Style="CheckBoxAlt" Name="cbShowHidden" Caption="Show Hidden" IsChecked="{²./ShowHidden}" Width="Fit"/> + <Widget Width="Stretched"/> + <Button Caption="Ok" Command="{./CMDOk}"/> + <Button Caption="Cancel" Command="{./CMDCancel}"/> + </HorizontalStack> + </VerticalStack> + </Container> + </VerticalStack> + </Border> + </Template> + </FileDialog> </Container> </VerticalStack>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Experimental/tabView1.crow b/Samples/common/ui/Interfaces/Experimental/tabView1.crow index 773ec4fe..7dfcede8 100644 --- a/Samples/common/ui/Interfaces/Experimental/tabView1.crow +++ b/Samples/common/ui/Interfaces/Experimental/tabView1.crow @@ -1,4 +1,4 @@ <TabView> - <GroupBox Caption="test" Background="Red"/> - <GroupBox Caption="test" Background="Blue"/> + <GroupBox Name="test" Background="Red"/> + <GroupBox Name="test2" Background="Blue"/> </TabView>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Experimental/tabviewWithScrollTabName.crow b/Samples/common/ui/Interfaces/Experimental/tabviewWithScrollTabName.crow index 4b29646e..6fc5ba47 100644 --- a/Samples/common/ui/Interfaces/Experimental/tabviewWithScrollTabName.crow +++ b/Samples/common/ui/Interfaces/Experimental/tabviewWithScrollTabName.crow @@ -1,12 +1,9 @@ <TabView Orientation="Horizontal"> <Template> - <GenericStack Orientation="{./OppositeOrientation}" Spacing="0" Background="{./Background}"> + <VerticalStack Spacing="0" Background="{./Background}"> <ListBox Data="{./Items}" Height="Fit" HorizontalAlignment="Left" VerticalAlignment="Top" SelectedItem="{²./SelectedItem}"> <Template> <VerticalStack Spacing="0" > - <Scroller Name="ItemsScroller" > - <GenericStack Orientation="{../../../../../Orientation}" Width="Fit" Name="ItemsContainer" HorizontalAlignment="Left"/> - </Scroller> <ScrollBar Orientation="Horizontal" Foreground="RoyalBlue" Height="6" Width="Stretched" CornerRadius="3" Value="{²../ItemsScroller.ScrollX}" LargeIncrement="{../ItemsScroller.PageWidth}" SmallIncrement="1" @@ -17,6 +14,9 @@ </Container> </Template> </ScrollBar> + <Scroller Name="ItemsScroller" > + <HorizontalStack Width="Fit" Name="ItemsContainer" HorizontalAlignment="Left"/> + </Scroller> </VerticalStack> </Template> <ItemTemplate> @@ -28,7 +28,7 @@ </ItemTemplate> </ListBox> <Group Name="ItemsContainer" /> - </GenericStack> + </VerticalStack> </Template> <GroupBox Name="item 1" Caption="item 1" IsVisible="true" Background="Violet"/> <GroupBox Name="item 2" Caption="item 2" IsVisible="false" Background="CornflowerBlue"/> |