]> O.S.I.I.S - jp/crowedit.git/commitdiff
wip
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 21 Jul 2025 19:25:10 +0000 (21:25 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 21 Jul 2025 19:40:12 +0000 (21:40 +0200)
.gitignore
CrowEditBase/ui/DockWindow.template
CrowEditBase/ui/DockWindow2.template
CrowEditBase/ui/EditorTabView.template [new file with mode: 0644]
ui/main.crow
ui/windows/winEditor.crow

index 3521011d81d5596a3e4376e556df5d40af306dcb..15a380e67f2d2c40fda5905d96144ca5fe471ad5 100644 (file)
@@ -1,6 +1,7 @@
 CrowDesignAssembly/
 netcoredbg/
 testfiles/
+plugins/CEEbnfPlugin/Grammars/
 #Autosave files
 *~
 
index 6cb14e8e1feb0e7b8f7e33cc841ec2717a1b9ac6..f0a3f105829bbc64d856c626fdff501e09868405 100644 (file)
@@ -1,5 +1,4 @@
 <?xml version="1.0"?>
-<!--<Widget Background="{./Background}"/>-->
 <Border        Name="SizeHandle" BorderWidth="1" Foreground="Black" CornerRadius="{./CornerRadius}"
                StickyMouse="8" StickyMouseEnabled="{./IsFloating}" Background="{./Background}">
        <VerticalStack Spacing="0" Name="MoveHandle">
index 17c6eba0f7eeee9558d3d8a6bf9578c0756c4bbe..418b6b7d7fce160cd980557283890a0c9c2aba96 100644 (file)
@@ -1,42 +1,25 @@
 <?xml version="1.0"?>
-<!--<Widget Background="{./Background}"/>-->
 <Border        Name="SizeHandle" BorderWidth="1" Foreground="Black" CornerRadius="{./CornerRadius}"
                StickyMouse="8" StickyMouseEnabled="{./IsFloating}" Background="{./Background}">
        <Group Name="MoveHandle">
-               <!--<Label Text="{./Caption}" VerticalAlignment="Top" HorizontalAlignment="Left" Fit="true" Foreground="DimGrey" Font="${SmallUIFont}"/>
-               <HorizontalStack VerticalAlignment="Top" HorizontalAlignment="Right" Fit="true">
-                       <ListBox Data="{./DockCommands}" Fit="true">
-                               <Template>
-                                       <HorizontalStack Name="ItemsContainer" />
-                               </Template>
-                               <ItemTemplate Path="#Crow.WindowButton.template"/>
-                       </ListBox>
-                       <ListBox Data="{./Commands}" Fit="true">
-                               <Template>
-                                       <HorizontalStack Name="ItemsContainer" />
-                               </Template>
-                               <ItemTemplate Path="#Crow.WindowButton.template"/>
-                       </ListBox>
-               </HorizontalStack>-->
-               <!--<HorizontalStack Background="vgradient|0:0.5,0.4,0.6,0.5|1:0.2,0.3,0.3,0.7" VerticalAlignemnt="Top"
-                               Name="hs" Margin="0" Spacing="0" Height="Fit" Visible="{./IsFloating}">
-                       <Widget Width="5"/>
-                       <Image Margin="1" Width="10" Height="10" Path="{./Icon}"/>
-                       <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Left" Text="{./Caption}"  />
-                       <ListBox Data="{./DockCommands}" Fit="true">
-                               <Template>
-                                       <HorizontalStack Name="ItemsContainer" />
-                               </Template>
-                               <ItemTemplate Path="#Crow.WindowButton.template"/>
-                       </ListBox>
-                       <ListBox Data="{./Commands}" Fit="true">
-                               <Template>
-                                       <HorizontalStack Name="ItemsContainer" />
-                               </Template>
-                               <ItemTemplate Path="#Crow.WindowButton.template"/>
-                       </ListBox>
-                       <Widget Width="5"/>
-               </HorizontalStack>-->
-               <Container Name="Content" MinimumSize="50,50" />
+               <VerticalStack Spacing="0" >
+                       <HorizontalStack Background="vgradient|0:0.5,0.4,0.6,0.5|1:0.2,0.3,0.3,0.7" Width="Stretched"
+                                       Name="hs" Margin="0" Spacing="0" Height="Fit" Visible="{./IsFloating}">
+                               <Widget Width="5"/>
+                               <Image Margin="1" Width="10" Height="10" Path="{./Icon}"/>
+                               <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Left" Text="{./Caption}"  />
+                               <ListBox Style="DockWinTitleBarIconMenu" Data="{./AdditionalCommands}"/>
+                               <ListBox Style="DockWinTitleBarIconMenu" Data="{./DockCommands}"/>
+                               <ListBox Style="DockWinTitleBarIconMenu" Data="{./Commands}"/>
+                               <Widget Width="5"/>
+                       </HorizontalStack>
+                       <Container Name="Content" MinimumSize="50,50" />
+               </VerticalStack>
+               <HorizontalStack Visible="{./IsDockedInStack}" Height="Fit" Margin="1" Background="Jet" Width="Fit"
+                               HorizontalAlignment="Right" Top="5">
+                       <ListBox Style="DockWinTitleBarIconMenu" Data="{./AdditionalCommands}"/>
+                       <ListBox Style="DockWinTitleBarIconMenu" Data="{./DockCommands}"/>
+                       <ListBox Style="DockWinTitleBarIconMenu" Data="{./Commands}"/>
+               </HorizontalStack>
        </Group>
 </Border>
diff --git a/CrowEditBase/ui/EditorTabView.template b/CrowEditBase/ui/EditorTabView.template
new file mode 100644 (file)
index 0000000..9dcc451
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<VerticalStack Spacing="0">
+       <ListBox Data="{./Items}" Height="Fit" >
+               <Template>
+                       <VerticalStack Spacing="0" >
+                               <ScrollBar Orientation="Horizontal" Foreground="RoyalBlue" Height="6" Width="Stretched" CornerRadius="3"
+                                       Value="{²../ItemsScroller.ScrollX}"
+                                       LargeIncrement="{../ItemsScroller.PageWidth}" SmallIncrement="1"
+                                       CursorRatio="{../ItemsScroller.ChildWidthRatio}" Maximum="{../ItemsScroller.MaxScrollX}">
+                                       <Template>
+                                               <Container Margin="1" Background="{./Background}">
+                                                       <Widget Name="Cursor" Background="{./Foreground}" CornerRadius="{./CornerRadius}"/>
+                                               </Container>
+                                       </Template>
+                               </ScrollBar>
+                               <Scroller Name="ItemsScroller" Height="Fit" Width="Stretched">
+                                       <HorizontalStack Name="ItemsContainer" Width="Fit" HorizontalAlignment="Left"/>
+                               </Scroller>
+                       </VerticalStack>
+               </Template>
+               <ItemTemplate>
+                       <ListItem RootDataLevel="true" Fit="true" Background="${InactiveTabBackground}" Foreground="${InactiveTabForeground}" IsSelected="{IsVisible}"
+                                       Selected="{.DataSource.IsVisible='true'};{Background=${SelectedTabBackground}};{Foreground=${SelectedTabForeground}}"
+                                       Unselected="{.DataSource.IsVisible='false'};{Background=${InactiveTabBackground}};{Foreground=${InactiveTabForeground}}"
+                                       BubbleEvents="MouseWheel">
+                               <HorizontalStack DataSource="{DataSource}" Margin="3" Spacing="5">
+                                       <!--<Image Style="TreeIcon" Path="{Icon}" SvgSub="{IconSub}"/> No icon in Document class-->
+                                       <Label Text="{FileName}" Tooltip="{FullPath}" ContextCommands="{TabCommands}" Foreground="{../../Foreground}" Margin="3" />
+                                       <Widget Width="10" Height="10" Background="RoyalBlue" IsVisible="{IsDirty}"/>
+                                       <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.Icons.exit2.svg"
+                                                               MouseClick="OnQueryClose"/>
+                                       </Border>
+                               </HorizontalStack>
+                       </ListItem>
+               </ItemTemplate>
+       </ListBox>
+       <Group Name="ItemsContainer" />
+</VerticalStack>
+
+
index 832d0f38872e2f8758c0be0892d0e441a391c53f..2b0a0a186f3ceae01ade8d0fe0612e888a3e845d 100755 (executable)
@@ -13,7 +13,7 @@
                                                        <Label Text="{./Caption}" Width="Stretched" Height="Fit" Margin="5"
                                                                Background="{./Background}"/>
                                                </Template>
-                                               <VerticalStack Name="ItemsContainer" Height="Fit" Width="Fit" Background="Jet"/>
+                                               <VerticalStack Name="ItemsContainer" Height="Fit" Width="Fit" Background="Jet" Margin="1"/>
                                        </Popper>
                                </Template>
                        </MenuItem>
index b81176e399771ae98a48be63449badbdc934640d..9dc8f7080f5badc8d975ed5bd2db218787b3a434 100644 (file)
@@ -1,53 +1,8 @@
 <?xml version="1.0"?>
-<DockWindow Caption="Editor"  Width="50%" Height="80%">
-       <TabView ItemTemplate="{EditorItemTemplates}"
-                       Data="{OpenedDocuments}" SelectedItem="{²CurrentDocument}"     DataTest="EditorPath">
-               <Template>
-                       <VerticalStack Spacing="0" >
-                               <ListBox Data="{./Items}" Height="Fit" >
-                                       <Template>
-                                               <VerticalStack Spacing="0" >
-                                                       <ScrollBar Orientation="Horizontal" Foreground="RoyalBlue" Height="6" Width="Stretched" CornerRadius="3"
-                                                               Value="{²../ItemsScroller.ScrollX}"
-                                                               LargeIncrement="{../ItemsScroller.PageWidth}" SmallIncrement="1"
-                                                               CursorRatio="{../ItemsScroller.ChildWidthRatio}" Maximum="{../ItemsScroller.MaxScrollX}">
-                                                               <Template>
-                                                                       <Container Margin="1" Background="{./Background}">
-                                                                               <Widget Name="Cursor" Background="{./Foreground}" CornerRadius="{./CornerRadius}"/>
-                                                                       </Container>
-                                                               </Template>
-                                                       </ScrollBar>
-                                                       <Scroller Name="ItemsScroller" Height="Fit" Width="Stretched">
-                                                               <HorizontalStack Name="ItemsContainer" Width="Fit" HorizontalAlignment="Left"/>
-                                                       </Scroller>
-                                               </VerticalStack>
-                                       </Template>
-                                       <ItemTemplate>
-                                               <!--<ListItem Fit="true" Background="${InactiveTabItem}" IsSelected="{IsVisible}" Margin="5"
-                                                               Selected="{.DataSource.Visible='true'};{Background=.DataSource.Background}"
-                                                               Unselected="{.DataSource.Visible='false'};{Background=${InactiveTabItem}}">
-                                                       <Label Text="{Name}" Width="200" />
-                                               </ListItem>-->
-                                               <ListItem RootDataLevel="true" Fit="true" Background="${InactiveTabBackground}" Foreground="${InactiveTabForeground}" IsSelected="{IsVisible}"
-                                                               Selected="{.DataSource.IsVisible='true'};{Background=${SelectedTabBackground}};{Foreground=${SelectedTabForeground}}"
-                                                               Unselected="{.DataSource.IsVisible='false'};{Background=${InactiveTabBackground}};{Foreground=${InactiveTabForeground}}"
-                                                               BubbleEvents="MouseWheel">
-                                                       <HorizontalStack DataSource="{DataSource}" Margin="3" Spacing="5">
-                                                               <!--<Image Style="TreeIcon" Path="{Icon}" SvgSub="{IconSub}"/> No icon in Document class-->
-                                                               <Label Text="{FileName}" Tooltip="{FullPath}" ContextCommands="{TabCommands}" Foreground="{../../Foreground}" Margin="3" />
-                                                               <Widget Width="10" Height="10" Background="RoyalBlue" IsVisible="{IsDirty}"/>
-                                                               <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.Icons.exit2.svg"
-                                                                                MouseClick="OnQueryClose"/>
-                                                               </Border>
-                                                       </HorizontalStack>
-                                               </ListItem>
-                                       </ItemTemplate>
-                               </ListBox>
-                               <Group Name="ItemsContainer" />
-                       </VerticalStack>
-               </Template>
+<DockWindow Style="DockWindow" Caption="Editor"  Width="50%" Height="80%">
+       <TabView Data="{OpenedDocuments}" SelectedItem="{²CurrentDocument}"    DataTest="EditorPath"
+                               Template="#ui.EditorTabView.template"
+                               ItemTemplate="{EditorItemTemplates}">
        </TabView>
 </DockWindow>