From: Jean-Philippe Bruyère Date: Thu, 6 Feb 2020 06:51:27 +0000 (+0100) Subject: update with msbuild X-Git-Tag: v0.9.5-beta~133 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=a58f28741bf91be4d0fc077a6088bd8864e12c1f;p=jp%2Fcrow.git update with msbuild --- diff --git a/Crow.sln b/Crow.sln index 0d0f0d23..18b3f358 100644 --- a/Crow.sln +++ b/Crow.sln @@ -1,6 +1,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "global", "global", "{7285454A-930F-4536-AB84-C076B44C0C80}" + ProjectSection(SolutionItems) = preProject + Directory.Build.props = Directory.Build.props + README.md = README.md + EndProjectSection +EndProject 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}" @@ -17,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "unitTests", "unitTests\unit EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BasicTests", "Samples\BasicTests\BasicTests.csproj", "{7AEB6DD5-916E-4415-84E1-78EC6E5881CE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testMSBuild", "Samples\testMSBuild\testMSBuild.csproj", "{B912DD88-F41B-428A-9784-E2CF265CE3DD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +47,7 @@ Global {91F1CE07-EECE-4F1D-A3EE-7239B563654A}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E5C7065-28F9-4A1A-A2FB-DB5E03A63CB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1E5C7065-28F9-4A1A-A2FB-DB5E03A63CB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1E5C7065-28F9-4A1A-A2FB-DB5E03A63CB3}.Debug|Any CPU.Build.0 = Debug|Any CPU {0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Release|Any CPU.ActiveCfg = Release|Any CPU {0CC6DFAB-2E4A-4786-976C-89053D5EA6A2}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -47,6 +56,10 @@ Global {7AEB6DD5-916E-4415-84E1-78EC6E5881CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {7AEB6DD5-916E-4415-84E1-78EC6E5881CE}.Release|Any CPU.ActiveCfg = Release|Any CPU {7AEB6DD5-916E-4415-84E1-78EC6E5881CE}.Release|Any CPU.Build.0 = Release|Any CPU + {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B912DD88-F41B-428A-9784-E2CF265CE3DD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 @@ -91,5 +104,6 @@ Global {56329D48-D382-4850-93DE-59C453894E8A} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} {91F1CE07-EECE-4F1D-A3EE-7239B563654A} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} {7AEB6DD5-916E-4415-84E1-78EC6E5881CE} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} + {B912DD88-F41B-428A-9784-E2CF265CE3DD} = {B2C7855A-2878-47FD-AD32-9A83DB4AB8C6} EndGlobalSection EndGlobal diff --git a/Crow/Crow.csproj b/Crow/Crow.csproj index 185412b0..27feb880 100644 --- a/Crow/Crow.csproj +++ b/Crow/Crow.csproj @@ -3,18 +3,18 @@ netstandard2.0 - 0.8.0 - $(ReleaseVersion) + $(CrowVersion) + $(CrowVersion) C# Rapid Open Widget Toolkit C.R.O.W. is a widget toolkit and rendering engine developed in C# with templates, styles, compositing, and bindings. MIT Jean-Philippe Bruyère - https://github.com/jpbruyere/Crow + $(CrowPackageVersion) GUI Widget toolkit Interface C# .Net Mono - $(AssemblyVersion)-beta + False https://github.com/jpbruyere/Crow/wiki https://opensource.org/licenses/MIT @@ -25,21 +25,18 @@ still untested. Next beta will have a glfw backend. - True + True - true + true $(NoWarn);1591;1587;1570;1572;1573;1574 - - DESIGN_MODE + DESIGN_MODE false false - - full - DEBUG;TRACE;_DEBUG_DISPOSE;_DEBUG_BINDING;DESIGN_MODE;_DEBUG_CLIP_RECTANGLE;_DEBUG_FOCUS;_DEBUG_DRAGNDROP;_DEBUG_LOG + DEBUG;TRACE;MEASURE_TIME;_DEBUG_DISPOSE;_DEBUG_BINDING;DESIGN_MODE;_DEBUG_CLIP_RECTANGLE;_DEBUG_FOCUS;_DEBUG_DRAGNDROP;_DEBUG_LOG true @@ -47,8 +44,8 @@ - - + + Crow.%(Filename).template @@ -56,4 +53,4 @@ - + \ No newline at end of file diff --git a/Crow/Icons/crowproj.svg b/Crow/Icons/crowproj.svg index b0f6b860..c45b36c6 100644 --- a/Crow/Icons/crowproj.svg +++ b/Crow/Icons/crowproj.svg @@ -1,8 +1,8 @@ - - + + - \ No newline at end of file + diff --git a/Crow/src/Interface.cs b/Crow/src/Interface.cs index d201a714..a71e4825 100644 --- a/Crow/src/Interface.cs +++ b/Crow/src/Interface.cs @@ -121,7 +121,11 @@ namespace Crow while (running) { Update (); - Thread.Sleep (5); + Thread.Sleep (UPDATE_INTERVAL); +#if MEASURE_TIME + foreach (PerformanceMeasure m in PerfMeasures) + m.NotifyChanges (); +#endif } } protected virtual void Startup () @@ -212,6 +216,8 @@ namespace Crow }*/ #region Static and constants + /// Time interval in milisecond between Updates of the interface + public static int UPDATE_INTERVAL = 5; /// Crow configuration root path public static string CROW_CONFIG_ROOT; /// If true, mouse focus is given when mouse is over control diff --git a/Crow/src/ObservableList.cs b/Crow/src/ObservableList.cs index 52ada9ac..0087ea5e 100644 --- a/Crow/src/ObservableList.cs +++ b/Crow/src/ObservableList.cs @@ -20,6 +20,7 @@ namespace Crow public event EventHandler ListAdd; public event EventHandler ListRemove; public event EventHandler ListEdit; + public event EventHandler ListClear; #endregion public ObservableList() : base () {} @@ -58,6 +59,11 @@ namespace Crow base.RemoveAt (idx); ListRemove.Raise (this, new ListChangedEventArg (idx, elem)); } + public new void Clear () + { + base.Clear (); + ListClear.Raise (this, null); + } public void Remove () { if (selectedIndex < 0) return; diff --git a/Crow/src/StyleReader.cs b/Crow/src/StyleReader.cs index 16a70b80..77b8967d 100644 --- a/Crow/src/StyleReader.cs +++ b/Crow/src/StyleReader.cs @@ -1,28 +1,6 @@ -// -// StyleReader.cs +// Copyright (c) 2013-2020 Jean-Philippe Bruyère // -// Author: -// Jean-Philippe Bruyère -// -// Copyright (c) 2013-2017 Jean-Philippe Bruyère -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) using System; using System.Collections.Generic; diff --git a/Crow/src/Widgets/DockWindow.cs b/Crow/src/Widgets/DockWindow.cs index 4be23adb..44df3078 100644 --- a/Crow/src/Widgets/DockWindow.cs +++ b/Crow/src/Widgets/DockWindow.cs @@ -1,28 +1,7 @@ -// -// DockingView.cs +// Copyright (c) 2013-2020 Jean-Philippe Bruyère // -// Author: -// Jean-Philippe Bruyère -// -// Copyright (c) 2013-2017 Jean-Philippe Bruyère -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) + using System; using System.Xml.Serialization; diff --git a/Crow/src/Widgets/Group.cs b/Crow/src/Widgets/Group.cs index 3e399734..6db541d6 100644 --- a/Crow/src/Widgets/Group.cs +++ b/Crow/src/Widgets/Group.cs @@ -228,19 +228,19 @@ namespace Crow if (lt == LayoutingType.Width) { if (largestChild == null) searchLargestChild (); - if (largestChild == null) { + /*if (largestChild == null) { //if still null, not possible to determine a width //because all children are stretched, force first one to fit Children [0].Width = Measure.Fit; return -1;//cancel actual sizing to let child computation take place - } + }*/ } else { if (tallestChild == null) searchTallestChild (); - if (tallestChild == null) { + /*if (tallestChild == null) { Children [0].Height = Measure.Fit; return -1; - } + }*/ } } return base.measureRawSize (lt); diff --git a/Crow/src/Widgets/ScrollingObject.cs b/Crow/src/Widgets/ScrollingObject.cs index 12804899..579abb1a 100644 --- a/Crow/src/Widgets/ScrollingObject.cs +++ b/Crow/src/Widgets/ScrollingObject.cs @@ -105,11 +105,11 @@ namespace Crow if (maxScrollX == value) return; - maxScrollX = value; + maxScrollX = Math.Max(0, value); if (scrollX > maxScrollX) ScrollX = maxScrollX; - + NotifyValueChanged ("MaxScrollX", maxScrollX); RegisterForGraphicUpdate (); } @@ -122,7 +122,7 @@ namespace Crow if (maxScrollY == value) return; - maxScrollY = value; + maxScrollY = Math.Max (0, value); if (scrollY > maxScrollY) ScrollY = maxScrollY; diff --git a/Directory.Build.props b/Directory.Build.props index 1f04e9b3..719386c5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -6,5 +6,8 @@ MIT Jean-Philippe Bruyère 7.2 + + 0.8.6 + $(CrowVersion)-beta diff --git a/Samples/BasicTests/BasicTests.cs b/Samples/BasicTests/BasicTests.cs index 1360b652..059bf852 100644 --- a/Samples/BasicTests/BasicTests.cs +++ b/Samples/BasicTests/BasicTests.cs @@ -29,8 +29,9 @@ namespace tests // += KeyboardKeyDown1; //testFiles = new string [] { @"Interfaces/Experimental/testDock.crow" }; - testFiles = new string [] { @"Interfaces/Divers/welcome.crow" }; - //testFiles = new string [] { @"Interfaces/Divers/testSlider.crow" }; + //testFiles = new string [] { @"Interfaces/Divers/welcome.crow" }; + testFiles = new string [] { @"Interfaces/Group/5.crow" }; + //testFiles = new string [] { @"Interfaces/Divers/perfMeasures.crow" }; //testFiles = new string [] { @"Interfaces/Divers/colorPicker.crow" }; testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray (); testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray (); diff --git a/Samples/BasicTests/BasicTests.csproj b/Samples/BasicTests/BasicTests.csproj index b231b253..e1208a42 100644 --- a/Samples/BasicTests/BasicTests.csproj +++ b/Samples/BasicTests/BasicTests.csproj @@ -25,5 +25,9 @@ PreserveNewest Interfaces\%(RecursiveDir)%(Filename)%(Extension) + + ui.%(Filename)%(Extension) + Templates\%(Filename)%(Extension) + \ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Group/5.crow b/Samples/common/ui/Interfaces/Group/5.crow new file mode 100644 index 00000000..b344bc6c --- /dev/null +++ b/Samples/common/ui/Interfaces/Group/5.crow @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/Samples/common/ui/templates/CheckBox2.imlt b/Samples/common/ui/templates/CheckBox2.imlt new file mode 100644 index 00000000..c2bfe8da --- /dev/null +++ b/Samples/common/ui/templates/CheckBox2.imlt @@ -0,0 +1,7 @@ +