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}"
<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'))">
<EmbeddedResource Include="Cursors\*.*">
<LogicalName>Crow.Cursors.%(Filename)</LogicalName>
</EmbeddedResource>
+ <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="src\Widgets\ColorPicker2.cs" />
ControlBackground = "Transparent";
+ControlBorderColor = "DimGrey";
+ControlBorderWidth = "1";
+ControlCaptionColor = "LightGrey";
+ControlCaptionHoverColor = "White";
+
+IconSize = "12";
+IconMargin = "1";
Button, CheckBox, RadioButton, ComboBox, Expandable,
MessageBox, Popper, Slider, Spinner, TextBox {
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";
Background = "White";
Foreground = "Black";
Selectable = "True";
- Text = "TextBox";
+ //Text = "TextBox";
Margin = "1";
MouseCursor = "IBeam";
}
--- /dev/null
+// 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 ]
+
<?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"
-//
-// 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
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
#region public properties
/// <summary>
/// use to define the colors of the 3d border
- /// </summary>
-
+ /// </summary>
public virtual Fill RaisedColor {
get { return raisedColor; }
set {
}
/// <summary>
/// use to define the colors of the 3d border
- /// </summary>
-
+ /// </summary>
public virtual Fill SunkenColor {
get { return sunkenColor; }
set {
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 ();
}
-//
-// 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
/// <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;
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;
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;
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;
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
//
// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
-using System;
-using System.Xml.Serialization;
-
namespace Crow
{
/// <summary>
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";
//
// 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)
#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 {
-//
-// 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;
-//
-// 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
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
-//
-// 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
{
#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;
//
// 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
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
-//
-// 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
{
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()
// {
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
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;
-//
-// 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
-
-
-
}
}
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()
// {
// 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;
//
// 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
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
-//
-// 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
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;
-//
-// 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;
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;
-//
-// 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
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)]
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;
-//
-// 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
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;
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;
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)
// {
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)
-//
-// 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
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;
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;
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
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> ();
}
//
// 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>
/// </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)
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;
_contentContainer = this.child.FindByName ("Content") as Container;
}
- #region GraphicObject overrides
+#region GraphicObject overrides
public override Widget FindByName (string nameToFind)
{
if (Name == nameToFind)
return true;
return base.Contains (goToFind);
}
- #endregion
+#endregion
}
}
#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";
#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;
-//
-// 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;
-//
-// 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)
// {
-//
-// 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
{
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
-//
-// 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
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)]
-//
-// 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;
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);
-//
-// 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;
+ }
+ }
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Xml.Serialization;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
/// 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 ();
}
// 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
#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
-//
-// 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
{
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
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;
//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 ();
<Project>
<PropertyGroup>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>net472</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootDirectory>$(MSBuildThisFileDirectory)</RootDirectory>
<SamplesDir>$(SolutionDir)Samples\</SamplesDir>
</PropertyGroup>
-
<ItemGroup>
<PackageReference Include="DllMapCore" Version="0.1.0" Condition="'$(TargetFramework)'=='netcoreapp3.1'" />
<ProjectReference Include="$(SolutionDir)Crow\Crow.csproj" />
<?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
+TestCst = "This is a constant test.";
+
FpsLabel {
Width = "30";
Font = "droid, 10";
--- /dev/null
+<?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
<?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