From 3baf8a3454ceba436312b30d8697638cae01ab57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Sun, 4 Feb 2018 21:04:32 +0100 Subject: [PATCH] :book: tutorials and some small improvements (iml fragment loading helpers --- Crow.csproj | 1 - Crow.sln | 33 ++-- README.md | 2 +- Templates/ColorPicker.template | 36 ++--- Templates/Spinner.template | 4 +- Tests/CrowWindow.cs | 27 +++- Tests/GraphicObjects/ColorCircleSelector.cs | 149 ++++++++++++++++++ Tests/GraphicObjects/SimpleGauge.cs | 66 ++++++++ Tests/Showcase.cs | 1 + Tests/Tests.csproj | 28 +++- Tests/Tutorials/T1_HelloWorld.cs | 52 ++++++ Tests/Tutorials/T2_IML.cs | 52 ++++++ .../T3_OpenGLCube.cs} | 19 +-- Tests/Tutorials/T4_Gauge.cs | 56 +++++++ Tests/Tutorials/test.crow | 3 + src/BmpPicture.cs | 4 +- src/Fill/Fill.cs | 5 +- src/Gradient.cs | 3 +- src/GraphicObjects/Border.cs | 7 +- src/GraphicObjects/GraphicObject.cs | 12 +- src/GraphicObjects/HueSelector.cs | 8 +- src/GraphicObjects/NumericControl.cs | 2 +- src/GraphicObjects/SaturationValueSelector.cs | 2 +- src/GraphicObjects/TabItem.cs | 3 +- src/GraphicObjects/TemplatedControl.cs | 3 +- src/GraphicObjects/TestCairoPatch.cs | 148 +++++++++++++++++ src/GraphicObjects/Trend.cs | 3 +- src/Instantiator.cs | 12 +- src/Interface.cs | 25 ++- src/Mono.Cairo/Context.cs | 10 +- src/Mono.Cairo/Rectangle.cs | 132 ++++++++-------- src/Mono.Cairo/Surface.cs | 4 +- src/SolidColor.cs | 3 +- src/SvgPicture.cs | 4 +- src/rsvg/Handle.cs | 5 +- 35 files changed, 767 insertions(+), 157 deletions(-) create mode 100644 Tests/GraphicObjects/ColorCircleSelector.cs create mode 100644 Tests/GraphicObjects/SimpleGauge.cs create mode 100644 Tests/Tutorials/T1_HelloWorld.cs create mode 100644 Tests/Tutorials/T2_IML.cs rename Tests/{HelloCube.cs => Tutorials/T3_OpenGLCube.cs} (94%) create mode 100644 Tests/Tutorials/T4_Gauge.cs create mode 100755 Tests/Tutorials/test.crow create mode 100644 src/GraphicObjects/TestCairoPatch.cs diff --git a/Crow.csproj b/Crow.csproj index 3a8228ef..b58634db 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -15,7 +15,6 @@ 4 False true - False OnBuildSuccess v4.5 C# Rapid Open Widget diff --git a/Crow.sln b/Crow.sln index 83e55eb5..21c87081 100644 --- a/Crow.sln +++ b/Crow.sln @@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow", "Crow.csproj", "{C29 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{74289092-9F70-4941-AFCB-DFD7BE2140B6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Test", "Crow.Test\Crow.Test.csproj", "{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,34 +21,45 @@ Global {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.Build.0 = Release|Any CPU + {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.StandardHeader = $1 $1.Text = @\n${FileName}\n \nAuthor:\n ${AuthorName} <${AuthorEmail}>\n\nCopyright (c) 2013-2017 Jean-Philippe Bruyère\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE. - $1.IncludeInNewFiles = True $0.DotNetNamingPolicy = $2 - $2.DirectoryNamespaceAssociation = None - $2.ResourceNamePolicy = FileFormatDefault $0.TextStylePolicy = $3 - $3.FileWidth = 120 - $3.TabsToSpaces = False $3.EolMarker = Unix - $3.inheritsSet = VisualStudio - $3.inheritsScope = text/plain $3.scope = text/x-csharp $0.CSharpFormattingPolicy = $4 $4.AfterDelegateDeclarationParameterComma = True - $4.inheritsSet = Mono - $4.inheritsScope = text/x-csharp $4.scope = text/x-csharp + $4.IndentSwitchSection = False + $4.NewLinesForBracesInProperties = False + $4.NewLinesForBracesInAccessors = False + $4.NewLinesForBracesInAnonymousMethods = False + $4.NewLinesForBracesInControlBlocks = False + $4.NewLinesForBracesInAnonymousTypes = False + $4.NewLinesForBracesInObjectCollectionArrayInitializers = False + $4.NewLinesForBracesInLambdaExpressionBody = False + $4.NewLineForElse = False + $4.NewLineForCatch = False + $4.NewLineForFinally = False + $4.NewLineForMembersInObjectInit = False + $4.NewLineForMembersInAnonymousTypes = False + $4.NewLineForClausesInQuery = False + $4.SpacingAfterMethodDeclarationName = True + $4.SpaceAfterMethodCallName = True + $4.SpaceBeforeOpenSquareBracket = True $0.VersionControlPolicy = $5 $5.CommitMessageStyle = $6 $6.Indent = @\t $6.FileSeparator = ", " $6.LastFilePostfix = "@:\n " $6.Wrap = False - $5.inheritsSet = Mono description = @C.R.O.W. c# Rapid Open Widgets\n\nCrow is a pure c# widget toolkit with XML definition of interface, bindings, styling...\n version = 0.5 EndGlobalSection diff --git a/README.md b/README.md index 8d0bc2af..17ecb240 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Please report bugs and issues on [GitHub](https://github.com/jpbruyere/Crow/issu ## Getting Start ### Requirements -- [mono > 4.5](http://www.mono-project.com/download/) +- [mono > 5.0](http://www.mono-project.com/download/) - [Cairo Graphic Library](https://cairographics.org/) >= 1.10 - [rsvg library](https://developer.gnome.org/rsvg/) for svg rendering - [nuget](https://www.nuget.org/). diff --git a/Templates/ColorPicker.template b/Templates/ColorPicker.template index 81bb0bd1..d6bda346 100755 --- a/Templates/ColorPicker.template +++ b/Templates/ColorPicker.template @@ -8,38 +8,36 @@ Width="128" Height="128"/> - - - - + + + diff --git a/Templates/Spinner.template b/Templates/Spinner.template index 5d1dd693..4d3569bf 100755 --- a/Templates/Spinner.template +++ b/Templates/Spinner.template @@ -2,8 +2,8 @@ -