]> O.S.I.I.S - jp/crow.git/commitdiff
add style as parameter to widget ctor
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 2 Jun 2020 12:22:07 +0000 (14:22 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 2 Jun 2020 12:22:07 +0000 (14:22 +0200)
57 files changed:
Crow.sln
Crow/Crow.csproj
Crow/Default.style
Crow/Properties/AssemblyInfo.cs [new file with mode: 0644]
Crow/Templates/Expandable.template
Crow/src/Widgets/Border.cs
Crow/src/Widgets/Button.cs
Crow/src/Widgets/CheckBox.cs
Crow/src/Widgets/ColorPicker.cs
Crow/src/Widgets/ColorSelector.cs
Crow/src/Widgets/ColorSlider.cs
Crow/src/Widgets/ComboBox.cs
Crow/src/Widgets/Container.cs
Crow/src/Widgets/DataSourceChangeEventArgs.cs
Crow/src/Widgets/DirectoryView.cs
Crow/src/Widgets/DockStack.cs
Crow/src/Widgets/GenericStack.cs
Crow/src/Widgets/GraduatedSlider.cs
Crow/src/Widgets/Group.cs
Crow/src/Widgets/Label.cs
Crow/src/Widgets/ListBox.cs
Crow/src/Widgets/NumericControl.cs
Crow/src/Widgets/Popper.cs
Crow/src/Widgets/PrivateContainer.cs
Crow/src/Widgets/ProgressBar.cs
Crow/src/Widgets/RadioButton.cs
Crow/src/Widgets/SaturationValueSelector.cs
Crow/src/Widgets/Scalable.cs
Crow/src/Widgets/ScrollBar.cs
Crow/src/Widgets/Scroller.cs
Crow/src/Widgets/ScrollingObject.cs
Crow/src/Widgets/Shape.cs
Crow/src/Widgets/Slider.cs
Crow/src/Widgets/Spinner.cs
Crow/src/Widgets/Splitter.cs
Crow/src/Widgets/TabItem.cs
Crow/src/Widgets/TabView.cs
Crow/src/Widgets/Table.cs
Crow/src/Widgets/TemplatedContainer.cs
Crow/src/Widgets/TemplatedControl.cs
Crow/src/Widgets/TemplatedGroup.cs
Crow/src/Widgets/TestCairoPatch.cs
Crow/src/Widgets/TextBox.cs
Crow/src/Widgets/TextRun.cs
Crow/src/Widgets/TreeView.cs
Crow/src/Widgets/Trend.cs
Crow/src/Widgets/VerticalStack.cs
Crow/src/Widgets/Widget.cs
Crow/src/Widgets/Window.cs
Crow/src/Widgets/Wrapper.cs
Crow/src/styling/StyleReader.cs
Samples/BasicTests/BasicTests.cs
Samples/Directory.Build.props
Samples/HelloWorld/ui/helloworld.crow
Samples/common/samples.style
Samples/common/ui/Interfaces/Divers/all.crow [new file with mode: 0644]
Samples/common/ui/Interfaces/TemplatedControl/testSpinner.crow

index df52304f167f624237f145595774de659291d3c7..933c8e322a0b4b5aeb6365f63ff334a59bbc86ed 100644 (file)
--- a/Crow.sln
+++ b/Crow.sln
@@ -12,7 +12,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crow", "Crow\Crow.csproj",
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{B2C7855A-2878-47FD-AD32-9A83DB4AB8C6}"
        ProjectSection(SolutionItems) = preProject
-               Samples\Directory.Build.props = Samples\Directory.Build.props
+               Samples\Directory.Build.props = Samples\Directory.Build.props           
        EndProjectSection
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloWorld", "Samples\HelloWorld\HelloWorld.csproj", "{F535A8AB-CD93-49AB-B1B0-FFF9AE51ED6A}"
index 587ca78c9ad569870463e90477a5d087026e5853..4937324494e7cacce16287cce5d989e9fe6aa463 100644 (file)
                <GeneratePackageOnBuild>True</GeneratePackageOnBuild>
                <GenerateDocumentationFile>true</GenerateDocumentationFile>
                <NoWarn>$(NoWarn);1591;1587;1570;1572;1573;1574</NoWarn>
-               <DefineConstants>_DESIGN_MODE</DefineConstants>         
+               <DefineConstants>DESIGN_MODE</DefineConstants>          
                <EnableDefaultItems>false</EnableDefaultItems>
                <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
                <AppConfig>App.config</AppConfig>
        </PropertyGroup>
        <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
                <DebugType>full</DebugType>
-               <DefineConstants>DEBUG;TRACE;MEASURE_TIME;_DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE;_DEBUG_FOCUS;DEBUG_DRAGNDROP;_DEBUG_LOG</DefineConstants>
+               <DefineConstants>$(DefineConstants);DEBUG;TRACE;MEASURE_TIME;_DEBUG_DISPOSE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE;_DEBUG_FOCUS;DEBUG_DRAGNDROP;_DEBUG_LOG</DefineConstants>
                <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
        </PropertyGroup>
        <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
@@ -58,6 +58,7 @@
                <EmbeddedResource Include="Cursors\*.*">
                        <LogicalName>Crow.Cursors.%(Filename)</LogicalName>
                </EmbeddedResource>
+               <Compile Include="Properties\AssemblyInfo.cs" />
        </ItemGroup>
        <ItemGroup>
          <Compile Remove="src\Widgets\ColorPicker2.cs" />
index 8c4434436f736a0451fc69b8724623adeb2b286d..9309503d2d5b446ffd57b61b8f9664d23c4b0fcc 100644 (file)
@@ -1,4 +1,11 @@
 ControlBackground = "Transparent";
+ControlBorderColor = "DimGrey";
+ControlBorderWidth = "1";
+ControlCaptionColor = "LightGrey";
+ControlCaptionHoverColor = "White";
+
+IconSize = "12";
+IconMargin = "1";
 
 Button, CheckBox, RadioButton, ComboBox, Expandable,
 MessageBox, Popper, Slider, Spinner, TextBox {
@@ -19,26 +26,26 @@ Control {
        Spacing="3";
 }
 ControlBorder {
-       BorderWidth     = "1";
-       Foreground  = "DimGrey";
+       BorderWidth     = "${ControlBorderWidth}";
+       Foreground  = "${ControlBorderColor}";
        Background      = "${ControlBackground}";
        CornerRadius = "0";     
 }
 ControlCaption {
-       Foreground  = "LightGrey";
-       MouseEnter      = "{Foreground=White}";
-       MouseLeave      = "{Foreground=LightGrey}";
+       Foreground  = "${ControlCaptionColor}";
+       MouseEnter      = "{Foreground=${ControlCaptionHoverColor}}";
+       MouseLeave      = "{Foreground=${ControlCaptionColor}}";
 }
 ControlEditableText {
        Foreground      = "LightGrey";
        Background      = "Transparent";
-       MinimumSize     = "80,10";
+       MinimumSize     = "40,10";
        Margin          = "1";
 }
 Icon {
-       Margin = "1";
-       Width = "12";
-       Height = "12";
+       Margin = "${IconMargin}";
+       Width = "${IconSize}";
+       Height = "${IconSize}";
 }
 Wrapper {
        Orientation = "Vertical";
@@ -56,7 +63,7 @@ TextBox {
        Background = "White";
        Foreground = "Black";
        Selectable = "True";
-       Text = "TextBox";
+       //Text = "TextBox";
        Margin = "1";
        MouseCursor = "IBeam";
 }
diff --git a/Crow/Properties/AssemblyInfo.cs b/Crow/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..d864652
--- /dev/null
@@ -0,0 +1,5 @@
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+[assembly: Crow.Crow ]
+
index 36137e26198ecb1e1bee797abecf59786098bf26..ac52ae3472c5c53a6d95dde541388313fe634160 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<Border Style="ControlBorder" Foreground="{./Foreground}" Background="{./Background}">
+<Border Style="ControlBorder" >
        <VerticalStack>
                <HorizontalStack Spacing="1" Height="Fit" Focusable="true" MouseDoubleClick="./onClickForExpand">
                        <Container Margin="1" Width="9" Height="9" MouseDown="./onClickForExpand"
index 104daac610300f63765f7dc5956dabc7e8a5b62d..51758cd0ba1751433f58eb0bc0c499285129ebc5 100644 (file)
@@ -1,33 +1,8 @@
-//
-// Border.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
 using System.ComponentModel;
-using System.Diagnostics;
 using Crow.Cairo;
 
 namespace Crow
@@ -47,8 +22,8 @@ namespace Crow
        public class Border : Container
        {
                #region CTOR
-               protected Border () : base(){}
-               public Border (Interface iface) : base(iface){}
+               protected Border () {}
+               public Border (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #region private fields
@@ -61,8 +36,7 @@ namespace Crow
                #region public properties
                /// <summary>
                /// use to define the colors of the 3d border
-               /// </summary>
-               
+               /// </summary>          
                public virtual Fill RaisedColor {
                        get { return raisedColor; }
                        set {
@@ -75,8 +49,7 @@ namespace Crow
                }
                /// <summary>
                /// use to define the colors of the 3d border
-               /// </summary>
-               
+               /// </summary>          
                public virtual Fill SunkenColor {
                        get { return sunkenColor; }
                        set {
@@ -133,8 +106,7 @@ namespace Crow
 
                        gr.Save ();
                        if (ClipToClientRect) {
-                               //clip to client zone
-                               CairoHelpers.CairoRectangle (gr, ClientRectangle,Math.Max(0.0, CornerRadius-Margin));
+                               CairoHelpers.CairoRectangle (gr, ClientRectangle, Math.Max (0.0, CornerRadius - Margin));
                                gr.Clip ();
                        }
 
index 8b15c2ea6ec000d7c56378a6d641075d5a1a1b17..6d997a23560b5ad5d1a8ce06230947857095edd2 100644 (file)
@@ -1,39 +1,8 @@
-//
-// Button.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
-using System.Linq;
-using System.Text;
-//using OpenTK.Graphics.OpenGL;
-
-using System.Diagnostics;
-
-using System.Xml.Serialization;
-using Crow.Cairo;
 using System.ComponentModel;
 
 namespace Crow
@@ -41,11 +10,11 @@ namespace Crow
        /// <summary>
        /// templated button control
        /// </summary>
-    public class Button : TemplatedContainer
+       public class Button : TemplatedContainer
     {
                #region CTOR
-               protected Button() : base() {}
-               public Button (Interface iface) : base(iface){}
+               protected Button() {}
+               public Button (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                string image;
index 7a6e5d45d67487594eab9d70606f396f10efd795..50215241abe89a426d668517e16441bba16e6a0e 100644 (file)
@@ -14,8 +14,8 @@ namespace Crow
        public class CheckBox : TemplatedControl
        {
                #region CTOR
-               protected CheckBox() : base(){}
-               public CheckBox (Interface iface) : base(iface){}
+               protected CheckBox() {}
+               public CheckBox (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                bool isChecked;
index 9b3bfb75d646d6375b025fd56413b9ef07d2eac8..c62659a00a106766ed00149c31ebc5eea3574fda 100644 (file)
@@ -16,8 +16,8 @@ namespace Crow
        public class ColorPicker : TemplatedControl
        {
                #region CTOR
-               protected ColorPicker() : base(){}
-               public ColorPicker (Interface iface) : base(iface){}
+               protected ColorPicker() {}
+               public ColorPicker (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                Color currentColor;
index 83949df587ef8c631873c813aba5fe23dcc48a54..aa6a1aa92ecf77872b3554df91891cf9737828e1 100644 (file)
@@ -14,8 +14,8 @@ namespace Crow
        public class ColorSelector : Widget
        {
                #region CTOR
-               protected ColorSelector() : base(){}
-               public ColorSelector (Interface iface) : base(iface){}
+               protected ColorSelector() {}
+               public ColorSelector (Interface iface, string style = null) : base(iface, style){ }
                #endregion
 
                protected Point mousePos;
index 013a0e63812dcdf894312d2d4377cff863080ef5..fe2b78dc29ffdcd2970e960d2aa88d00ffe4722b 100644 (file)
@@ -16,8 +16,8 @@ namespace Crow
        public class ColorSlider : Widget
        {
                #region CTOR
-               protected ColorSlider() : base(){}
-               public ColorSlider (Interface iface) : base(iface){}
+               protected ColorSlider() {}
+               public ColorSlider (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                protected Point mousePos;//store local mouse pos sync with currentValue
index 08e844c414f64a37217d5a272c1a623577956de4..cf706318df92de3446b971f8f14065373c5f947d 100644 (file)
@@ -2,9 +2,6 @@
 //
 // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
-using System;
-using System.Xml.Serialization;
-
 namespace Crow
 {
        /// <summary>
@@ -13,8 +10,8 @@ namespace Crow
        public class ComboBox : ListBox
     {
                #region CTOR
-               protected ComboBox() : base(){}
-               public ComboBox (Interface iface) : base(iface){}
+               protected ComboBox() {}
+               public ComboBox (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                Size minimumPopupSize = "10,10";
index 07ccfa9b653dd81c257532f9c4857270c850afdc..6b16e5a307c0ee4908ebf74937069934fe077b8d 100644 (file)
@@ -2,19 +2,12 @@
 //
 // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
-using System;
-using System.Xml.Serialization;
-using System.Reflection;
-using System.ComponentModel;
-using System.Linq;
-using System.Threading;
-
 namespace Crow
 {
        /// <summary>
        /// simple container accepting one child
        /// </summary>
-    public class Container : PrivateContainer
+       public class Container : PrivateContainer
     {
                #if DESIGN_MODE
                public override void getIML (System.Xml.XmlDocument doc, System.Xml.XmlNode parentElem)
@@ -29,8 +22,8 @@ namespace Crow
                #endif
 
                #region CTOR
-               protected Container() : base(){}
-               public Container (Interface iface) : base(iface){}
+               protected Container() {}
+               public Container (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                [XmlIgnore]public Widget Child {
index a2519356d78ed28aa46a30fe942413fd63f3efe9..47c40029be73d160f56cbf14d9ce35b5668dcae1 100644 (file)
@@ -1,32 +1,14 @@
-//
-// DataSourceChangeEventArgs.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
 
 namespace Crow
 {
+       /// <summary>
+       /// Raised when the current data source of a widget has changed.
+       /// </summary>
        public class DataSourceChangeEventArgs : EventArgs
        {
                public object OldDataSource;
index ae24e9f575554b0b6b124cc22e9e24a36b34cc8b..c664f517f0b8721a6e32a037c587ecfe93541d99 100644 (file)
@@ -1,34 +1,11 @@
-//
-// DirectoryView.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
+using System.Collections.Generic;
 using System.ComponentModel;
 using System.IO;
-using System.Collections.Generic;
 using System.Linq;
 
 namespace Crow
@@ -39,8 +16,8 @@ namespace Crow
        public class DirectoryView : TemplatedControl
        {
                #region CTOR
-               protected DirectoryView() : base(){}
-               public DirectoryView (Interface iface) : base(iface){}
+               protected DirectoryView() {}
+               public DirectoryView (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #region events
index 50e87b1ce3b76d155d1bb597864076e04d7a0245..81aa5e74fb65939166ab426b7fd1f160223433be 100644 (file)
@@ -1,33 +1,9 @@
-//
-// DockStack.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
-//
-// 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 Crow.IML;
-using System.Linq;
 using System.Text;
-using System.IO;
 using FastEnumUtility;
 
 namespace Crow
@@ -37,7 +13,7 @@ namespace Crow
        {               
                #region CTor
                public DockStack ()     {}
-               public DockStack (Interface iface) : base (iface) {}
+               public DockStack (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                /*static int color = 10;
index eeec15c6e09f36fd684612b0e94890d339148721..a0fb4d0c680bfb29111100f86ca1564ea140075b 100644 (file)
@@ -2,10 +2,8 @@
 //
 // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Xml.Serialization;
 using System;
+using System.ComponentModel;
 using System.Linq;
 
 namespace Crow
@@ -16,12 +14,12 @@ namespace Crow
        public class GenericStack : Group
     {
                #region CTOR
-               protected GenericStack() : base(){}
-               public GenericStack(Interface iface) : base(iface){}
+               protected GenericStack() {}
+               public GenericStack(Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #region Private fields
-        int _spacing;
+               int _spacing;
         Orientation _orientation;
                #endregion
 
index 71bbff112954ef479880906f4263dcf6aeb89eea..938e00545ea7a19a61e1ab36479b6a6e6b29356f 100644 (file)
@@ -1,35 +1,8 @@
-//
-// GraduatedSlider.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
-using System.Linq;
-using System.Text;
 using Crow.Cairo;
-using System.Xml.Serialization;
 
 namespace Crow
 {
@@ -37,9 +10,8 @@ namespace Crow
        public class GraduatedSlider : Slider
     {     
                #region CTOR
-               protected GraduatedSlider() : base(){}
-               public GraduatedSlider(Interface iface) : base(iface)
-               {}
+               protected GraduatedSlider() {}
+               public GraduatedSlider(Interface iface, string style = null) : base (iface, style) { }
 //             public GraduatedSlider(double minimum, double maximum, double step)
 //            : base()
 //        {
index 365679b2d58758e86b4d5dc6dc398b8c66c58d0e..bba4bea9be250614fd5c41f1e4be52d46b836ffd 100644 (file)
@@ -42,8 +42,8 @@ namespace Crow
                protected ReaderWriterLockSlim childrenRWLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
 
                #region CTOR
-               public Group () : base() {}
-               public Group(Interface iface) : base(iface){}
+               public Group () {}
+               public Group(Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #region EVENT HANDLERS
index eef5cbd928c2ad938164ea47fb3523bc3baeed28..860c16ca0f047bb3e0929e5c9b49a1c21a65b5b7 100644 (file)
@@ -13,17 +13,8 @@ namespace Crow {
        public class Label : Widget
     {
                #region CTOR
-               protected Label () : base(){}
-
-               public Label(Interface iface) : base(iface)
-               {
-
-               }
-//             public Label(string _text)
-//                     : base()
-//             {
-//                     Text = _text;
-//             }
+               protected Label () {}
+               public Label(Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                public event EventHandler<TextChangeEventArgs> TextChanged;
index f605fa55b738292cc2b9a1bbee00dde43645ae3a..c51f9ba1ea56caabeace1ba5d9ce33c400c9c497 100644 (file)
@@ -1,50 +1,15 @@
-//
-// ListBox.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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 System.Collections;
-using System.Xml.Serialization;
-using System.ComponentModel;
-using System.IO;
-using System.Diagnostics;
-using System.Xml;
-using System.Collections.Generic;
-using System.Threading;
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 namespace Crow
 {
        public class ListBox : TemplatedGroup
        {
                #region CTOR
-               protected ListBox () : base(){}
-               public ListBox (Interface iface) : base(iface) {}
+               protected ListBox () {}
+               public ListBox (Interface iface, string style = null) : base (iface, style) { }
                #endregion
-
-
-
        }
 }
 
index ec63fe8dd929035864567dda18631d5acdc8bb55..9359d648e060a046932fb55bc691dba3aa5753fb 100644 (file)
@@ -33,10 +33,8 @@ namespace Crow
        public abstract class NumericControl : TemplatedControl
        {
                #region CTOR
-               protected NumericControl () : base(){}
-               public NumericControl (Interface iface) : base(iface)
-               {
-               }
+               protected NumericControl () {}
+               public NumericControl (Interface iface, string style = null) : base (iface, style) { }
 //             public NumericControl(double minimum, double maximum, double step)
 //                     : base()
 //             {
index 78d35d8f119ac6d367510009069fae6c6d595e03..fc5ff0daf8cd6eae2687712a281c61e5af9d0d5e 100644 (file)
@@ -3,16 +3,15 @@
 // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 using System;
-using System.Xml.Serialization;
 using System.ComponentModel;
 
 namespace Crow
 {
-    public class Popper : TemplatedContainer
+       public class Popper : TemplatedContainer
     {
                #region CTOR
-               protected Popper () : base(){}
-               public Popper (Interface iface) : base(iface){}
+               protected Popper () {}
+               public Popper (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                bool _isPopped, _canPop;
index 351ea2027049b4f11bf22600a289054cdcc6e781..ee74784ebb33e9f1b75041977eb07e92770852dd 100644 (file)
@@ -2,9 +2,6 @@
 //
 // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
-using System;
-using System.Xml.Serialization;
-using System.ComponentModel;
 using Crow.Cairo;
 
 namespace Crow
@@ -20,8 +17,8 @@ namespace Crow
        public class PrivateContainer : Widget
        {
                #region CTOR
-               protected PrivateContainer () : base(){}
-               public PrivateContainer (Interface iface) : base(iface){}
+               protected PrivateContainer () {}
+               public PrivateContainer (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #if DESIGN_MODE
index 20fadadce0cdffaebc5b03d97c04eff2b4eb123b..816b935299a262bc7392e80d64978f87b905a683 100644 (file)
@@ -1,51 +1,20 @@
-//
-// ProgressBar.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
-using System.Linq;
-using System.Text;
 using Crow.Cairo;
-using System.Diagnostics;
-using System.Xml.Serialization;
-using System.ComponentModel;
 
 namespace Crow
 {
-       
        public class ProgressBar : NumericControl
     {
                #region CTOR
-               protected ProgressBar () : base(){}
-               public ProgressBar(Interface iface) : base(iface){}
+               protected ProgressBar () {}
+               public ProgressBar(Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                protected override void loadTemplate (Widget template)
-               {
-                       
+               {                       
                }
 
                #region GraphicObject overrides
index ef2c6e93bf012fd9bbe33138aa49dd090ea00c53..220e56e84e6d60ac6b8546f1aed7dab35b288ff4 100644 (file)
@@ -16,8 +16,8 @@ namespace Crow
                bool isChecked;
 
                #region CTOR
-               protected RadioButton () : base () { }
-               public RadioButton (Interface iface) : base (iface) { }
+               protected RadioButton () { }
+               public RadioButton (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                public event EventHandler Checked;
index d202503fac04aac1c1b9882bd846df16168a7e93..09c194cd50415d9186375bc18454b8197a6a0338 100644 (file)
@@ -1,42 +1,19 @@
-//
-// SaturationValueSelector.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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 Crow.Cairo;
-using System.Xml.Serialization;
 
 namespace Crow
 {
        [DesignIgnore]
        public class SaturationValueSelector : ColorSelector
        {
-               public SaturationValueSelector () : base(){}
-               public SaturationValueSelector (Interface iface) : base(iface)
-               {
-               }
+               #region CTOR
+               public SaturationValueSelector () {}
+               public SaturationValueSelector (Interface iface, string style = null) : base (iface, style) { }
+               #endregion
 
                double v, s;
                                
index adb1718463f52cce8fe8095fe6e3a1250d424c39..e38aded02aca6cc211a744c831f08f87c5e9a423 100644 (file)
@@ -6,11 +6,14 @@ using System.ComponentModel;
 
 namespace Crow
 {
+       /// <summary>
+       /// Base class for controling scalable content behaviour.
+       /// </summary>
        public abstract class Scalable : Widget
        {
                #region CTOR
-               protected Scalable () : base () { }
-               public Scalable (Interface iface) : base (iface) { }
+               protected Scalable () { }
+               public Scalable (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                protected bool scaled, keepProps;
index 08ee5e0970e11c2629713ab4cfc375bc0c182f2c..612a3e6349a94e8937ebf07639bcef493fb9c350 100644 (file)
@@ -1,31 +1,8 @@
-//
-// ScrollBar.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
 using System.ComponentModel;
 
 namespace Crow
@@ -41,8 +18,8 @@ namespace Crow
                int _cursorSize;
 
                #region CTOR
-               protected ScrollBar () : base(){}
-               public ScrollBar(Interface iface) : base(iface) {}
+               protected ScrollBar () {}
+               public ScrollBar(Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                [DefaultValue(Orientation.Vertical)]
index be3aeac2151e8bbb681d0d930b1a4a5eb9ac37cc..33695df090c6c0bda33f17d69b4fe7c10ba9135b 100644 (file)
@@ -15,8 +15,8 @@ namespace Crow
        public class Scroller : Container
        {
                #region CTOR
-               protected Scroller () : base(){}
-               public Scroller (Interface iface) : base(iface){}
+               protected Scroller () {}
+               public Scroller (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                //public event EventHandler<ScrollingEventArgs> Scrolled;
index ea09c2cdc641b11d00a1e52a1ee0453f025c22f5..8f0c81a4f1cdb4efd590780cad0c3bbaf57cde44 100644 (file)
@@ -1,34 +1,9 @@
-//
-// ScrollingObject.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
 using System.ComponentModel;
-using System.Collections;
-using Crow.Cairo;
 using Glfw;
 
 namespace Crow
@@ -40,8 +15,8 @@ namespace Crow
        public class ScrollingObject : Widget
        {
                #region CTOR
-               protected ScrollingObject ():base(){}
-               public ScrollingObject (Interface iface):base(iface){}
+               protected ScrollingObject () {}
+               public ScrollingObject (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                int scrollX, scrollY, maxScrollX, maxScrollY, mouseWheelSpeed;
index d8b179432d26fde69ee51631110936cb77622759..853b4abd3ce739a0b98a06c18b8db32047a50743 100644 (file)
@@ -137,8 +137,8 @@ namespace Crow
        public class Shape : Scalable
        {
                #region CTOR
-               protected Shape () : base () { }
-               public Shape (Interface iface) : base (iface) { }
+               protected Shape ()  { }
+               public Shape (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                string path;
index 54ad33fa57b6bb5a0f908d22cad2c96133696ed2..73518ecb11fb58abc00edcfafefc3bc6d98c8d7a 100644 (file)
@@ -15,9 +15,8 @@ namespace Crow
        public class Slider : NumericControl
     {
                #region CTOR
-               protected Slider() : base(){}
-               public Slider(Interface iface) : base(iface)
-               {}
+               protected Slider() {}
+               public Slider(Interface iface, string style = null) : base (iface, style) { }
 //             public Slider(double minimum, double maximum, double step)
 //                     : base(minimum,maximum,step)
 //             {
index d9fd51f6fa3fd182224863f91d4af4f0adf21f38..c1cfdbbb7706a7b9d5324a7ab0b4c1cd9dfd0bed 100644 (file)
@@ -11,10 +11,8 @@ namespace Crow
        public class Spinner : NumericControl
        {
                #region CTOR
-               protected Spinner() : base(){}
-               public Spinner (Interface iface) : base(iface)
-               {
-               }
+               protected Spinner() {}
+               public Spinner (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                public override void onMouseClick (object sender, MouseButtonEventArgs e)
index 40801160984b5e6a48c0c02f7100f5c7597693d5..f2c0a084935878fd28c9e46850f940de297c297b 100644 (file)
@@ -1,31 +1,8 @@
-//
-// Splitter.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
 using System.ComponentModel;
 
 namespace Crow
@@ -37,8 +14,8 @@ namespace Crow
        public class Splitter : Widget
        {
                #region CTOR
-               protected Splitter() : base(){}
-               public Splitter (Interface iface) : base(iface){}
+               protected Splitter() {}
+               public Splitter (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                int thickness;
index df06cc92750aa868040199f42cee17983146eec7..c57807c8c74cae4cb51a4056819ac1c3f91f00e6 100644 (file)
@@ -12,8 +12,8 @@ namespace Crow
        public class TabItem : TemplatedContainer
        {
                #region CTOR
-               protected TabItem() : base(){}
-               public TabItem (Interface iface) : base(iface){}
+               protected TabItem() {}
+               public TabItem (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                public event EventHandler QueryClose;
index d48cbfc013cc4089da171e12afef99c4c4be6f93..8699d3165d443ab48a95e8c2032b3e7af324bd90 100644 (file)
@@ -12,8 +12,8 @@ namespace Crow
        public class TabView : Group
        {
                #region CTOR
-               public TabView() : base(){}
-               public TabView (Interface iface) : base(iface){}
+               public TabView() {}
+               public TabView (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #region Private fields
index bc148210b91644db2162699ebe730d3677fbd76c..10f6376f3a119f0a4f3c543245453d3dc70f6782 100644 (file)
@@ -49,8 +49,10 @@ namespace Crow
 
        public class Table : TemplatedGroup
        {
-               public Table () : base () {}
-               public Table (Interface iFace) : base (iFace) { }
+               #region CTOR
+               public Table ()  {}
+               public Table (Interface iface, string style = null) : base (iface, style) { }
+               #endregion
 
                public ObservableList<Column> Columns = new ObservableList<Column> ();
        }
index 0acd876505bb84ed4edc242bb856f0a792683470..31039f45e571b27f60633f2226223bd688b87c21 100644 (file)
@@ -2,11 +2,6 @@
 //
 // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
-using System;
-using System.Xml.Serialization;
-using System.Xml;
-using System.Reflection;
-
 namespace Crow
 {
        /// <summary>
@@ -16,7 +11,7 @@ namespace Crow
        /// </summary>
        public class TemplatedContainer : TemplatedControl
        {
-               #if DESIGN_MODE
+#if DESIGN_MODE
                public override void getIML (System.Xml.XmlDocument doc, System.Xml.XmlNode parentElem)
                {
                        if (this.design_isTGItem)
@@ -26,11 +21,11 @@ namespace Crow
                                return;
                        Content.getIML (doc, parentElem.LastChild);
                }
-               #endif
+#endif
 
-               #region CTOR
-               protected TemplatedContainer() : base(){}
-               public TemplatedContainer (Interface iface) : base(iface){}
+#region CTOR
+               protected TemplatedContainer() {}
+               public TemplatedContainer (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                protected Container _contentContainer;
@@ -57,7 +52,7 @@ namespace Crow
                        _contentContainer = this.child.FindByName ("Content") as Container;
                }
 
-               #region GraphicObject overrides
+#region GraphicObject overrides
                public override Widget FindByName (string nameToFind)
                {
                        if (Name == nameToFind)
@@ -73,7 +68,7 @@ namespace Crow
                                return true;
                        return base.Contains (goToFind);
                }
-               #endregion
+#endregion
        }
 }
 
index 32796c8ae31553fdfb8af88467e89b4c329b1668..896ecdcead87b02644e9e8e4a025de1a6ba13925 100644 (file)
@@ -32,8 +32,8 @@ namespace Crow
                #endif
 
                #region CTOR
-               protected TemplatedControl() : base(){}
-               public TemplatedControl (Interface iface) : base(iface){}
+               protected TemplatedControl() {}
+               protected TemplatedControl (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                string _template = "NOT_SET";
index 478c99b5bf49e2bad0b94dfac5c7f2bedd4f1a45..72cd452cf8261e74bb7b42b3f2ccbf4db7cb3bc6 100644 (file)
@@ -32,8 +32,8 @@ namespace Crow {
                #endif
 
                #region CTOR
-               protected TemplatedGroup() : base(){}
-               public TemplatedGroup (Interface iface) : base(iface){}
+               protected TemplatedGroup() {}
+               protected TemplatedGroup (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                protected Group items;
index f8294a3b8749315845f711a37fe628f74fdb7e79..99230a057f776b175ea0baba876423e99eb6bae5 100644 (file)
@@ -1,28 +1,7 @@
-//
-// TestCairoPatch.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// 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.
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+
 using System;
 using Crow.Cairo;
 
index e3830cd005daf4203496a3f434b72a1b04b56c9e..3f166d42433f28a170b4b153a0a7b88bdeae7581 100644 (file)
@@ -1,43 +1,17 @@
-//
-// TextBox.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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 Crow.Cairo;
-using System.Diagnostics;
-using System.Xml.Serialization;
 using Glfw;
 
 namespace Crow
 {
-    public class TextBox : Label
+       public class TextBox : Label
     {
                #region CTOR
-               protected TextBox() : base(){}
-               public TextBox(Interface iface) : base(iface)
-               { }
+               protected TextBox() {}
+               public TextBox(Interface iface, string style = null) : base (iface, style) { }
 //             public TextBox(string _initialValue)
 //                     : base(_initialValue)
 //             {
index 054d2c2a29440af97ea9e5d9895a667bcf279cb2..09720baf53c1dd84ed75cd2f067a789e33883ad8 100644 (file)
@@ -1,38 +1,13 @@
-//
-// TextRun.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
+using System.ComponentModel;
 using System.Linq;
-using System.Text;
-using System.Diagnostics;
-using Crow.Cairo;
 using System.Text.RegularExpressions;
-using System.Xml.Serialization;
-using System.ComponentModel;
+using Crow.Cairo;
 
 namespace Crow
 {
@@ -40,8 +15,8 @@ namespace Crow
        public class TextRun : Widget
        {
                #region CTOR
-               protected TextRun () : base(){}
-               public TextRun (Interface iface) : base (iface){}
+               protected TextRun () {}
+               public TextRun (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                //TODO:change protected to private
index af86ab7d9be1f7a1da43a96c7fc69d58a7fc65ab..87d220068eb9d07dffb75a1da32bdd184a95e19c 100644 (file)
@@ -1,32 +1,8 @@
-//
-// TreeView.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
-using System.Diagnostics;
 using System.ComponentModel;
 
 namespace Crow
@@ -39,10 +15,8 @@ namespace Crow
                bool isRoot;
 
                #region CTOR
-               protected TreeView() : base(){}
-               public TreeView (Interface iface) : base(iface)
-               {
-               }
+               protected TreeView() {}
+               public TreeView (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                [DefaultValue(false)]
index b62fd2f2bd976c5e9a22c2bb9e03201df80985d8..414ee82a15d180c049671a6987959740d07c22ca 100644 (file)
@@ -1,32 +1,8 @@
-//
-// Trend.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
+
 using System.Collections.Generic;
-using System.Xml.Serialization;
 using System.ComponentModel;
 using Crow.Cairo;
 
@@ -41,20 +17,19 @@ namespace Crow
                List<double> values = new List<double>();
                #endregion
 
+               #region CTOR
+               protected Trend () {}
+               public Trend (Interface iface, string style = null) : base (iface, style) { }
+               #endregion
 
-
-               public virtual void AddValue(double _value)
+               public virtual void AddValue (double _value)
                {
                        values.Add (_value);
                        while (values.Count > nbValues)
                                values.RemoveAt (0);
                        RegisterForRedraw ();
                }
-               #region CTOR
-               protected Trend () : base()
-               {
-               }
-               #endregion
+
                [XmlIgnore]public virtual int NewValue {
                        set {
                                AddValue (value);
index cf0a251a6fe39a10afa31de57216c462c1928f67..a0574ce2cc0cf0e2eb07318f0c8c01b09b9b54f8 100644 (file)
@@ -1,54 +1,22 @@
-//
-// VerticalStack.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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 System.Collections.Generic;
-using System.Linq;
-using System.Text;
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 namespace Crow
 {
        /// <summary>
        /// group control stacking its children vertically
        /// </summary>
-    public class VerticalStack : GenericStack
-    {
+       public class VerticalStack : GenericStack
+       {
                #region CTOR
-               protected VerticalStack() : base(){}
-               public VerticalStack(Interface iface) : base(iface)
-        {
-        }
+               protected VerticalStack () { }
+               public VerticalStack (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
-        [XmlIgnore]
-        public override Orientation Orientation
-        {
-            get { return Orientation.Vertical; }            
-        }
-
-
-    }
+               [XmlIgnore]
+               public override Orientation Orientation {
+                       get => Orientation.Vertical; 
+               }
+       }
 }
index d2cf5bcb391290537d675a0d322b542793905537..b103ac56ddd92f51cd33603d96ca085804f14c3d 100644 (file)
@@ -5,7 +5,6 @@
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
-using System.Xml.Serialization;
 using System.Reflection;
 using System.Reflection.Emit;
 using System.Runtime.CompilerServices;
@@ -238,8 +237,9 @@ namespace Crow
                /// compiler will not create it automatically because of the presence of the other one.
                /// </summary>
                /// <param name="iface">Iface.</param>
-               public Widget (Interface iface) : this()
+               public Widget (Interface iface, string style = null) : this()
                {
+                       this.style = style;
                        IFace = iface;
                        Initialize ();
                }
index 21d5cf82b76c56790927b6d3dd20781fae33ce0f..ddf730ade09966efd8899be67d651707450b7a1e 100644 (file)
@@ -3,9 +3,7 @@
 // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 using System;
-using System.Xml.Serialization;
 using System.ComponentModel;
-using System.Diagnostics;
 using Glfw;
 
 namespace Crow
@@ -47,8 +45,8 @@ namespace Crow
                #endregion
 
                #region CTOR
-               protected Window() : base(){}
-               public Window (Interface iface) : base(iface){}
+               protected Window() {}
+               public Window (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #region TemplatedContainer overrides
index a170e3907512852b7f967fb28c1d583cab71ba46..7170d1eda051df5ca8f1d29cee6e83b786def571 100644 (file)
@@ -1,30 +1,6 @@
-//
-// Wrapper.cs
+// Copyright (c) 2013-2020  Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
 //
-// Author:
-//       Jean-Philippe Bruyère <jp.bruyere@hotmail.com>
-//
-// 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;
+// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
 
 namespace Crow
 {
@@ -35,8 +11,8 @@ namespace Crow
        public class Wrapper : GenericStack
        {
                #region CTOR
-               protected Wrapper() : base(){}
-               public Wrapper (Interface iface) : base(iface){}
+               protected Wrapper() {}
+               public Wrapper (Interface iface, string style = null) : base (iface, style) { }
                #endregion
 
                #region Group Overrides
index f7ccf224fb4560e73f8528ccf12f37feda7f58bc..d4e56de9402e135479e20d1c34e496b69c643883 100644 (file)
@@ -159,7 +159,7 @@ namespace Crow
                                                                iFace.Styling [tc] = new Style ();
                                                        iFace.Styling [tc] [currentProperty] = token;
 #if DESIGN_MODE
-                                               styling [tc].Locations[currentProperty] = new FileLocation(resId, line, column - token.Length - 1, token.Length);
+                                                       iFace.Styling [tc].Locations[currentProperty] = new FileLocation(resId, line, column - token.Length - 1, token.Length);
 #endif
                                                }
                                                curState = States.members;
index 1a9340d5c087afd9275a20fa1f8cca47fb809dc1..e32b608011e2187875f59be2103773949cdd0f6b 100644 (file)
@@ -37,7 +37,7 @@ namespace tests
                        //testFiles = new string [] { @"Interfaces/TemplatedGroup/3.crow" };
                        //testFiles = new string [] { @"Interfaces/Divers/testShape.crow" };
                        //testFiles = new string [] { @"Interfaces/TemplatedControl/testEnumSelector.crow" };
-                       testFiles = new string [] { @"Interfaces/TemplatedControl/testSpinner.crow" };
+                       testFiles = new string [] { @"Interfaces/Divers/all.crow" };
                        //testFiles = new string [] { @"Interfaces/Divers/colorPicker2.crow" };
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/GraphicObject", "*.crow")).ToArray ();
                        testFiles = testFiles.Concat (Directory.GetFiles (@"Interfaces/Container", "*.crow")).ToArray ();
index d2f140e7bdd713975a366e93146ef59b2a787868..1a85bb222a3324402ef4ed3ce3dff125eb5f301f 100644 (file)
@@ -1,6 +1,6 @@
 <Project>
        <PropertyGroup>
-               <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+               <TargetFrameworks>net472</TargetFrameworks>
                <OutputType>Exe</OutputType>
                
                <RootDirectory>$(MSBuildThisFileDirectory)</RootDirectory>        
@@ -16,7 +16,6 @@
                <SamplesDir>$(SolutionDir)Samples\</SamplesDir>
        </PropertyGroup>
        
-
        <ItemGroup>
          <PackageReference Include="DllMapCore" Version="0.1.0" Condition="'$(TargetFramework)'=='netcoreapp3.1'" />
                <ProjectReference Include="$(SolutionDir)Crow\Crow.csproj" />
index 73ccdffd33abebb965f42692c4b7937256faeed9..b3facb0e27ccfb9662d805f9409791fe04ddb519 100644 (file)
@@ -1,2 +1,2 @@
 <?xml version="1.0"?>
-<Label Text="Hello world"/>
\ No newline at end of file
+<Label Text="Hello world -|${TestCst}|-"/>
\ No newline at end of file
index ff9563256ebd31a9756248af62ff94f760b9a157..9c382e6a20330fba0f6accabd89ea6883bddaf63 100644 (file)
@@ -1,3 +1,5 @@
+TestCst = "This is a constant test.";
+
 FpsLabel {
        Width = "30";
        Font = "droid, 10";
diff --git a/Samples/common/ui/Interfaces/Divers/all.crow b/Samples/common/ui/Interfaces/Divers/all.crow
new file mode 100644 (file)
index 0000000..e553e02
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<VerticalStack Name="TopContainer" Margin="100" Background="DarkGrey" Spacing="10">
+       <VerticalStack Width="200" Height="Fit" Spacing="5">
+               <Label/>
+               <TextBox />
+               <Button />
+               <CheckBox />
+               <RadioButton/>
+               <Spinner/>                      
+               <Slider />
+               <Popper />
+               <Expandable />
+       </VerticalStack>
+               
+       <Widget Width="200" Height="20" Background="Teal"/>
+       <Widget Width="200" Height="20" Background="SeaGreen"/>
+       <Widget Width="200" Height="20" Background="MediumSeaGreen"/>
+       <Widget Width="200" Height="20" Background="DarkSlateGrey"/>
+       <Widget Width="200" Height="20" Background="RoyalBlue"/>
+       <Widget Width="200" Height="20" Background="SteelBlue"/>
+       <Widget Width="200" Height="20" Background="CornflowerBlue"/>
+       <Widget Width="200" Height="20" Background="Brown"/>    
+       <Widget Width="200" Height="20" Background="FireBrick"/>
+</VerticalStack>
\ No newline at end of file
index 89cd472eec85e2267e640754f9944cda9c4441b6..f0271855484ada605be2b85a0502756729f4ac09 100644 (file)
@@ -1,12 +1,20 @@
 <?xml version="1.0"?>
-<VerticalStack Name="TopContainer" Width="400" Height="Fit"
-       Margin="20" Background="DarkGrey">
+<VerticalStack Name="TopContainer" Margin="100" Background="DarkGrey" Spacing="10">
        <Spinner/>
        <Spinner Width="Fit"/>
        <Spinner Width="120"/>
-       <HorizontalStack Fit="true" Margin="5" Background="SkyBlue">
+       <HorizontalStack Fit="true" Margin="5" Background="DarkSlateGrey">
                <Spinner Name="sp1" Value="5" ValueChanged="onSpinnerValueChange"/>
-               <Spinner Value="5" Width="60"/>
+               <Spinner Value="5" Width="80"/>
                <Spinner Value="5"/>
        </HorizontalStack>
+       <Widget Width="200" Height="20" Background="Teal"/>
+       <Widget Width="200" Height="20" Background="SeaGreen"/>
+       <Widget Width="200" Height="20" Background="MediumSeaGreen"/>
+       <Widget Width="200" Height="20" Background="DarkSlateGrey"/>
+       <Widget Width="200" Height="20" Background="RoyalBlue"/>
+       <Widget Width="200" Height="20" Background="SteelBlue"/>
+       <Widget Width="200" Height="20" Background="CornflowerBlue"/>
+       <Widget Width="200" Height="20" Background="Brown"/>    
+       <Widget Width="200" Height="20" Background="FireBrick"/>
 </VerticalStack>
\ No newline at end of file