]> O.S.I.I.S - jp/crow.git/commitdiff
test binding
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 13 Dec 2020 13:50:43 +0000 (14:50 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Sun, 13 Dec 2020 13:50:43 +0000 (14:50 +0100)
Crow.sln
Crow/Crow.csproj
Crow/src/DebugUtils/DebugLogger.cs
Crow/src/IML/CompilerServices.cs
Crow/src/Widgets/Widget.cs
Samples/BindingTest/Program.cs
Samples/BindingTest/ui/test.crow

index 8f6e3f3d6bb980c94b9a40a780941f4766896b91..473cfabce8f49f941f839dbe5895674f22cebea4 100644 (file)
--- a/Crow.sln
+++ b/Crow.sln
@@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dragNdrop", "Samples\dragNd
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dockableWindows", "Samples\dockableWindows\dockableWindows.csproj", "{E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BindingTest", "Samples\BindingTest\BindingTest.csproj", "{242094B3-A1F1-44F8-B78D-D819B595DDBA}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
@@ -77,6 +79,10 @@ Global
                {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608}.Release|Any CPU.Build.0 = Release|Any CPU
+               {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {242094B3-A1F1-44F8-B78D-D819B595DDBA}.Release|Any CPU.Build.0 = Release|Any CPU
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -90,6 +96,7 @@ Global
                {7915538F-B2B1-414C-95A3-1FC58E3286B9} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
                {6E361E34-D266-4BEB-97F4-E209E01C6246} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
                {E19FD3DB-902A-4C99-8BF0-5ACAFFE35608} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
+               {242094B3-A1F1-44F8-B78D-D819B595DDBA} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}
        EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
                SolutionGuid = {00D4E149-7131-49F4-BAAD-559AA961A78E}
index c053f2ba23a9c811bcaa45f77d6382327075a2d5..faede56da87f85f03c5f1ed73459452ff372a486 100644 (file)
                <PackageTags>GUI Widget toolkit Interface C# Net</PackageTags>
                <PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
                <PackageProjectUrl>https://github.com/jpbruyere/Crow/wiki</PackageProjectUrl>
-               <PackageLicense>https://opensource.org/licenses/MIT</PackageLicense>
+               <PackageLicenseExpression>MIT</PackageLicenseExpression>
                <PackageIcon>crow.png</PackageIcon>
                <PackageCopyright>Copyright 2013-2020</PackageCopyright>
                <PackageReleaseNotes>
-                       This release is a major step to finaly get a 1.0 version of crow.
-                       A single glfw backend to handle os layers, and NetCore target for samples
-                       to overcome CAS exceptions on windows.
                </PackageReleaseNotes>
                <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
                <GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -32,7 +29,7 @@
        </PropertyGroup>
        <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
                <DebugType>full</DebugType>
-               <DefineConstants>$(DefineConstants);_DEBUG_LOG;DEBUG;TRACE;DEBUG_LAYOUTING;DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE</DefineConstants>
+               <DefineConstants>$(DefineConstants);_DEBUG_LOG;DEBUG;TRACE;_DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE</DefineConstants>
                <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
        </PropertyGroup>
        <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
index ecb9dbd16a8b6ab33bca1597ca93e05fa0416daf..65e49d5381b3b23997fb589df803e4f7ba772ed9 100644 (file)
@@ -19,6 +19,7 @@ namespace Crow
                IFace                                                   = 0x10000,
                Focus                                                   = 0x20000,
                Override                                                = 0x40000,
+               Binding                                                 = 0x80000,
                Widget                                                  = 0x00100,
                //GOLayouting                                   = 0x00200,
                //Drawing                                               = 0x00400,
index 9a1eced6b9e153ea90f85187e74b9113f65f58c2..c1d4edd7ce0bc334cea833faa5b3a41c499baa5e 100644 (file)
@@ -766,7 +766,7 @@ namespace Crow.IML
                                        if (d.Method.Name == delegateName) {
                                                eiEvt.RemoveEventHandler (instance, d);
 #if DEBUG_BINDING
-                                               Debug.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
+                                               Debug.WriteLine ("\tremoveEventHandlerByName: {0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
 #endif
                                        }
                                }
@@ -785,7 +785,7 @@ namespace Crow.IML
                                        if (d.Target == target) {
                                                eiEvt.RemoveEventHandler (instance, d);
 #if DEBUG_BINDING
-                                               Debug.WriteLine ("\t{0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
+                                               Debug.WriteLine ("\tremoveEventHandlerByTarget: {0} handler removed in {1} for: {2}", d.Method.Name,instance, eventName);
 #endif
                                        }
                                }
index ec21a6d642241be51edd62a3c4317e82060cac77..84e91c56a2a61d18448dd9d22f02c60b14173b7e 100644 (file)
@@ -182,12 +182,7 @@ namespace Crow
 
 #if DEBUG_LOG
                internal static List<Widget> GraphicObjects = new List<Widget>();
-               #endif
-
-               //internal bool isPopup = false;
-               //public Widget focusParent {
-               //      get { return (isPopup ? LogicalParent : parent) as Widget; }
-               //}
+#endif
 
                /// <summary>
                /// interface this widget is bound to, this should not be changed once the instance is created
@@ -541,11 +536,11 @@ namespace Crow
                [DesignCategory ("Divers")][DefaultValue(null)]
                public virtual string Name {
                        get {
-                               #if DEBUG_LOG
+#if DEBUG_LOG
                                return string.IsNullOrEmpty(name) ? this.GetType().Name + GraphicObjects.IndexOf(this).ToString () : name;
-                               #else
+#else
                                return name;
-                               #endif
+#endif
                        }
                        set {
                                if (name == value)
@@ -811,19 +806,6 @@ namespace Crow
                        }
                }
 
-               /// <summary>
-               /// forward mouse events even if an handle is bound
-               /// </summary>
-               //[DesignCategory ("Behaviour")][DefaultValue (false)]
-               //public bool ForwardMouseEvents {
-               //      get { return forwardMouseEvents; }
-               //      set {
-               //              if (forwardMouseEvents == value)
-               //                      return;
-               //              forwardMouseEvents = value;
-               //              NotifyValueChanged ("ForwardMouseEvents", forwardMouseEvents);
-               //      }
-               //}
                bool clearBackground = false;
                /// <summary>
                /// background fill of the control, maybe solid color, gradient, image, or svg
index cf19bf263aec6838a73b146ddaa723a1cfc81ee5..469e34735b6a355fb0f1464f556e8fb3e57cb5aa 100644 (file)
@@ -12,14 +12,16 @@ namespace BindingTest
 
                static void Main ()
                {
-                       using (Program app = new Program ()) 
+                       using (Program app = new Program ()) {
                                app.Run ();
+                               //DbgLogger.save (app);
+                       }                       
                }
 
                protected override void OnInitialized ()
                {
                        Load ("#ui.test.crow").DataSource = this;
-
+                       TcVCInstance = new TestClassVC ();
                }
 
 
index d56524a0807ac090f7b9ff50fb64d1fa42f54ad5..21aa5aa342926c7a2424ef713a97917d79549541 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
-<VerticalStack Margin="5">
-       <VerticalStack Margin="5" Background="Onyx" DataSource="{TcVCInstance}">
+<VerticalStack Margin="5" >
+       <VerticalStack RootDataLevel="true" Name="vsDS" Margin="5" Background="Onyx" DataSource="{TcVCInstance}" DataSourceType="SampleBase.TestClassVC">
                <Label Text="{}"/>
                <Label Text="{Prop1}"/>
                <Label Text="{Prop2}"/>