From ef49ffc63e4f99d0f716b70c600315d41137e506 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Wed, 7 Feb 2018 07:43:48 +0100 Subject: [PATCH] :book: , renames, move some controls to other project file --- .../AnalogMeter.cs | 2 +- Crow.ControlsLib/Crow.ControlsLib.csproj | 49 ++++++ Crow.ControlsLib/Default.style | 139 ++++++++++++++++++ .../DockingView.cs | 2 +- .../DocksView.cs | 0 .../Templates}/AnalogMeter0.goml | 0 .../Templates}/Checkbox2.goml | 0 .../Templates}/DockingView.template | 0 Crow.ControlsLib/Templates/ListBox.template | 7 + Crow.ControlsLib/Templates/Menu.template | 2 + Crow.ControlsLib/Templates/MenuItem.template | 23 +++ .../Templates/MessageBox.template | 31 ++++ Crow.ControlsLib/Templates/Popper.template | 8 + .../Templates/RadioButton.template | 6 + Crow.ControlsLib/Templates/ScrollBar.template | 21 +++ .../Templates}/ScrollingListBox.goml | 0 Crow.ControlsLib/Templates/Slider.template | 1 + .../Templates}/Spinner (copier).goml | 0 Crow.ControlsLib/Templates/Spinner.template | 18 +++ Crow.ControlsLib/Templates/TabItem.template | 20 +++ .../Templates/ToolWindow.template | 24 +++ Crow.ControlsLib/Templates/TreeView.template | 14 ++ Crow.ControlsLib/Templates/Window.template | 39 +++++ .../Templates}/imgItemTemplate.goml | 0 .../Templates}/tmpDirItem.goml | 0 .../Templates}/treeList.crow | 0 Crow.OpenTK.nuspec | 28 ++-- Crow.csproj | 22 +-- Crow.sln | 42 +++--- README.md | 13 +- ...rrowButTemplate.crow => ArrowBut.template} | 0 Templates/ComboBox.template | 2 +- Templates/DirectoryView.template | 2 +- Templates/Dummy.goml | 8 - Templates/FileDialog2.template | 120 --------------- Templates/MessageBox.template | 8 +- Templates/ScrollBar.template | 4 +- Templates/ScrollingListBox.template | 13 ++ Templates/Spinner.template | 4 +- Templates/imgItem.template | 8 + Templates/treeList.template | 3 + Tests/GraphicObjects/HexaContainer.cs | 89 +++++++++++ Tests/Interfaces/Divers/0.crow | 2 +- Tests/Tests.csproj | 15 +- Tests/packages.config | 4 + src/GraphicObjects/Border.cs | 2 +- src/GraphicObjects/Button.cs | 2 +- src/GraphicObjects/CheckBox.cs | 2 +- src/GraphicObjects/ColorPicker.cs | 2 +- src/GraphicObjects/ColorSelector.cs | 2 +- src/GraphicObjects/ComboBox.cs | 2 +- src/GraphicObjects/Container.cs | 2 +- src/GraphicObjects/DirectoryView.cs | 2 +- src/GraphicObjects/Expandable.cs | 2 +- src/GraphicObjects/FileDialog.cs | 2 +- src/GraphicObjects/GenericStack.cs | 2 +- src/GraphicObjects/GraduatedSlider.cs | 2 +- src/GraphicObjects/Grid.cs | 40 +++-- src/GraphicObjects/Group.cs | 4 +- src/GraphicObjects/GroupBox.cs | 2 +- src/GraphicObjects/HorizontalStack.cs | 2 +- src/GraphicObjects/HueSelector.cs | 2 +- src/GraphicObjects/Image.cs | 35 ++++- src/GraphicObjects/Label.cs | 2 +- src/GraphicObjects/ListBox.cs | 2 +- src/GraphicObjects/Menu.cs | 2 +- src/GraphicObjects/MenuItem.cs | 2 +- src/GraphicObjects/MessageBox.cs | 2 +- src/GraphicObjects/NumericControl.cs | 2 +- src/GraphicObjects/Popper.cs | 2 +- src/GraphicObjects/PrivateContainer.cs | 2 +- src/GraphicObjects/ProgressBar.cs | 2 +- src/GraphicObjects/RadioButton.cs | 2 +- src/GraphicObjects/ScrollBar.cs | 2 +- src/GraphicObjects/Scroller.cs | 2 +- src/GraphicObjects/ScrollingObject.cs | 2 +- src/GraphicObjects/ScrollingTextBox.cs | 6 +- src/GraphicObjects/Slider.cs | 2 +- src/GraphicObjects/Spinner.cs | 2 +- src/GraphicObjects/Splitter.cs | 2 +- src/GraphicObjects/TabItem.cs | 2 +- src/GraphicObjects/TabView.cs | 2 +- src/GraphicObjects/TemplatedContainer.cs | 2 +- src/GraphicObjects/TemplatedControl.cs | 2 +- src/GraphicObjects/TemplatedGroup.cs | 2 +- src/GraphicObjects/TextBox.cs | 2 +- src/GraphicObjects/TextRun.cs | 2 +- src/GraphicObjects/TreeView.cs | 2 +- src/GraphicObjects/Trend.cs | 5 +- src/GraphicObjects/VerticalStack.cs | 4 +- src/GraphicObjects/Window.cs | 2 +- src/GraphicObjects/Wrapper.cs | 2 +- src/Interface.cs | 5 +- 93 files changed, 693 insertions(+), 281 deletions(-) rename {src/GraphicObjects => Crow.ControlsLib}/AnalogMeter.cs (98%) create mode 100644 Crow.ControlsLib/Crow.ControlsLib.csproj create mode 100644 Crow.ControlsLib/Default.style rename {src/GraphicObjects => Crow.ControlsLib}/DockingView.cs (99%) rename {src/GraphicObjects => Crow.ControlsLib}/DocksView.cs (100%) rename {Templates => Crow.ControlsLib/Templates}/AnalogMeter0.goml (100%) rename {Templates => Crow.ControlsLib/Templates}/Checkbox2.goml (100%) rename {Templates => Crow.ControlsLib/Templates}/DockingView.template (100%) create mode 100755 Crow.ControlsLib/Templates/ListBox.template create mode 100644 Crow.ControlsLib/Templates/Menu.template create mode 100644 Crow.ControlsLib/Templates/MenuItem.template create mode 100644 Crow.ControlsLib/Templates/MessageBox.template create mode 100755 Crow.ControlsLib/Templates/Popper.template create mode 100755 Crow.ControlsLib/Templates/RadioButton.template create mode 100755 Crow.ControlsLib/Templates/ScrollBar.template rename {Templates => Crow.ControlsLib/Templates}/ScrollingListBox.goml (100%) create mode 100755 Crow.ControlsLib/Templates/Slider.template rename {Templates => Crow.ControlsLib/Templates}/Spinner (copier).goml (100%) create mode 100755 Crow.ControlsLib/Templates/Spinner.template create mode 100644 Crow.ControlsLib/Templates/TabItem.template create mode 100755 Crow.ControlsLib/Templates/ToolWindow.template create mode 100644 Crow.ControlsLib/Templates/TreeView.template create mode 100755 Crow.ControlsLib/Templates/Window.template rename {Templates => Crow.ControlsLib/Templates}/imgItemTemplate.goml (100%) rename {Templates => Crow.ControlsLib/Templates}/tmpDirItem.goml (100%) rename {Templates => Crow.ControlsLib/Templates}/treeList.crow (100%) rename Templates/{ArrowButTemplate.crow => ArrowBut.template} (100%) delete mode 100755 Templates/Dummy.goml delete mode 100644 Templates/FileDialog2.template create mode 100644 Templates/ScrollingListBox.template create mode 100755 Templates/imgItem.template create mode 100755 Templates/treeList.template create mode 100644 Tests/GraphicObjects/HexaContainer.cs create mode 100644 Tests/packages.config diff --git a/src/GraphicObjects/AnalogMeter.cs b/Crow.ControlsLib/AnalogMeter.cs similarity index 98% rename from src/GraphicObjects/AnalogMeter.cs rename to Crow.ControlsLib/AnalogMeter.cs index fba58d9d..ff23bd6b 100644 --- a/src/GraphicObjects/AnalogMeter.cs +++ b/Crow.ControlsLib/AnalogMeter.cs @@ -34,7 +34,7 @@ namespace Crow public class AnalogMeter : NumericControl { #region CTOR - public AnalogMeter () : base(){} + protected AnalogMeter () : base(){} public AnalogMeter (Interface iface) : base(iface){} #endregion diff --git a/Crow.ControlsLib/Crow.ControlsLib.csproj b/Crow.ControlsLib/Crow.ControlsLib.csproj new file mode 100644 index 00000000..6309f88e --- /dev/null +++ b/Crow.ControlsLib/Crow.ControlsLib.csproj @@ -0,0 +1,49 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {6E48BD3D-7B33-4368-AA8A-D878427DAC83} + Exe + Crow.ControlsLib + Crow.ControlsLib + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + Crow.DockingView.template + + + + + + + + + + + \ No newline at end of file diff --git a/Crow.ControlsLib/Default.style b/Crow.ControlsLib/Default.style new file mode 100644 index 00000000..07689b50 --- /dev/null +++ b/Crow.ControlsLib/Default.style @@ -0,0 +1,139 @@ +Button, CheckBox, RadioButton, ComboBox, Expandable, +MessageBox, Popper, Slider, Spinner, TextBox { + Focusable = true; + Height = Fit; +} +Border { + Foreground = Gray; +} +CheckBox { Caption = CheckBox; } +RadioButton { Caption = RadioButton; } +Expandable { Caption = Expandable; } +Popper { Caption = Popper; } +GroupBox { Caption = Group Box; } +Wrapper { + Orientation = Vertical; +} +Button { + Caption = Button; + Width = Fit; +} +Label { + Height = Fit; + Width = Fit; + Margin = 0; +} +Menu { + Margin = 1; + Background = vgradient|0:DimGray|1:Onyx; + Height = Fit; + Width = Stretched; + VerticalAlignment = Top; +} +MenuItem { + Caption = MenuItem; + Width = Stretched; + Height = Fit; + Background = Transparent; + Foreground = LightGray; + MouseEnter = {Background = vgradient|0:UnitedNationsBlue|1:Onyx;Foreground=White;} + MouseLeave = {Foreground=LightGray;Background=Transparent;} +} +MessageBox { + Background = 0.3,0.3,0.3,0.3; + Width = Fit; + Title=MessageBox; + Font = serif, 12; + MinimumSize = 200,120; +} +Slider { + Background = vgradient|0:Black|0.1:Gray|0.9:Gray|1:LightGray; + Foreground = Gray; + Width = Fit; +} +Splitter { + Focusable = true; + Background = DimGray; +} +Spinner { + Foreground = DimGray; +} +TabView { + CacheEnabled = false; +} +TabItem { + Caption = TabItem; + Focusable = true; + CacheEnabled = false; +} +TextBox { + Background = White; + Foreground = Black; + Selectable = True; + Text = TextBox; + Margin = 1; +} +Window { + Caption = Window; + Focusable = true; + MinimumSize=5,5; + Width = 150; + Height = 150; +} +ToolWindow { + Caption = Window; + Template = #Crow.ToolWindow.template; + Focusable = true; + MinimumSize=50,50; + Width = 150; + Height = 150; +} +DocksView { + AllowDrop = true; +} +DockingView { + Focusable = true; + AllowDrag = true; +} +FileDialog { + Template = #Crow.FileDialog.template; + Focusable = true; + MinimumSize=50,50; + Width = 500; + Height = 300; +} +ProgressBar { + Foreground = vgradient|0:BlueCrayola|0.5:SkyBlue|1:BlueCrayola; +} +ScrollBar { + Maximum = 0; + Value = 0; +} +Scroller { + CacheEnabled = false; +} +Icon { + Margin=1; + Width=12; + Height=12; +} +Control { + Margin=0; + Spacing=3; +} +SaturationValueSelector { + Foreground=Red; +} +HueSelector { + ClipToClientRect=False; +} +ColorSpinner { + Minimum = 0; + Maximum = 255; + SmallIncrement = 1; +} +HSVSpinner { + Minimum = 0; + Maximum = 1; + SmallIncrement = 0.01; +} \ No newline at end of file diff --git a/src/GraphicObjects/DockingView.cs b/Crow.ControlsLib/DockingView.cs similarity index 99% rename from src/GraphicObjects/DockingView.cs rename to Crow.ControlsLib/DockingView.cs index db11c08d..8d76d457 100644 --- a/src/GraphicObjects/DockingView.cs +++ b/Crow.ControlsLib/DockingView.cs @@ -30,7 +30,7 @@ namespace Crow public class DockingView : Window { #region CTOR - public DockingView () : base () + protected DockingView() : base () { } #endregion diff --git a/src/GraphicObjects/DocksView.cs b/Crow.ControlsLib/DocksView.cs similarity index 100% rename from src/GraphicObjects/DocksView.cs rename to Crow.ControlsLib/DocksView.cs diff --git a/Templates/AnalogMeter0.goml b/Crow.ControlsLib/Templates/AnalogMeter0.goml similarity index 100% rename from Templates/AnalogMeter0.goml rename to Crow.ControlsLib/Templates/AnalogMeter0.goml diff --git a/Templates/Checkbox2.goml b/Crow.ControlsLib/Templates/Checkbox2.goml similarity index 100% rename from Templates/Checkbox2.goml rename to Crow.ControlsLib/Templates/Checkbox2.goml diff --git a/Templates/DockingView.template b/Crow.ControlsLib/Templates/DockingView.template similarity index 100% rename from Templates/DockingView.template rename to Crow.ControlsLib/Templates/DockingView.template diff --git a/Crow.ControlsLib/Templates/ListBox.template b/Crow.ControlsLib/Templates/ListBox.template new file mode 100755 index 00000000..f6d6214d --- /dev/null +++ b/Crow.ControlsLib/Templates/ListBox.template @@ -0,0 +1,7 @@ + + + + + + diff --git a/Crow.ControlsLib/Templates/Menu.template b/Crow.ControlsLib/Templates/Menu.template new file mode 100644 index 00000000..c560043c --- /dev/null +++ b/Crow.ControlsLib/Templates/Menu.template @@ -0,0 +1,2 @@ + + diff --git a/Crow.ControlsLib/Templates/MenuItem.template b/Crow.ControlsLib/Templates/MenuItem.template new file mode 100644 index 00000000..0f93b20c --- /dev/null +++ b/Crow.ControlsLib/Templates/MenuItem.template @@ -0,0 +1,23 @@ + + + + + + + diff --git a/Crow.ControlsLib/Templates/MessageBox.template b/Crow.ControlsLib/Templates/MessageBox.template new file mode 100644 index 00000000..c33eb869 --- /dev/null +++ b/Crow.ControlsLib/Templates/MessageBox.template @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Templates/ScrollingListBox.goml b/Crow.ControlsLib/Templates/ScrollingListBox.goml similarity index 100% rename from Templates/ScrollingListBox.goml rename to Crow.ControlsLib/Templates/ScrollingListBox.goml diff --git a/Crow.ControlsLib/Templates/Slider.template b/Crow.ControlsLib/Templates/Slider.template new file mode 100755 index 00000000..9c7bb705 --- /dev/null +++ b/Crow.ControlsLib/Templates/Slider.template @@ -0,0 +1 @@ + diff --git a/Templates/Spinner (copier).goml b/Crow.ControlsLib/Templates/Spinner (copier).goml similarity index 100% rename from Templates/Spinner (copier).goml rename to Crow.ControlsLib/Templates/Spinner (copier).goml diff --git a/Crow.ControlsLib/Templates/Spinner.template b/Crow.ControlsLib/Templates/Spinner.template new file mode 100755 index 00000000..4d3569bf --- /dev/null +++ b/Crow.ControlsLib/Templates/Spinner.template @@ -0,0 +1,18 @@ + + + + + + + + + + diff --git a/Crow.ControlsLib/Templates/TabItem.template b/Crow.ControlsLib/Templates/TabItem.template new file mode 100644 index 00000000..f82b79c9 --- /dev/null +++ b/Crow.ControlsLib/Templates/TabItem.template @@ -0,0 +1,20 @@ + + + + + + + diff --git a/Crow.ControlsLib/Templates/ToolWindow.template b/Crow.ControlsLib/Templates/ToolWindow.template new file mode 100755 index 00000000..f021f6ee --- /dev/null +++ b/Crow.ControlsLib/Templates/ToolWindow.template @@ -0,0 +1,24 @@ + + + + + + + + + + + + diff --git a/Crow.ControlsLib/Templates/TreeView.template b/Crow.ControlsLib/Templates/TreeView.template new file mode 100644 index 00000000..c29e34c5 --- /dev/null +++ b/Crow.ControlsLib/Templates/TreeView.template @@ -0,0 +1,14 @@ + + + + + + + diff --git a/Crow.ControlsLib/Templates/Window.template b/Crow.ControlsLib/Templates/Window.template new file mode 100755 index 00000000..20b23147 --- /dev/null +++ b/Crow.ControlsLib/Templates/Window.template @@ -0,0 +1,39 @@ + + + + + + + + + + + + diff --git a/Templates/imgItemTemplate.goml b/Crow.ControlsLib/Templates/imgItemTemplate.goml similarity index 100% rename from Templates/imgItemTemplate.goml rename to Crow.ControlsLib/Templates/imgItemTemplate.goml diff --git a/Templates/tmpDirItem.goml b/Crow.ControlsLib/Templates/tmpDirItem.goml similarity index 100% rename from Templates/tmpDirItem.goml rename to Crow.ControlsLib/Templates/tmpDirItem.goml diff --git a/Templates/treeList.crow b/Crow.ControlsLib/Templates/treeList.crow similarity index 100% rename from Templates/treeList.crow rename to Crow.ControlsLib/Templates/treeList.crow diff --git a/Crow.OpenTK.nuspec b/Crow.OpenTK.nuspec index 8d835913..e336b178 100644 --- a/Crow.OpenTK.nuspec +++ b/Crow.OpenTK.nuspec @@ -2,40 +2,32 @@ Crow.OpenTK - 0.5.6 + 0.6.0-pre1 C# Rapid Open Widget Toolkit JP Bruyere Grand Tetras Software https://opensource.org/licenses/MIT - https://jpbruyere.github.io/Crow/ + https://github.com/jpbruyere/Crow/wiki https://jpbruyere.github.io/Crow/images/crow.png false -CROW is a pure C# widget toolkit with templates, styles, compositing, and bindings. +C.R.O.W. is a widget toolkit and rendering engine entirely developed in C# with templates, styles, compositing, and bindings. Crow.OpenTK is the OpenTK ready version. -CROW is a pure C# widget toolkit with templates, styles, compositing, and bindings. -Crow.OpenTK is the OpenTK ready version. - -Native libraries dependencies: - - cairo - - librsvg (and its dependencies (glib2, libxml, fontconfig, etc) - -Precompiled binaries of those libs are available at http://ftp.gnome.org/pub/GNOME/binaries/ -For more information, please visit https://jpbruyere.github.io/Crow/. - - Bug fix (#35) of 0.5.4 - - embed Cairo bindings in Crow. - - use of CairoRegion to handle clipping - - IDisposable for GraphicObject - - Border style Raised/Sunken + - Bug fix #36 + - group item templates in single file + - instantiation from code clarification + - Only run on mono >= 5.0 + - Cairo mesh patterns support. + - Image resources sharing among controls. Copyright 2013-2017 - + Crow OpenTK OpenGL Widget Interface GUI C# .Net Mono diff --git a/Crow.csproj b/Crow.csproj index 38f19b9e..13cab16d 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -63,7 +63,6 @@ - @@ -211,8 +210,6 @@ - - @@ -251,12 +248,9 @@ - - - @@ -264,9 +258,6 @@ Crow.Images.Icons.Informations.svg - - - @@ -278,9 +269,7 @@ - - @@ -338,7 +327,6 @@ Crow.Window.template - Crow.MenuItem.template @@ -360,19 +348,17 @@ - - Crow.FileDialog2.template - - - Crow.DockingView.template - Crow.DefaultItem.template + + + + diff --git a/Crow.sln b/Crow.sln index 21c87081..9874dbe3 100644 --- a/Crow.sln +++ b/Crow.sln @@ -7,12 +7,22 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Test", "Crow.Test\Crow.Test.csproj", "{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.ControlsLib", "Crow.ControlsLib\Crow.ControlsLib.csproj", "{6E48BD3D-7B33-4368-AA8A-D878427DAC83}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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 + {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E48BD3D-7B33-4368-AA8A-D878427DAC83}.Release|Any CPU.Build.0 = Release|Any CPU {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.Build.0 = Debug|Any CPU {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -21,45 +31,35 @@ 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.LineAlign = 0 $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 5339b80d..8018981e 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ C# Rapid Open Widgets

+ + + @@ -24,13 +27,7 @@ ## Presentation -**C.R.O.W.** is a [widget toolkit](https://en.wikipedia.org/wiki/Widget_toolkit) and -rendering engine entirely developed in **C#**, offering a nice trade-off between -complexity of language and performances. Crow provides a declarative interface language -with styling and templates -called [IML](interface-markup-language) for **Interface Markup Language** similar to -[XAML](https://en.wikipedia.org/wiki/Extensible_Application_Markup_Language) and a binding system -for easy c# code linking. +**C.R.O.W.** is a [widget toolkit](https://en.wikipedia.org/wiki/Widget_toolkit) and rendering engine entirely developed in **C#**, offering a nice trade-off between complexity of language and performances. Crow provides a declarative interface language with styling and templates called [IML](interface-markup-language) for **Interface Markup Language** similar to [XAML](https://en.wikipedia.org/wiki/Extensible_Application_Markup_Language) and a binding system for easy c# code linking.

@@ -45,7 +42,7 @@ for easy c# code linking. - SVG rendering (with [rsvg library](https://developer.gnome.org/rsvg/)) #### Documentation -* [Introduction](https://github.com/jpbruyere/Crow/wiki/Global-architecture) +* [Introduction](https://github.com/jpbruyere/Crow/wiki) * [Classes documentation autogenerated from doxygen](https://github.com/jpbruyere/Crow/wiki/index) * [Tutorials](https://github.com/jpbruyere/Crow/wiki/Tutorials) diff --git a/Templates/ArrowButTemplate.crow b/Templates/ArrowBut.template similarity index 100% rename from Templates/ArrowButTemplate.crow rename to Templates/ArrowBut.template diff --git a/Templates/ComboBox.template b/Templates/ComboBox.template index 314613b2..4a209023 100755 --- a/Templates/ComboBox.template +++ b/Templates/ComboBox.template @@ -6,7 +6,7 @@ diff --git a/Templates/DirectoryView.template b/Templates/DirectoryView.template index 148a7570..42e9020f 100755 --- a/Templates/DirectoryView.template +++ b/Templates/DirectoryView.template @@ -38,7 +38,7 @@ + Template="#Crow.Templates.treeList.template" /> diff --git a/Templates/Dummy.goml b/Templates/Dummy.goml deleted file mode 100755 index cfd82865..00000000 --- a/Templates/Dummy.goml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/Templates/FileDialog2.template b/Templates/FileDialog2.template deleted file mode 100644 index 389e11f3..00000000 --- a/Templates/FileDialog2.template +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - diff --git a/Templates/ScrollingListBox.template b/Templates/ScrollingListBox.template new file mode 100644 index 00000000..f294aea6 --- /dev/null +++ b/Templates/ScrollingListBox.template @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/Templates/Spinner.template b/Templates/Spinner.template index 4d3569bf..de1a4d82 100755 --- a/Templates/Spinner.template +++ b/Templates/Spinner.template @@ -7,11 +7,11 @@ diff --git a/Templates/imgItem.template b/Templates/imgItem.template new file mode 100755 index 00000000..c08f390e --- /dev/null +++ b/Templates/imgItem.template @@ -0,0 +1,8 @@ + + + + + diff --git a/Templates/treeList.template b/Templates/treeList.template new file mode 100755 index 00000000..d47621af --- /dev/null +++ b/Templates/treeList.template @@ -0,0 +1,3 @@ + + diff --git a/Tests/GraphicObjects/HexaContainer.cs b/Tests/GraphicObjects/HexaContainer.cs new file mode 100644 index 00000000..23964e9c --- /dev/null +++ b/Tests/GraphicObjects/HexaContainer.cs @@ -0,0 +1,89 @@ +// +// SimpleGauge.cs +// +// Author: +// jp <> +// +// 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. +using System; +using Crow; +using Cairo; + +namespace Tutorials2 +{ + ///

+ /// Hexa container. + /// + /// + /// + public class HexaContainer : Container + { + const double pi3 = Math.PI / 3.0; + + public HexaContainer () : base() {} + public HexaContainer (Interface iface): base (iface){} + + protected override void onDraw (Context gr) + { + gr.Save (); + + if (ClipToClientRect) { + //clip to client zone + CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius); + gr.Clip (); + } + + Rectangle r = ClientRectangle; + double radius = 0, + cx = r.Width / 2.0 + r.X, + cy = r.Height / 2.0 + r.Y; + + if (r.Width > r.Height) + radius = r.Height / 2.0; + else + radius = r.Width / 2.0; + + double dx = Math.Sin (pi3) * radius; + double dy = Math.Cos (pi3) * radius; + + gr.MoveTo (cx - radius, cy); + gr.LineTo (cx - dy, cy - dx); + gr.LineTo (cx + dy, cy - dx); + gr.LineTo (cx + radius, cy); + gr.LineTo (cx + dy, cy + dx); + gr.LineTo (cx - dy, cy + dx); + gr.ClosePath (); + + gr.LineWidth = 1; + Background.SetAsSource (gr); + gr.FillPreserve (); + Foreground.SetAsSource (gr); + gr.Stroke (); + + if (child != null) { + if (child.Visible) + child.Paint (ref gr); + } + gr.Restore (); + } + } +} + diff --git a/Tests/Interfaces/Divers/0.crow b/Tests/Interfaces/Divers/0.crow index 15ab65f4..330e3bd8 100755 --- a/Tests/Interfaces/Divers/0.crow +++ b/Tests/Interfaces/Divers/0.crow @@ -151,7 +151,7 @@ -->
diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index f1ee0708..ef4500a1 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -28,12 +28,16 @@ 4 false DEBUG;TRACE;MEASURE_TIME + $(SolutionDir)build\obj\$(Configuration) + $(SolutionDir)build\$(Configuration) none true 0 false + $(SolutionDir)build\obj\$(Configuration) + $(SolutionDir)build\$(Configuration) Program @@ -47,13 +51,19 @@ %24{SolutionDir}\build\%24{ProjectConfigName} false + + Program + %24{TargetName} + %24{SolutionDir}\build\%24{ProjectConfigName} + false + - $(SolutionDir)libs\OpenTK.dll + ..\packages\OpenTK.3.0.0-git00041\lib\net20\OpenTK.dll @@ -74,6 +84,7 @@ + @@ -328,6 +339,8 @@ PreserveNewest + + diff --git a/Tests/packages.config b/Tests/packages.config new file mode 100644 index 00000000..f4e36ffe --- /dev/null +++ b/Tests/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/GraphicObjects/Border.cs b/src/GraphicObjects/Border.cs index 569315cc..f2be5993 100644 --- a/src/GraphicObjects/Border.cs +++ b/src/GraphicObjects/Border.cs @@ -47,7 +47,7 @@ namespace Crow public class Border : Container { #region CTOR - public Border () : base(){} + protected Border () : base(){} public Border (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/Button.cs b/src/GraphicObjects/Button.cs index d4b95457..8b60dcb9 100644 --- a/src/GraphicObjects/Button.cs +++ b/src/GraphicObjects/Button.cs @@ -44,7 +44,7 @@ namespace Crow public class Button : TemplatedContainer { #region CTOR - public Button() : base() {} + protected Button() : base() {} public Button (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/CheckBox.cs b/src/GraphicObjects/CheckBox.cs index 8ff06a30..3a6b2b6a 100644 --- a/src/GraphicObjects/CheckBox.cs +++ b/src/GraphicObjects/CheckBox.cs @@ -36,7 +36,7 @@ namespace Crow public class CheckBox : TemplatedControl { #region CTOR - public CheckBox () : base(){} + protected CheckBox() : base(){} public CheckBox (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/ColorPicker.cs b/src/GraphicObjects/ColorPicker.cs index b6165c05..3a5ec23f 100644 --- a/src/GraphicObjects/ColorPicker.cs +++ b/src/GraphicObjects/ColorPicker.cs @@ -36,7 +36,7 @@ namespace Crow public class ColorPicker : TemplatedControl { #region CTOR - public ColorPicker () : base(){} + protected ColorPicker() : base(){} public ColorPicker (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/ColorSelector.cs b/src/GraphicObjects/ColorSelector.cs index cb33d502..5b32fc95 100644 --- a/src/GraphicObjects/ColorSelector.cs +++ b/src/GraphicObjects/ColorSelector.cs @@ -36,7 +36,7 @@ namespace Crow public class ColorSelector : GraphicObject { #region CTOR - public ColorSelector () : base(){} + protected ColorSelector() : base(){} public ColorSelector (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/ComboBox.cs b/src/GraphicObjects/ComboBox.cs index fbb4b953..61227055 100644 --- a/src/GraphicObjects/ComboBox.cs +++ b/src/GraphicObjects/ComboBox.cs @@ -35,7 +35,7 @@ namespace Crow public class ComboBox : ListBox { #region CTOR - public ComboBox () : base(){} + protected ComboBox() : base(){} public ComboBox (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/Container.cs b/src/GraphicObjects/Container.cs index 05d63012..fedee0af 100644 --- a/src/GraphicObjects/Container.cs +++ b/src/GraphicObjects/Container.cs @@ -39,7 +39,7 @@ namespace Crow public class Container : PrivateContainer { #region CTOR - public Container () : base(){} + protected Container() : base(){} public Container (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/DirectoryView.cs b/src/GraphicObjects/DirectoryView.cs index 9b876d91..0aa44267 100644 --- a/src/GraphicObjects/DirectoryView.cs +++ b/src/GraphicObjects/DirectoryView.cs @@ -37,7 +37,7 @@ namespace Crow public class DirectoryView : TemplatedControl { #region CTOR - public DirectoryView () : base(){} + protected DirectoryView() : base(){} public DirectoryView (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/Expandable.cs b/src/GraphicObjects/Expandable.cs index 43f44a93..aff804f8 100644 --- a/src/GraphicObjects/Expandable.cs +++ b/src/GraphicObjects/Expandable.cs @@ -36,7 +36,7 @@ namespace Crow public class Expandable : TemplatedContainer { #region CTOR - public Expandable () : base(){} + protected Expandable() : base(){} public Expandable (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/FileDialog.cs b/src/GraphicObjects/FileDialog.cs index 76a5a9ee..f2fb3b89 100644 --- a/src/GraphicObjects/FileDialog.cs +++ b/src/GraphicObjects/FileDialog.cs @@ -41,7 +41,7 @@ namespace Crow public class FileDialog: Window { #region CTOR - public FileDialog () : base(){} + protected FileDialog() : base(){} public FileDialog (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs index f65447b1..7976f837 100644 --- a/src/GraphicObjects/GenericStack.cs +++ b/src/GraphicObjects/GenericStack.cs @@ -37,7 +37,7 @@ namespace Crow public class GenericStack : Group { #region CTOR - public GenericStack () : base(){} + protected GenericStack() : base(){} public GenericStack(Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/GraduatedSlider.cs b/src/GraphicObjects/GraduatedSlider.cs index b8d7d581..52ba2960 100644 --- a/src/GraphicObjects/GraduatedSlider.cs +++ b/src/GraphicObjects/GraduatedSlider.cs @@ -36,7 +36,7 @@ namespace Crow public class GraduatedSlider : Slider { #region CTOR - public GraduatedSlider () : base(){} + protected GraduatedSlider() : base(){} public GraduatedSlider(Interface iface) : base(iface) {} // public GraduatedSlider(double minimum, double maximum, double step) diff --git a/src/GraphicObjects/Grid.cs b/src/GraphicObjects/Grid.cs index 5756525e..f8a50264 100644 --- a/src/GraphicObjects/Grid.cs +++ b/src/GraphicObjects/Grid.cs @@ -43,7 +43,7 @@ namespace Crow public class Grid : Group { #region CTOR - public Grid () : base(){} + protected Grid () : base(){} public Grid(Interface iface) : base(iface) { } @@ -55,17 +55,6 @@ namespace Crow int _rowCount; #endregion - public override void AddChild (GraphicObject child) - { - base.AddChild (child); - this.RegisterForLayouting (LayoutingType.ArrangeChildren); - } - public override void RemoveChild (GraphicObject child) - { - base.RemoveChild (child); - this.RegisterForLayouting (LayoutingType.ArrangeChildren); - } - #region Public Properties [XmlAttributeAttribute()][DefaultValue(2)] public int Spacing @@ -73,7 +62,7 @@ namespace Crow get { return _spacing; } set { _spacing = value; } } - [XmlAttributeAttribute()][DefaultValue(1)] + [XmlAttributeAttribute()][DefaultValue(2)] public virtual int ColumnCount { get { return _columnCount; } @@ -87,7 +76,7 @@ namespace Crow this.RegisterForLayouting (LayoutingType.ArrangeChildren); } } - [XmlAttributeAttribute()][DefaultValue(1)] + [XmlAttributeAttribute()][DefaultValue(2)] public virtual int RowCount { get { return _rowCount; } @@ -127,6 +116,12 @@ namespace Crow // // return tmp; // } + public override void ChildrenLayoutingConstraints (ref LayoutingType layoutType) + { + //Prevent child repositionning + layoutType &= (~LayoutingType.Positioning); + } + public override bool ArrangeChildren { get { return true; } } public virtual void ComputeChildrenPositions() { int slotWidth = CaseWidth; @@ -139,17 +134,18 @@ namespace Crow GraphicObject c = Children [idx]; if (!c.Visible) continue; - //ensure Item are not realigned - c.HorizontalAlignment = HorizontalAlignment.Left; - c.VerticalAlignment = VerticalAlignment.Top; - c.Left = curX * (slotWidth + Spacing); - c.Top = curY * (slotHeight + Spacing); - c.Width = slotWidth; - c.Height = slotHeight; + c.Slot.X = curX * (slotWidth + Spacing); + c.Slot.Y = curY * (slotHeight + Spacing); + //c.Slot.Width = slotWidth; + //c.Slot.Height = slotHeight; } } + IsDirty = true; + } + public override void OnChildLayoutChanges (object sender, LayoutingEventArgs arg) + { + //base.OnChildLayoutChanges (sender, arg); } - public override bool UpdateLayout (LayoutingType layoutType) { diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs index 2cfa3774..a940ee7e 100644 --- a/src/GraphicObjects/Group.cs +++ b/src/GraphicObjects/Group.cs @@ -38,7 +38,7 @@ namespace Crow public class Group : GraphicObject { #region CTOR - public Group () : base(){} + protected Group () : base(){} public Group(Interface iface) : base(iface){} #endregion @@ -67,8 +67,8 @@ namespace Crow Children.Add (g); } g.RegisteredLayoutings = LayoutingType.None; - g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren); g.LayoutChanged += OnChildLayoutChanges; + g.RegisterForLayouting (LayoutingType.Sizing | LayoutingType.ArrangeChildren); } public virtual void RemoveChild(GraphicObject child) { diff --git a/src/GraphicObjects/GroupBox.cs b/src/GraphicObjects/GroupBox.cs index 61e7f2af..2e32ddd5 100644 --- a/src/GraphicObjects/GroupBox.cs +++ b/src/GraphicObjects/GroupBox.cs @@ -36,7 +36,7 @@ namespace Crow public class GroupBox : TemplatedContainer { #region CTOR - public GroupBox () : base(){} + protected GroupBox () : base(){} public GroupBox(Interface iface) : base(iface){} #endregion } diff --git a/src/GraphicObjects/HorizontalStack.cs b/src/GraphicObjects/HorizontalStack.cs index 74e46e9c..64d7cae5 100644 --- a/src/GraphicObjects/HorizontalStack.cs +++ b/src/GraphicObjects/HorizontalStack.cs @@ -38,7 +38,7 @@ namespace Crow public class HorizontalStack : GenericStack { #region CTOR - public HorizontalStack () : base(){} + protected HorizontalStack () : base(){} public HorizontalStack(Interface iface) : base(iface) { } diff --git a/src/GraphicObjects/HueSelector.cs b/src/GraphicObjects/HueSelector.cs index 08c84deb..518ee6c4 100644 --- a/src/GraphicObjects/HueSelector.cs +++ b/src/GraphicObjects/HueSelector.cs @@ -34,7 +34,7 @@ namespace Crow public class HueSelector : ColorSelector { #region CTOR - public HueSelector () : base(){} + protected HueSelector () : base(){} public HueSelector (Interface iface) : base(iface) { } diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs index 622fa714..75c59f4a 100644 --- a/src/GraphicObjects/Image.cs +++ b/src/GraphicObjects/Image.cs @@ -33,6 +33,11 @@ using System.Diagnostics; namespace Crow { + /// + /// Base widget to display an image. Accepts bitmaps and SVGs. + /// + /// + /// public class Image : GraphicObject { Picture _pic; @@ -41,6 +46,9 @@ namespace Crow double opacity; #region Public properties + /// + /// If false, original size will be kept in any case. + /// [XmlAttributeAttribute][DefaultValue(true)] public virtual bool Scaled { get { return scaled; } @@ -55,6 +63,9 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// + /// If image is scaled, proportions will be preserved. + /// [XmlAttributeAttribute][DefaultValue(true)] public virtual bool KeepProportions { get { return keepProps; } @@ -69,6 +80,9 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// + /// Image file path, may be on disk or embedded. Accepts bitmaps or SVG drawings. + /// [XmlAttributeAttribute] public string Path { get { return _pic == null ? "" : _pic.Path; } @@ -90,6 +104,10 @@ namespace Crow NotifyValueChanged ("Path", Path); } } + /// + /// Used only for svg images, repaint only node named referenced in SvgSub. + /// If null, all the svg is rendered + /// [XmlAttributeAttribute] public string SvgSub { get { return _svgSub; } @@ -100,6 +118,10 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// + /// Object holding the image data once loaded, may be used directely to pupulate this control without + /// specifying a path. + /// [XmlAttributeAttribute] public Picture Picture { get { return _pic; } @@ -111,6 +133,10 @@ namespace Crow RegisterForGraphicUpdate (); } } + /// + /// Opacity parameter for the image + /// + // TODO:could be moved in GraphicObject [XmlAttributeAttribute()][DefaultValue(1.0)] public virtual double Opacity { get { return opacity; } @@ -125,7 +151,14 @@ namespace Crow #endregion #region CTOR - public Image () : base(){} + /// + /// Initializes a new instance of the class. + /// + protected Image () : base(){} + /// + /// Initializes a new instance of the class from code + /// + /// interface to bound to public Image (Interface iface) : base(iface) { } diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs index 7c7c584c..de7b7f51 100644 --- a/src/GraphicObjects/Label.cs +++ b/src/GraphicObjects/Label.cs @@ -38,7 +38,7 @@ namespace Crow public class Label : GraphicObject { #region CTOR - public Label () : base(){} + protected Label () : base(){} public Label(Interface iface) : base(iface) { diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs index 67e4b583..438e8d60 100644 --- a/src/GraphicObjects/ListBox.cs +++ b/src/GraphicObjects/ListBox.cs @@ -39,7 +39,7 @@ namespace Crow public class ListBox : TemplatedGroup { #region CTOR - public ListBox () : base(){} + protected ListBox () : base(){} public ListBox (Interface iface) : base(iface) {} #endregion diff --git a/src/GraphicObjects/Menu.cs b/src/GraphicObjects/Menu.cs index d7a7f5a6..dbc1d636 100644 --- a/src/GraphicObjects/Menu.cs +++ b/src/GraphicObjects/Menu.cs @@ -33,7 +33,7 @@ namespace Crow public class Menu : TemplatedGroup { #region CTOR - public Menu () : base(){} + protected Menu () : base(){} public Menu (Interface iface) : base(iface) {} #endregion diff --git a/src/GraphicObjects/MenuItem.cs b/src/GraphicObjects/MenuItem.cs index cd2a54a8..ae27b013 100644 --- a/src/GraphicObjects/MenuItem.cs +++ b/src/GraphicObjects/MenuItem.cs @@ -33,7 +33,7 @@ namespace Crow public class MenuItem : Menu { #region CTOR - public MenuItem () : base(){} + protected MenuItem () : base(){} public MenuItem (Interface iface) : base(iface) {} #endregion diff --git a/src/GraphicObjects/MessageBox.cs b/src/GraphicObjects/MessageBox.cs index 0e308bf9..277a7e11 100644 --- a/src/GraphicObjects/MessageBox.cs +++ b/src/GraphicObjects/MessageBox.cs @@ -33,7 +33,7 @@ namespace Crow public class MessageBox : Window { #region CTOR - public MessageBox () : base(){} + protected MessageBox () : base(){} public MessageBox (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/NumericControl.cs b/src/GraphicObjects/NumericControl.cs index 21cb1961..f0eda90f 100644 --- a/src/GraphicObjects/NumericControl.cs +++ b/src/GraphicObjects/NumericControl.cs @@ -33,7 +33,7 @@ namespace Crow public abstract class NumericControl : TemplatedControl { #region CTOR - public NumericControl () : base(){} + protected NumericControl () : base(){} public NumericControl (Interface iface) : base(iface) { } diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs index 9f60aa40..5316a5a7 100644 --- a/src/GraphicObjects/Popper.cs +++ b/src/GraphicObjects/Popper.cs @@ -33,7 +33,7 @@ namespace Crow public class Popper : TemplatedContainer { #region CTOR - public Popper () : base(){} + protected Popper () : base(){} public Popper (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs index 6eb5e95e..5ee29e94 100644 --- a/src/GraphicObjects/PrivateContainer.cs +++ b/src/GraphicObjects/PrivateContainer.cs @@ -41,7 +41,7 @@ namespace Crow public class PrivateContainer : GraphicObject { #region CTOR - public PrivateContainer () : base(){} + protected PrivateContainer () : base(){} public PrivateContainer (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/ProgressBar.cs b/src/GraphicObjects/ProgressBar.cs index 2995272b..e8165fd2 100644 --- a/src/GraphicObjects/ProgressBar.cs +++ b/src/GraphicObjects/ProgressBar.cs @@ -39,7 +39,7 @@ namespace Crow public class ProgressBar : NumericControl { #region CTOR - public ProgressBar () : base(){} + protected ProgressBar () : base(){} public ProgressBar(Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/RadioButton.cs b/src/GraphicObjects/RadioButton.cs index bf31a42c..ead332ea 100644 --- a/src/GraphicObjects/RadioButton.cs +++ b/src/GraphicObjects/RadioButton.cs @@ -35,7 +35,7 @@ namespace Crow bool isChecked; #region CTOR - public RadioButton () : base(){} + protected RadioButton () : base(){} public RadioButton(Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/ScrollBar.cs b/src/GraphicObjects/ScrollBar.cs index 586ebbbe..31ff7acf 100644 --- a/src/GraphicObjects/ScrollBar.cs +++ b/src/GraphicObjects/ScrollBar.cs @@ -40,7 +40,7 @@ namespace Crow Orientation _orientation; #region CTOR - public ScrollBar () : base(){} + protected ScrollBar () : base(){} public ScrollBar(Interface iface) : base(iface) {} #endregion diff --git a/src/GraphicObjects/Scroller.cs b/src/GraphicObjects/Scroller.cs index b68335f6..8dfed1eb 100644 --- a/src/GraphicObjects/Scroller.cs +++ b/src/GraphicObjects/Scroller.cs @@ -38,7 +38,7 @@ namespace Crow public class Scroller : Container { #region CTOR - public Scroller () : base(){} + protected Scroller () : base(){} public Scroller (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/ScrollingObject.cs b/src/GraphicObjects/ScrollingObject.cs index 7e61c392..9059d8ed 100644 --- a/src/GraphicObjects/ScrollingObject.cs +++ b/src/GraphicObjects/ScrollingObject.cs @@ -39,7 +39,7 @@ namespace Crow public class ScrollingObject : GraphicObject { #region CTOR - public ScrollingObject ():base(){} + protected ScrollingObject ():base(){} public ScrollingObject (Interface iface):base(iface){} #endregion diff --git a/src/GraphicObjects/ScrollingTextBox.cs b/src/GraphicObjects/ScrollingTextBox.cs index 0fb9a7b4..c84594df 100644 --- a/src/GraphicObjects/ScrollingTextBox.cs +++ b/src/GraphicObjects/ScrollingTextBox.cs @@ -42,11 +42,11 @@ namespace Crow public class ScrollingTextBox : ScrollingObject { #region CTOR - public ScrollingTextBox (Interface iface):base(iface){ + protected ScrollingTextBox ():base() + { KeyEventsOverrides = true; } - public ScrollingTextBox ():base() - { + public ScrollingTextBox (Interface iface):base(iface){ KeyEventsOverrides = true; } #endregion diff --git a/src/GraphicObjects/Slider.cs b/src/GraphicObjects/Slider.cs index bc879a96..a664f4e7 100644 --- a/src/GraphicObjects/Slider.cs +++ b/src/GraphicObjects/Slider.cs @@ -39,7 +39,7 @@ namespace Crow public class Slider : NumericControl { #region CTOR - public Slider() : base(){} + protected Slider() : base(){} public Slider(Interface iface) : base(iface) {} // public Slider(double minimum, double maximum, double step) diff --git a/src/GraphicObjects/Spinner.cs b/src/GraphicObjects/Spinner.cs index 69924a03..7c5fdb26 100644 --- a/src/GraphicObjects/Spinner.cs +++ b/src/GraphicObjects/Spinner.cs @@ -35,7 +35,7 @@ namespace Crow public class Spinner : NumericControl { #region CTOR - public Spinner() : base(){} + protected Spinner() : base(){} public Spinner (Interface iface) : base(iface) { } diff --git a/src/GraphicObjects/Splitter.cs b/src/GraphicObjects/Splitter.cs index 1258012e..c688f773 100644 --- a/src/GraphicObjects/Splitter.cs +++ b/src/GraphicObjects/Splitter.cs @@ -37,7 +37,7 @@ namespace Crow public class Splitter : GraphicObject { #region CTOR - public Splitter() : base(){} + protected Splitter() : base(){} public Splitter (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/TabItem.cs b/src/GraphicObjects/TabItem.cs index b19d14e8..b35c544c 100644 --- a/src/GraphicObjects/TabItem.cs +++ b/src/GraphicObjects/TabItem.cs @@ -35,7 +35,7 @@ namespace Crow public class TabItem : TemplatedContainer { #region CTOR - public TabItem() : base(){} + protected TabItem() : base(){} public TabItem (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/TabView.cs b/src/GraphicObjects/TabView.cs index 62ada312..7bf93abd 100644 --- a/src/GraphicObjects/TabView.cs +++ b/src/GraphicObjects/TabView.cs @@ -35,7 +35,7 @@ namespace Crow public class TabView : Group { #region CTOR - public TabView() : base(){} + protected TabView() : base(){} public TabView (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/TemplatedContainer.cs b/src/GraphicObjects/TemplatedContainer.cs index a2e35eab..31bbc436 100644 --- a/src/GraphicObjects/TemplatedContainer.cs +++ b/src/GraphicObjects/TemplatedContainer.cs @@ -39,7 +39,7 @@ namespace Crow public class TemplatedContainer : TemplatedControl { #region CTOR - public TemplatedContainer() : base(){} + protected TemplatedContainer() : base(){} public TemplatedContainer (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs index a3a6b142..34e4ce07 100644 --- a/src/GraphicObjects/TemplatedControl.cs +++ b/src/GraphicObjects/TemplatedControl.cs @@ -44,7 +44,7 @@ namespace Crow public abstract class TemplatedControl : PrivateContainer { #region CTOR - public TemplatedControl() : base(){} + protected TemplatedControl() : base(){} public TemplatedControl (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs index 55726b50..c32b2c44 100644 --- a/src/GraphicObjects/TemplatedGroup.cs +++ b/src/GraphicObjects/TemplatedGroup.cs @@ -40,7 +40,7 @@ namespace Crow public abstract class TemplatedGroup : TemplatedControl { #region CTOR - public TemplatedGroup() : base(){} + protected TemplatedGroup() : base(){} public TemplatedGroup (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/TextBox.cs b/src/GraphicObjects/TextBox.cs index 2438c65a..a14aea6a 100644 --- a/src/GraphicObjects/TextBox.cs +++ b/src/GraphicObjects/TextBox.cs @@ -34,7 +34,7 @@ namespace Crow public class TextBox : Label { #region CTOR - public TextBox() : base(){} + protected TextBox() : base(){} public TextBox(Interface iface) : base(iface) { } // public TextBox(string _initialValue) diff --git a/src/GraphicObjects/TextRun.cs b/src/GraphicObjects/TextRun.cs index 55ac7f33..69495647 100644 --- a/src/GraphicObjects/TextRun.cs +++ b/src/GraphicObjects/TextRun.cs @@ -39,7 +39,7 @@ namespace Crow public class TextRun : GraphicObject { #region CTOR - public TextRun () : base(){} + protected TextRun () : base(){} public TextRun (Interface iface) : base (iface){} #endregion diff --git a/src/GraphicObjects/TreeView.cs b/src/GraphicObjects/TreeView.cs index 80c3385f..4125e582 100644 --- a/src/GraphicObjects/TreeView.cs +++ b/src/GraphicObjects/TreeView.cs @@ -39,7 +39,7 @@ namespace Crow bool isRoot; #region CTOR - public TreeView() : base(){} + protected TreeView() : base(){} public TreeView (Interface iface) : base(iface) { } diff --git a/src/GraphicObjects/Trend.cs b/src/GraphicObjects/Trend.cs index 055c870d..e9d3c2d3 100644 --- a/src/GraphicObjects/Trend.cs +++ b/src/GraphicObjects/Trend.cs @@ -50,10 +50,11 @@ namespace Crow values.RemoveAt (0); RegisterForRedraw (); } - - public Trend () + #region CTOR + protected Trend () : base() { } + #endregion [XmlIgnore]public virtual int NewValue { set { AddValue (value); diff --git a/src/GraphicObjects/VerticalStack.cs b/src/GraphicObjects/VerticalStack.cs index d0122373..9650e685 100644 --- a/src/GraphicObjects/VerticalStack.cs +++ b/src/GraphicObjects/VerticalStack.cs @@ -36,10 +36,12 @@ namespace Crow /// public class VerticalStack : GenericStack { - public VerticalStack() : base(){} + #region CTOR + protected VerticalStack() : base(){} public VerticalStack(Interface iface) : base(iface) { } + #endregion [System.Xml.Serialization.XmlIgnore] public override Orientation Orientation diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs index efc8f4e3..5025b3fb 100644 --- a/src/GraphicObjects/Window.cs +++ b/src/GraphicObjects/Window.cs @@ -65,7 +65,7 @@ namespace Crow #endregion #region CTOR - public Window() : base(){} + protected Window() : base(){} public Window (Interface iface) : base(iface){} #endregion diff --git a/src/GraphicObjects/Wrapper.cs b/src/GraphicObjects/Wrapper.cs index cfa1736f..e56d9332 100644 --- a/src/GraphicObjects/Wrapper.cs +++ b/src/GraphicObjects/Wrapper.cs @@ -35,7 +35,7 @@ namespace Crow public class Wrapper : GenericStack { #region CTOR - public Wrapper() : base(){} + protected Wrapper() : base(){} public Wrapper (Interface iface) : base(iface){} #endregion diff --git a/src/Interface.cs b/src/Interface.cs index b16acc07..7ea61287 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -43,7 +43,8 @@ namespace Crow /// The Interface Class is the root of crow graphic trees. It is thread safe allowing /// application to run multiple interfaces in different threads. /// It provides the Dirty bitmap and zone of the interface to be drawn on screen. - /// + /// + /// /// The Interface contains : /// - rendering and layouting queues and logic. /// - helpers to load XML interfaces files directely bound to this interface @@ -61,7 +62,7 @@ namespace Crow /// /// The resulting surface (a byte array in the OpenTK renderer) is made available and protected with the /// RenderMutex of the interface. - /// + /// public class Interface : ILayoutable { #region CTOR -- 2.47.3