]> O.S.I.I.S - jp/crow.git/commitdiff
system clipboard support, GroupBox clear color debug
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 3 Jun 2020 13:11:28 +0000 (15:11 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 3 Jun 2020 13:11:28 +0000 (15:11 +0200)
Crow.sln
Crow/Crow.csproj
Crow/src/Colors.cs
Crow/src/Fill/SolidColor.cs
Crow/src/Interface.cs
Samples/common/ui/Interfaces/Divers/all.crow

index 933c8e322a0b4b5aeb6365f63ff334a59bbc86ed..a0113386a88b27ad44468e8ae3f927686a12ac86 100644 (file)
--- a/Crow.sln
+++ b/Crow.sln
@@ -8,11 +8,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{728545
                README.md = README.md
        EndProjectSection
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crow", "Crow\Crow.csproj", "{C2980F9B-4798-4C05-99E2-E174810F7C7B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow", "Crow\Crow.csproj", "{C2980F9B-4798-4C05-99E2-E174810F7C7B}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}"
        ProjectSection(SolutionItems) = preProject
-               Samples\Directory.Build.props = Samples\Directory.Build.props           
+               Samples\Directory.Build.props = Samples\Directory.Build.props
        EndProjectSection
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloWorld", "Samples\HelloWorld\HelloWorld.csproj", "{F535A8AB-CD93-49AB-B1B0-FFF9AE51ED6A}"
index 4937324494e7cacce16287cce5d989e9fe6aa463..2cfa12fd2d4eaf8aae30ffb00ff2b649e28ecef5 100644 (file)
@@ -38,7 +38,7 @@
        <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
                <PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.6.0" />
                <PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.6.0" />
-               <PackageReference Include="glfw-sharp" Version="0.2.6-beta" />
+               <PackageReference Include="glfw-sharp" Version="0.2.7-beta" />
                <PackageReference Include="FastEnum" Version="1.5.3" />
        </ItemGroup>
        <PropertyGroup Condition=" '$(CrowStbSharp)' == 'true'">
index 8dd772d782b959671a5bbba5dc640aaf9fb7a06f..d6435bd1bb93d76b5d74d043d5208577f397f6e3 100644 (file)
@@ -234,6 +234,7 @@ namespace Crow
                }*/
 
                public static implicit operator Color (Colors c) => new Color ((UInt32)c);
+               public static implicit operator Colors (Color c) => (Colors)c.value;
                public static bool operator ==(Color a, Color b) => a.Equals (b);
                public static bool operator != (Color a, Color b) => !a.Equals (b);
 
index 0b16b09e5d69a0de2e691a6ae27b3af1b3a980c2..3fb1d452c38614653cf0f06798b0e43365e663da 100644 (file)
@@ -69,25 +69,8 @@ namespace Crow
                {
                        return color.GetHashCode();
                }
-               public override bool Equals (object obj)
-                       => obj is Color c ? color.Equals (c) : obj is SolidColor sc && color.Equals (sc.color);
-
-//             public static bool operator ==(SolidColor c, string n)
-//             {
-//                     return c.color.Name == n ? true : false;
-//             }
-//             public static bool operator !=(SolidColor c, string n)
-//             {
-//                     return c.color.Name == n ? false : true;
-//             }
-//             public static bool operator ==(string n, SolidColor c)
-//             {
-//                     return c.color.Name == n ? true : false;
-//             }
-//             public static bool operator !=(string n, SolidColor c)
-//             {
-//                     return c.color.Name == n ? false : true;
-//             }
+               public override bool Equals (object obj)                
+                       => obj is Color c ? color.Equals (c) : obj is Colors cl ? color.Equals(cl) : obj is SolidColor sc && color.Equals (sc.color);                   
                public static SolidColor operator *(SolidColor c, Double f)
                {
                        return new SolidColor(new Color(c.color.R,c.color.G,c.color.B,c.color.A * f));
@@ -100,7 +83,7 @@ namespace Crow
                {
                        return new SolidColor(new Color(c1.color.R - c2.color.R,c1.color.G - c2.color.G,c1.color.B - c2.color.B,c1.color.A - c2.color.A));
                }
-               #endregion                                      
+               #endregion
 
                public override string ToString()
                {
index e11d597b3142bc9f1db0b0eb02ed06d91f413f03..76858729c9d766d2f9943e9541df743be6470646 100644 (file)
@@ -393,7 +393,11 @@ namespace Crow
                public Queue<LayoutingQueueItem> DiscardQueue;
                /// <summary>Main drawing queue, holding layouted controls</summary>
                public Queue<Widget> ClippingQueue = new Queue<Widget>();
-               public string Clipboard;//TODO:use object instead for complex copy paste
+               //TODO:use object instead for complex copy paste
+               public string Clipboard {
+                       get => Glfw3.GetClipboardString (hWin);
+                       set => Glfw3.SetClipboardString (hWin, value);
+               }
                /// <summary>each IML and fragments (such as inline Templates) are compiled as a Dynamic Method stored here
                /// on the first instance creation of a IML item.
                /// </summary>
index bb390def11301431dc29e0a3e866be20bea683f0..e59d30d54a0209bb5a343a74fdc174acd02ad93e 100644 (file)
@@ -14,7 +14,7 @@
                        <ScrollBar Style="HScrollBar"/>
                </VerticalStack>
                <VerticalStack Width="200" Height="Fit" Spacing="0">
-                       <Slider Name="margin" Background="DarkSlateGrey" Foreground="Black"  />
+                       <Slider Name="margin" Background="DarkSlateGrey" Foreground="Black" Value="0"  />
                        <Label Background="DarkSlateGrey" Foreground="Black" Margin="{../margin.Value}" />
                        <TextBox Background="DarkSlateGrey" Foreground="Black" Margin="{../margin.Value}"/>
                        <Button Background="DarkSlateGrey" Foreground="Black" Margin="{../margin.Value}" />