]> O.S.I.I.S - jp/crow.git/commitdiff
save commit
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 12 Jul 2024 07:12:56 +0000 (09:12 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Fri, 12 Jul 2024 07:12:56 +0000 (09:12 +0200)
16 files changed:
Backends/CairoBackend/Crow.CairoBackend.csproj
Backends/CairoBackend/src/EglBackend.cs
Backends/CairoBackend/src/GLSurface.cs
Backends/CairoBackend/src/ImageBackend.cs
Backends/CairoBackend/src/Surface.cs
Backends/Directory.Build.props
Backends/VkvgBackend/Crow.VkvgBackend.csproj
Crow/Templates/DirectoryView.template
Crow/src/Widgets/PrivateContainer.cs
Crow/src/Widgets/Widget.cs
Directory.Build.props
Samples/Directory.Build.props
Samples/HelloWorld/HelloWorld.csproj
Samples/HelloWorld/main.cs
Samples/common/ui/Interfaces/Divers/0.crow
Samples/common/ui/Interfaces/Experimental/colorPicktest.crow

index d423fe36704cfcffd9b25c8b52da9cc3e0ef4bba..3790837587d91e6f0ecfd9ceff6fe2283a1c5f8f 100644 (file)
@@ -20,7 +20,7 @@
 
   <ItemGroup>
     <PackageReference Include="glfw-sharp" Version="$(GlfwSharpVersion)" />
-    <PackageReference Include="OpenGL.Net" Version="0.8.4" />
+    <!--<PackageReference Include="OpenGL.Net" Version="0.8.4" />-->
     <ProjectReference Include="..\..\Drawing2D\Drawing2D.csproj" />
   </ItemGroup>
 
index 073793e75ed599ebbb405f93da53bf8a33284b0a..a54f9917913300944046d22c76d0223e02919491 100644 (file)
@@ -3,6 +3,7 @@ using System.IO;
 using Drawing2D;
 using Glfw;
 
+#if CAIRO_HAS_GL
 namespace Crow.CairoBackend
 {
        public class EglBackend : CairoBackendBase {
@@ -83,3 +84,4 @@ namespace Crow.CairoBackend
        }
 }
 
+#endif
\ No newline at end of file
index 4fa262cc745facf965235a4d679d08c206e9b805..c55ec208f9dfa22b3926446b9dc4ade3f62c6dd5 100644 (file)
@@ -29,6 +29,9 @@
 //
 
 using System;
+
+#if CAIRO_HAS_GL
+
 using OpenGL;
 using static OpenGL.Gl;
 
@@ -93,3 +96,4 @@ namespace Crow.CairoBackend {
                }
        }
 }
+#endif
\ No newline at end of file
index 3f59578bf2f116f86663e6c3c28db2ab40b2316a..c8ff7f5e9a25e17ea15485bfef48f427dca1c10a 100644 (file)
@@ -65,6 +65,8 @@ namespace Crow.CairoBackend
                {
                        IContext ctx = base.PrepareUIFrame (existingContext, clipping);
 
+                       //clear(ctx);
+
                        for (int i = 0; i < clipping.NumRectangles; i++)
                                ctx.Rectangle (clipping.GetRectangle (i));
                        ctx.Clip ();
index 413384f036a523a197a38c6d31910b6b216e9e1e..5a21787924dfe6495588581c09948b9e53512ee0 100644 (file)
@@ -85,7 +85,9 @@ namespace Crow.CairoBackend {
                        case SurfaceType.Svg:
                                return new SvgSurface (surface, owned);
                        case SurfaceType.GL:
+#if CAIRO_HAS_GL
                                return new GLSurface (surface, owned);
+#endif
                        default:
                                return new Surface (surface, owned);
                        }
index 0e333546e81dcbe6d10a5c3c81e41018e2bf545b..c13778f3d14452c63f5f2d6037e48341440da9b2 100644 (file)
@@ -30,7 +30,7 @@
                <PackageProjectUrl>https://github.com/jpbruyere/Crow/wiki</PackageProjectUrl>
                <PackageLicenseExpression>MIT</PackageLicenseExpression>
                <PackageIcon>crow.png</PackageIcon>
-               <PackageCopyright>Copyright 2021</PackageCopyright>
+               <PackageCopyright>Copyright 2023</PackageCopyright>
 
        </PropertyGroup>
        <ItemGroup>
index 226c336aabae0c238029cc25d36209adcdddb5ed..13303e952063c565ac64d68a96df1ed349415f03 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <TargetFramework>netstandard2.1</TargetFramework>
 
     <AssemblyVersion>1.1.0</AssemblyVersion>
     <PackageVersion>$(AssemblyVersion)-beta</PackageVersion>
index 7a157bddc0b10d36d9b014cc0d4c5c4b0584efa5..efbdebac1074eaa6ced60443c04e7b6a3acd8a47 100644 (file)
@@ -6,7 +6,7 @@
                                Selected="{Background=${ControlHighlight}}"
                                Unselected="{Background=Transparent}">
                        <HorizontalStack>
-                               <Image Margin="1" Width="14" Height="14" Path="#Crow.Icons.file.svg"/>
+                               <Image Margin="1" Width="${IconSize}" Height="${IconSize}" Path="#Crow.Icons.file.svg"/>
                                <Label Text="{Name}" Width="Stretched"/>
                        </HorizontalStack>
                </ListItem>
                                                                MouseEnter="{Foreground=DimGrey}"
                                                                MouseLeave="{Foreground=Transparent}">
                                                        <HorizontalStack Background="{./Background}" Spacing="1">
-                                                               <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
+                                                               <Image Margin="1" Width="${IconSize}" Height="${IconSize}" Focusable="true" MouseDown="./onClickForExpand"
                                                                        Path="{./Image}"
                                                                        Visible="{./IsExpandable}"
                                                                        SvgSub="{./IsExpanded}"
                                                                        MouseEnter="{Background=LightGrey}"
                                                                        MouseLeave="{Background=Transparent}"/>
-                                                               <Image Margin="1" Width="16" Height="16"
+                                                               <Image Margin="1" Width="${IconSize}" Height="${IconSize}"
                                                                        Path="#Crow.Icons.folder.svg" SvgSub="{./IsExpanded}"/>
                                                                <Label Text="{./Caption}"/>
                                                        </HorizontalStack>
index a07563fc63454d9afee6cf3002fc35ea3a79e79a..addb54c761022835968621678e2503ec39e605c2 100644 (file)
@@ -14,7 +14,7 @@ namespace Crow
        /// does not expose child to allow reuse of container
        /// behaviour for widgets that have other xml hierarchy: example
        /// TemplatedControl may have 3 children (template,templateItem,content) but
-       /// behave exactely as a container for layouting and drawing
+       /// behave exactly as a container for layouting and drawing
        /// </summary>
        [DesignIgnore]
        public class PrivateContainer : Widget
@@ -54,7 +54,7 @@ namespace Crow
                                child.Dispose ();
                        }
 
-                       child = _child as Widget;
+                       child = _child;
 
                        if (child != null) {
                                child.Parent = this;
@@ -64,12 +64,12 @@ namespace Crow
                        }
                }
                //dispose child if not null
-               protected virtual void deleteChild () {
+               /*protected virtual void deleteChild () {
                        Widget g = child;
                        SetChild (null);
                        if (g != null)
                                g.Dispose ();
-               }
+               }*/
 
                #region Widget Overrides
 
index 3ed1f324c4d3b804bc1a09412c714db9d5d70e7d..e37031192bae8b665089cce8f19e9a2b9acbcbd0 100644 (file)
@@ -967,10 +967,6 @@ namespace Crow
 
                                isVisible = value;
 
-                               /*if (!isVisible)
-                                       unshownPostActions ();
-                               RegisterForLayouting (LayoutingType.Sizing);*/
-
                                if (isVisible){
                                        IsDirty = true;
                                } else {
index dcf8435282f41e3a04b32ffe56d0d4e06432965b..d5e60c55ce0739e985a567d0bb59dbb56b115df8 100644 (file)
@@ -6,7 +6,7 @@
                <Authors>Jean-Philippe Bruyère</Authors>
                <LangVersion>7.3</LangVersion>
 
-               <CrowVersion>1.2.0</CrowVersion>
+               <CrowVersion>1.3.0</CrowVersion>
                <CrowPackageVersion>$(CrowVersion)-beta</CrowPackageVersion>
 
                <!-- If you dont have a native libstb on your system, enable the managed version of stb here
@@ -23,6 +23,6 @@
                <!-- Used only by CrowIDE and CrowEdit-->
                <CrowDesignModeEnabled>false</CrowDesignModeEnabled>
 
-               <GlfwSharpVersion>0.2.14</GlfwSharpVersion>
+               <GlfwSharpVersion>0.2.15</GlfwSharpVersion>
        </PropertyGroup>
 </Project>
index 5966c1e829cfe6b2d3d67cdd73353b76cf5ec0cb..823ee37ef09be2557f98d2d15da0f942dd757817 100644 (file)
@@ -1,6 +1,6 @@
 <Project>
        <PropertyGroup>
-               <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+               <TargetFrameworks>net6</TargetFrameworks>
                <!--<TargetFrameworks>net5</TargetFrameworks>-->
                <OutputType>Exe</OutputType>
 
index 178d453704016a4ad1ea925b0c41464b45584ffb..6c6cdaf7f6bb1a847262a2fb3e898d38bec10293 100644 (file)
@@ -1,10 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project Sdk="Microsoft.NET.Sdk">
-
-       <PropertyGroup>
-               <TargetFramework>netcoreapp3.1</TargetFramework>
-               <OutputType>Exe</OutputType>
-       </PropertyGroup>
        <ItemGroup>
                <PackageReference Include="Crow" />
        </ItemGroup>
index fdf75a8df256655ad747aac0289ab33df8992eed..54429171fe29b79a36512d46c04140b8f7737485 100644 (file)
@@ -11,13 +11,9 @@ namespace HelloWorld
                        //Interface.PreferedBackendType = Drawing2D.BackendType.Egl;
                        using (Program app = new Program ()) {
                                //app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Label Text='Hello World' Background='Red' Top='50' Margin='0'/>");
-                               //app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Window Caption='hello world'/>");
+                               app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Container Width='Stretched' ><Window Caption='hello world' Background='Jet'/></Container>");
                                app.Run ();
                        }
                }
-               protected override void OnInitialized()
-               {
-                       Load ("/mnt/devel/crow/Samples/HelloWorld/ui/helloworld.crow");
-               }
        }
 }
index d282fadebfb36441b2a2463f359d59052003b3ac..b00da64761686130b1b037d99babad930f9bf105 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Window Caption="Showcase" Height="90%" Width="91%" Background="DarkGrey">
        <HorizontalStack>
-               <VerticalStack Width="30%" Margin="5">
+               <VerticalStack Width="30%" Margin="5" Spacing="10">
                        <ListBox Data="{PerfMeasures}" Height="Fit">
                                <Template>
-                                       <GroupBox Caption="Performance">
-                                               <VerticalStack Name="ItemsContainer" Width="90%" Spacing="2"/>
+                                       <GroupBox Caption="Performance" Margin="10">
+                                               <VerticalStack Name="ItemsContainer" Spacing="2" Margin="0"/>
                                        </GroupBox>
                                </Template>
                                <ItemTemplate>
@@ -19,7 +19,7 @@
                        </ListBox>
                        <Label Width="Stretched" Margin="3" Background="DimGrey" />
                        <TextBox Text="TextBox" Multiline="true" Margin="3" />
-                       <HorizontalStack Height="Fit" Margin="5" Background="DimGrey" CornerRadius="10">
+                       <HorizontalStack Height="Fit" Margin="15" Background="Jet" CornerRadius="10">
                                <VerticalStack Spacing="5" Width="50%">
                                        <CheckBox Fit="true" Caption="test" />
                                        <CheckBox Fit="true" />
@@ -38,7 +38,7 @@
                                <Label Text="MouseEvents" Width="50%" Margin="3" Background="Jet" Foreground="DimGrey" TextAlignment="Center" MouseClick="{Foreground=Green}" MouseDoubleClick="{Foreground=Yellow}" MouseEnter="{Foreground=White}" MouseLeave="{Foreground=DimGrey}" MouseDown="{Background=SeaGreen}" MouseUp="{Background=DimGrey}" />
                        </HorizontalStack>
                        <GroupBox Caption="Templated controls" Height="Fit" Margin="5">
-                               <HorizontalStack Height="Fit">
+                               <HorizontalStack Height="Fit" Margin="10">
                                        <VerticalStack Width="50%">
                                                <CheckBox Style="CheckBox2" IsChecked="true" />
                                                <CheckBox Style="CheckBox2" />
index 1db2be6bf0fd246f20591598a207f90fb15c8a74..62ed8f7a25b1fd8bdb03d4590cc5abcb1c7ce6a0 100644 (file)
@@ -10,9 +10,9 @@
                                <ListItem Margin="1" Width="Stretched" 
                                        Selected="{Background=RoyalBlue}"
                                        Unselected="{Background=Transparent}">
-                                       <HorizontalStack Height="Fit" >
-                                               <Widget Width="20" Height="14" Background="{}" CornerRadius="3"/>
-                                               <Label Text="{}" Width="Stretched" />
+                                       <HorizontalStack Height="Fit" Spacing="10" >
+                                               <Widget Width="60" Height="40" Background="{}" CornerRadius="3"/>
+                                               <Label Text="{}" Width="Stretched" Font="Mono, 20" />
                                        </HorizontalStack>
                                </ListItem>
                        </ItemTemplate>