From f98beedb7a53244564d2207f53f9c93514a2c2d7 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Fri, 30 Dec 2016 16:23:50 +0100 Subject: [PATCH] new binding debug and new inherited sizing method --- Crow.OpenTK.nuspec | 2 +- Crow.csproj | 19 +- Crow.sln | 2 +- Default.style | 17 ++ Properties/AssemblyInfo.cs | 73 +++--- Templates/ArrowButTemplate.crow | 3 +- Templates/Button.template | 6 +- Templates/CheckBox.template | 4 +- Templates/ColorPicker.template | 49 ++++ Templates/ComboBox.template | 18 +- Templates/DirectoryView.template | 28 ++- Templates/Expandable.template | 24 +- Templates/FileDialog.template | 98 ++++++-- Templates/GroupBox.template | 15 +- Templates/ListBox.template | 12 +- Templates/Menu.template | 3 +- Templates/MenuItem.template | 1 - Templates/MessageBox.template | 14 +- Templates/Popper.template | 6 +- Templates/RadioButton.template | 4 +- Templates/ScrollBar.template | 7 +- Templates/ScrollingListBox.goml | 18 +- Templates/Spinner.template | 7 +- Templates/TabItem.template | 8 +- Templates/TreeView.template | 10 +- Templates/Window.template | 11 +- Templates/treeList.crow | 2 +- Tests/BasicTests.cs | 86 +++++-- Tests/Interfaces/Container/0.crow | 2 +- Tests/Interfaces/Divers/0.crow | 45 ++-- Tests/Interfaces/Divers/colorPicker.crow | 7 + Tests/Interfaces/Divers/test2WayBinding.crow | 5 + Tests/Interfaces/GraphicObject/2.crow | 3 +- .../TemplatedContainer/testTreeView.crow | 17 +- .../TemplatedContainer/test_Listbox.crow | 24 +- .../TemplatedControl/testItemTemplateTag.crow | 20 +- ...{testScrollbar.goml => testScrollbar.crow} | 0 .../{testSpinner.goml => testSpinner.crow} | 0 Tests/Interfaces/TmpExpandable.goml | 8 +- Tests/Interfaces/Unsorted/testFileDialog.crow | 3 + Tests/Interfaces/Unsorted/testFileDialog.goml | 3 - Tests/Interfaces/treeList.crow | 3 +- Tests/Tests.csproj | 27 ++- Tests/test.style | 2 + Tests/ui/Popper.template | 2 +- Tests/ui/tmpWindow.crow | 10 +- crow.key | Bin 0 -> 596 bytes src/Colors.cs | 32 +++ src/CompilerServices/CompilerServices.cs | 53 ++++- src/Enums.cs | 2 +- src/GraphicObjects/ColorPicker.cs | 223 ++++++++++++++++++ src/GraphicObjects/ColorSelector.cs | 89 +++++++ .../DataSourceChangeEventArgs.cs | 4 + src/GraphicObjects/DirectoryView.cs | 8 +- src/GraphicObjects/Expandable.cs | 31 ++- src/GraphicObjects/FileDialog.cs | 175 +++++++------- src/GraphicObjects/GraphicObject.cs | 43 ++-- src/GraphicObjects/HueSelector.cs | 143 +++++++++++ src/GraphicObjects/Menu.cs | 2 +- src/GraphicObjects/MenuItem.cs | 6 +- src/GraphicObjects/Popper.cs | 4 +- src/GraphicObjects/SaturationValueSelector.cs | 129 ++++++++++ src/GraphicObjects/TemplatedGroup.cs | 69 ++++-- src/IML/Context.cs | 34 ++- src/IML/EventBinding.cs | 39 +++ src/Instantiator.cs | 13 +- src/Interface.cs | 3 +- src/ItemTemplate.cs | 43 +++- src/LayoutingQueueItem.cs | 2 + src/Measure.cs | 13 +- src/SolidColor.cs | 2 +- 71 files changed, 1409 insertions(+), 481 deletions(-) create mode 100755 Templates/ColorPicker.template create mode 100755 Tests/Interfaces/Divers/colorPicker.crow create mode 100755 Tests/Interfaces/Divers/test2WayBinding.crow rename Tests/Interfaces/TemplatedControl/{testScrollbar.goml => testScrollbar.crow} (100%) rename Tests/Interfaces/TemplatedControl/{testSpinner.goml => testSpinner.crow} (100%) create mode 100644 Tests/Interfaces/Unsorted/testFileDialog.crow delete mode 100644 Tests/Interfaces/Unsorted/testFileDialog.goml create mode 100644 crow.key create mode 100644 src/GraphicObjects/ColorPicker.cs create mode 100644 src/GraphicObjects/ColorSelector.cs create mode 100644 src/GraphicObjects/HueSelector.cs create mode 100644 src/GraphicObjects/SaturationValueSelector.cs create mode 100644 src/IML/EventBinding.cs diff --git a/Crow.OpenTK.nuspec b/Crow.OpenTK.nuspec index 1a6221f7..40b76980 100644 --- a/Crow.OpenTK.nuspec +++ b/Crow.OpenTK.nuspec @@ -2,7 +2,7 @@ Crow.OpenTK - 0.4.8 + 0.4.10 C# Rapid Open Widget Toolkit JP Bruyere Grand Tetras Software diff --git a/Crow.csproj b/Crow.csproj index fd5ed612..9d674374 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -14,17 +14,18 @@ False 4 False - false + true False OnBuildSuccess v4.5 C# Rapid Open Widget 4194304 - 0.4 + 0.5 8.0.30703 2.0 $(SolutionDir)build\$(Configuration) $(SolutionDir)build\obj\$(Configuration) + crow.key true @@ -34,9 +35,8 @@ false - True - None - __linux__;MEASURE_TIME + true + __linux__ @@ -149,6 +149,12 @@ + + + + + + @@ -281,6 +287,9 @@ Crow.Menu.template + + Crow.ColorPicker.template + diff --git a/Crow.sln b/Crow.sln index 725fe4ec..42a17a09 100644 --- a/Crow.sln +++ b/Crow.sln @@ -48,6 +48,6 @@ Global $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.4 + version = 0.5 EndGlobalSection EndGlobal diff --git a/Default.style b/Default.style index 933f89fe..553be982 100644 --- a/Default.style +++ b/Default.style @@ -55,6 +55,7 @@ TextBox { Foreground = Black; Selectable = True; Text = TextBox; + Margin = 1; } Window { Focusable = true; @@ -62,6 +63,12 @@ Window { Width = 150; Height = 150; } +FileDialog { + Focusable = true; + MinimumSize=50,50; + Width = 500; + Height = 300; +} Border { Foreground = Gray; } @@ -80,4 +87,14 @@ Icon { Control { Margin=0; Spacing=3; +} +ColorSpinner { + Minimum = 0; + Maximum = 255; + SmallIncrement = 1; +} +HSVSpinner { + Minimum = 0; + Maximum = 1; + SmallIncrement = 0.01; } \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 277667d7..96e0ccec 100755 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -1,36 +1,47 @@ -using System.Reflection; +// +// AssemblyInfo.cs +// +// Author: +// Jean-Philippe Bruyère +// +// Copyright (c) 2016 jp +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("golib")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("golib")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] +[assembly: AssemblyTitle ("Crow")] +[assembly: AssemblyDescription ("C# Rapid Open Widgets")] +[assembly: AssemblyConfiguration ("")] +[assembly: AssemblyCompany ("Grand Tetra Software")] +[assembly: AssemblyProduct ("Crow")] +[assembly: AssemblyCopyright ("Copyright (c) 2016 - Jean-Philippe Bruyère ")] +[assembly: AssemblyTrademark ("")] +[assembly: AssemblyCulture ("en-US")] -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("150376dc-e648-46a2-b692-6429d0a62362")] +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion ("0.5.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("crow.key")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.1")] -[assembly: AssemblyFileVersion("1.0.0.1")] diff --git a/Templates/ArrowButTemplate.crow b/Templates/ArrowButTemplate.crow index 817c00d1..aa17d2f4 100755 --- a/Templates/ArrowButTemplate.crow +++ b/Templates/ArrowButTemplate.crow @@ -1,10 +1,9 @@ - \ No newline at end of file + diff --git a/Templates/Button.template b/Templates/Button.template index 648c127b..b1926443 100755 --- a/Templates/Button.template +++ b/Templates/Button.template @@ -1,10 +1,10 @@ - \ No newline at end of file + diff --git a/Templates/CheckBox.template b/Templates/CheckBox.template index a3c0f23d..070f8e2e 100755 --- a/Templates/CheckBox.template +++ b/Templates/CheckBox.template @@ -1,6 +1,6 @@  - + - \ No newline at end of file diff --git a/Templates/ColorPicker.template b/Templates/ColorPicker.template new file mode 100755 index 00000000..4c1e1280 --- /dev/null +++ b/Templates/ColorPicker.template @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Templates/ComboBox.template b/Templates/ComboBox.template index d28a7b91..314613b2 100755 --- a/Templates/ComboBox.template +++ b/Templates/ComboBox.template @@ -1,12 +1,10 @@ - +