aboutsummaryrefslogtreecommitdiffstatsci
path: root/Samples/common/ui/Interfaces/Experimental
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-10-26 08:23:19 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2021-10-26 08:23:19 +0200
commitc706b713a716e8b7fd29508ccf88e5de5041d1d4 (patch)
treec71fcc73e4f28c9248eece7df8a2c70225cc498c /Samples/common/ui/Interfaces/Experimental
parent942155da0d427b7c4f98fa91da390461b5f1dd9f (diff)
rename all 'GraphicObject' to 'Widget', move to netcoreapp3.0 for crow library to use LoadContext for native dll resolutionFileDialogImprove
Diffstat (limited to 'Samples/common/ui/Interfaces/Experimental')
-rw-r--r--Samples/common/ui/Interfaces/Experimental/directoryView2-dyn.crow5
-rw-r--r--Samples/common/ui/Interfaces/Experimental/directoryView2.crow15
-rw-r--r--Samples/common/ui/Interfaces/Experimental/directoryView3.crow71
-rw-r--r--Samples/common/ui/Interfaces/Experimental/directoryView5.crow74
-rw-r--r--Samples/common/ui/Interfaces/Experimental/fileDialog.crow6
-rw-r--r--Samples/common/ui/Interfaces/Experimental/randomProgress.crow18
6 files changed, 110 insertions, 79 deletions
diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView2-dyn.crow b/Samples/common/ui/Interfaces/Experimental/directoryView2-dyn.crow
new file mode 100644
index 00000000..811b3dba
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/directoryView2-dyn.crow
@@ -0,0 +1,5 @@
+<VerticalStack>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 Name="dv" CurrentDirectory="/mnt/devel" MouseDoubleClick="./onFileSelectDblClick"/>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView2.crow b/Samples/common/ui/Interfaces/Experimental/directoryView2.crow
index 8035f749..9bfebe72 100644
--- a/Samples/common/ui/Interfaces/Experimental/directoryView2.crow
+++ b/Samples/common/ui/Interfaces/Experimental/directoryView2.crow
@@ -1,7 +1,8 @@
-<DirectoryView2 CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
- <Template>
- <VerticalStack>
- <Spinner Value="{²./IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+<VerticalStack>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 UseLoadingThread="false" Name="dv" CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
+ <Template>
<HorizontalStack Background="Grey" Margin="5">
<Scroller Name="scroller1">
<Wrapper Orientation="Vertical" Height="Fit" VerticalAlignment="Top"
@@ -13,8 +14,7 @@
LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
Width="14" />
</HorizontalStack>
- </VerticalStack>
- </Template>
+ </Template>
<ItemTemplate DataType="System.IO.FileInfo">
<ListItem Width="70" Height="60"
BubbleEvents="All" Tooltip="{Name}"
@@ -37,4 +37,5 @@
</VerticalStack>
</ListItem>
</ItemTemplate>
-</DirectoryView2> \ No newline at end of file
+</DirectoryView2>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView3.crow b/Samples/common/ui/Interfaces/Experimental/directoryView3.crow
index 1dd1d88d..45d811a2 100644
--- a/Samples/common/ui/Interfaces/Experimental/directoryView3.crow
+++ b/Samples/common/ui/Interfaces/Experimental/directoryView3.crow
@@ -1,35 +1,38 @@
-<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>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 Name="dv" CurrentDirectory="/mnt/devel" Data="{/FileSystemEntries}">
+ <Template>
+ <VerticalStack>
+ <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>
- </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
+ </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>
+</VerticalStack> \ No newline at end of file
diff --git a/Samples/common/ui/Interfaces/Experimental/directoryView5.crow b/Samples/common/ui/Interfaces/Experimental/directoryView5.crow
index 62b743ab..5b59a0f6 100644
--- a/Samples/common/ui/Interfaces/Experimental/directoryView5.crow
+++ b/Samples/common/ui/Interfaces/Experimental/directoryView5.crow
@@ -1,36 +1,40 @@
-<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>
+ <EnumSelector Caption="View Style" EnumValue="{²../dv.ViewStyle}"/>
+ <Spinner Value="{²../dv.IconSize}" SmallIncrement="1" LargeIncrement="1"/>
+ <DirectoryView2 Name="dv" 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>
- </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
+ </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>
+</VerticalStack> \ 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 977cbf31..c26e3a7a 100644
--- a/Samples/common/ui/Interfaces/Experimental/fileDialog.crow
+++ b/Samples/common/ui/Interfaces/Experimental/fileDialog.crow
@@ -12,7 +12,7 @@
<Label Text="{ActiveWidget}" Font="mono, 8"/>
</HorizontalStack>
<Container>
- <FileDialog Focusable="true" Resizable="true">
+ <FileDialog Focusable="true" Resizable="true" Width="80%" Height="80%">
<Template>
<Border Name="SizeHandle" Style="winBorder" CornerRadius="{./CornerRadius}" Background="{./Background}">
<VerticalStack Spacing="0">
@@ -65,7 +65,7 @@
Selected = "{Background=${ControlHighlight}}"
Unselected = "{Background=Transparent}">
<HorizontalStack Spacing="5">
- <Image Width="20" Height="20" Path="#Crow.Icons.file.svg"/>
+ <Image Width="16" Height="16" Path="#Crow.Icons.file.svg"/>
<Label Margin="2" Text="{Name}" Width="Stretched"/>
</HorizontalStack>
</ListItem>
@@ -76,7 +76,7 @@
Selected = "{Background=${ControlHighlight}}"
Unselected = "{Background=Transparent}">
<HorizontalStack Spacing="5">
- <Image Width="20" Height="20" Path="#Crow.Icons.folder.svg"/>
+ <Image Width="16" Height="16" Path="#Crow.Icons.folder.svg"/>
<Label Margin="2" Text="{Name}" Width="Stretched"/>
<Label Margin="2" Text="{LastAccessTime}" />
</HorizontalStack>
diff --git a/Samples/common/ui/Interfaces/Experimental/randomProgress.crow b/Samples/common/ui/Interfaces/Experimental/randomProgress.crow
new file mode 100644
index 00000000..9b63b81a
--- /dev/null
+++ b/Samples/common/ui/Interfaces/Experimental/randomProgress.crow
@@ -0,0 +1,18 @@
+<VerticalStack>
+ <VerticalStack Width="Fit" Background="DarkSlateGrey" Margin="10" Height="Fit">
+ <HorizontalStack Height="Fit" Spacing="10">
+ <Label Text="Value:"/>
+ <Label Text="{../../slider.Value}" Background="Onyx" Margin="1" Width="40" TextAlignment="Right"/>
+ </HorizontalStack>
+ <Slider Name="slider" Height="10" Width="200" Background="DarkGrey" LargeIncrement="20" SmallIncrement="5"
+ Minimum="10" Maximum="1000" Value="{²RandomProgressItemCount}"/>
+ </VerticalStack>
+ <ListBox UseLoadingThread="false" Data="{RandomProgressList}">
+ <Template>
+ <Wrapper Name="ItemsContainer"/>
+ </Template>
+ <ItemTemplate>
+ <ProgressBar Maximum="{Maximum}" Value="{Value}" Height="10" Width="50"/>
+ </ItemTemplate>
+ </ListBox>
+</VerticalStack> \ No newline at end of file