aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/AnalogMeter.cs8
-rw-r--r--src/GraphicObjects/Border.cs1
-rw-r--r--src/GraphicObjects/Button.cs10
-rw-r--r--src/GraphicObjects/CheckBox.cs8
-rw-r--r--src/GraphicObjects/ColorPicker.cs7
-rw-r--r--src/GraphicObjects/ColorSelector.cs7
-rw-r--r--src/GraphicObjects/ComboBox.cs5
-rw-r--r--src/GraphicObjects/Container.cs15
-rw-r--r--src/GraphicObjects/DirectoryView.cs5
-rw-r--r--src/GraphicObjects/DummyTemplate.cs38
-rw-r--r--src/GraphicObjects/Expandable.cs5
-rw-r--r--src/GraphicObjects/FileDialog.cs11
-rw-r--r--src/GraphicObjects/GenericStack.cs6
-rw-r--r--src/GraphicObjects/GraduatedSlider.cs19
-rw-r--r--src/GraphicObjects/GraphicObject.cs52
-rw-r--r--src/GraphicObjects/Grid.cs4
-rw-r--r--src/GraphicObjects/Group.cs4
-rw-r--r--src/GraphicObjects/GroupBox.cs3
-rw-r--r--src/GraphicObjects/HorizontalStack.cs6
-rw-r--r--src/GraphicObjects/HueSelector.cs5
-rw-r--r--src/GraphicObjects/Image.cs3
-rw-r--r--src/GraphicObjects/Label.cs14
-rw-r--r--src/GraphicObjects/ListBox.cs3
-rw-r--r--src/GraphicObjects/Menu.cs3
-rw-r--r--src/GraphicObjects/MenuItem.cs3
-rw-r--r--src/GraphicObjects/MessageBox.cs9
-rw-r--r--src/GraphicObjects/NumericControl.cs11
-rw-r--r--src/GraphicObjects/Popper.cs5
-rw-r--r--src/GraphicObjects/PrivateContainer.cs6
-rw-r--r--src/GraphicObjects/ProgressBar.cs3
-rw-r--r--src/GraphicObjects/RadioButton.cs3
-rw-r--r--src/GraphicObjects/SaturationValueSelector.cs3
-rw-r--r--src/GraphicObjects/ScrollBar.cs3
-rw-r--r--src/GraphicObjects/Scroller.cs8
-rw-r--r--src/GraphicObjects/ScrollingObject.cs5
-rw-r--r--src/GraphicObjects/ScrollingTextBox.cs3
-rw-r--r--src/GraphicObjects/Slider.cs11
-rw-r--r--src/GraphicObjects/Spinner.cs8
-rw-r--r--src/GraphicObjects/Splitter.cs3
-rw-r--r--src/GraphicObjects/TabItem.cs3
-rw-r--r--src/GraphicObjects/TabView.cs3
-rw-r--r--src/GraphicObjects/TemplatedContainer.cs3
-rw-r--r--src/GraphicObjects/TemplatedControl.cs5
-rw-r--r--src/GraphicObjects/TemplatedGroup.cs7
-rw-r--r--src/GraphicObjects/TextBox.cs13
-rw-r--r--src/GraphicObjects/TextRun.cs11
-rw-r--r--src/GraphicObjects/TreeView.cs3
-rw-r--r--src/GraphicObjects/VerticalStack.cs4
-rw-r--r--src/GraphicObjects/Window.cs5
-rw-r--r--src/GraphicObjects/Wrapper.cs6
50 files changed, 179 insertions, 210 deletions
diff --git a/src/GraphicObjects/AnalogMeter.cs b/src/GraphicObjects/AnalogMeter.cs
index 3875df15..fba58d9d 100644
--- a/src/GraphicObjects/AnalogMeter.cs
+++ b/src/GraphicObjects/AnalogMeter.cs
@@ -34,12 +34,8 @@ namespace Crow
public class AnalogMeter : NumericControl
{
#region CTOR
- public AnalogMeter() : base()
- {}
- public AnalogMeter(double minimum, double maximum, double step)
- : base(minimum,maximum,step)
- {
- }
+ public AnalogMeter () : base(){}
+ public AnalogMeter (Interface iface) : base(iface){}
#endregion
#region GraphicObject Overrides
diff --git a/src/GraphicObjects/Border.cs b/src/GraphicObjects/Border.cs
index ef210b57..6ac97d7f 100644
--- a/src/GraphicObjects/Border.cs
+++ b/src/GraphicObjects/Border.cs
@@ -41,6 +41,7 @@ namespace Crow
{
#region CTOR
public Border () : base(){}
+ public Border (Interface iface) : base(iface){}
#endregion
#region private fields
diff --git a/src/GraphicObjects/Button.cs b/src/GraphicObjects/Button.cs
index 75f43014..4f791ed9 100644
--- a/src/GraphicObjects/Button.cs
+++ b/src/GraphicObjects/Button.cs
@@ -40,15 +40,15 @@ namespace Crow
{
public class Button : TemplatedContainer
{
+ #region CTOR
+ public Button() : base() {}
+ public Button (Interface iface) : base(iface){}
+ #endregion
+
string image;
bool isPressed;
Container _contentContainer;
- #region CTOR
- public Button() : base()
- {}
- #endregion
-
public event EventHandler Pressed;
public event EventHandler Released;
diff --git a/src/GraphicObjects/CheckBox.cs b/src/GraphicObjects/CheckBox.cs
index 0a40d269..3a63ba2c 100644
--- a/src/GraphicObjects/CheckBox.cs
+++ b/src/GraphicObjects/CheckBox.cs
@@ -32,13 +32,13 @@ namespace Crow
{
public class CheckBox : TemplatedControl
{
- bool isChecked;
-
#region CTOR
- public CheckBox() : base()
- {}
+ public CheckBox () : base(){}
+ public CheckBox (Interface iface) : base(iface){}
#endregion
+ bool isChecked;
+
public event EventHandler Checked;
public event EventHandler Unchecked;
diff --git a/src/GraphicObjects/ColorPicker.cs b/src/GraphicObjects/ColorPicker.cs
index 02496b3b..b47e8ffc 100644
--- a/src/GraphicObjects/ColorPicker.cs
+++ b/src/GraphicObjects/ColorPicker.cs
@@ -32,9 +32,10 @@ namespace Crow
{
public class ColorPicker : TemplatedControl
{
- public ColorPicker () : base ()
- {
- }
+ #region CTOR
+ public ColorPicker () : base(){}
+ public ColorPicker (Interface iface) : base(iface){}
+ #endregion
const double div = 255.0;
const double colDiv = 1.0 / div;
diff --git a/src/GraphicObjects/ColorSelector.cs b/src/GraphicObjects/ColorSelector.cs
index c9f3a198..4dfc68f6 100644
--- a/src/GraphicObjects/ColorSelector.cs
+++ b/src/GraphicObjects/ColorSelector.cs
@@ -32,9 +32,10 @@ namespace Crow
{
public class ColorSelector : GraphicObject
{
- public ColorSelector (): base()
- {
- }
+ #region CTOR
+ public ColorSelector () : base(){}
+ public ColorSelector (Interface iface) : base(iface){}
+ #endregion
const double div = 255.0;
const double colDiv = 1.0 / div;
diff --git a/src/GraphicObjects/ComboBox.cs b/src/GraphicObjects/ComboBox.cs
index 15b49dbe..85a04608 100644
--- a/src/GraphicObjects/ComboBox.cs
+++ b/src/GraphicObjects/ComboBox.cs
@@ -30,9 +30,10 @@ using System.Xml.Serialization;
namespace Crow
{
public class ComboBox : ListBox
- {
+ {
#region CTOR
- public ComboBox() : base(){ }
+ public ComboBox () : base(){}
+ public ComboBox (Interface iface) : base(iface){}
#endregion
Size minimumPopupSize = "10,10";
diff --git a/src/GraphicObjects/Container.cs b/src/GraphicObjects/Container.cs
index df14b8e2..c7dfd78b 100644
--- a/src/GraphicObjects/Container.cs
+++ b/src/GraphicObjects/Container.cs
@@ -36,17 +36,18 @@ namespace Crow
public class Container : PrivateContainer
{
#region CTOR
- public Container()
- : base()
- {
- }
+ public Container () : base(){}
+ public Container (Interface iface) : base(iface){}
#endregion
- [XmlIgnore]
- public GraphicObject Child {
+ [XmlIgnore]public GraphicObject Child {
get { return child; }
- set { child = value; }
+ set { base.SetChild(value); }
}
+ /// <summary>
+ /// override this to handle specific steps in child addition in derived class,
+ /// and don't forget to call the base.SetChild
+ /// </summary>
public virtual void SetChild(GraphicObject _child)
{
base.SetChild (_child);
diff --git a/src/GraphicObjects/DirectoryView.cs b/src/GraphicObjects/DirectoryView.cs
index 98477cba..ab5d4aba 100644
--- a/src/GraphicObjects/DirectoryView.cs
+++ b/src/GraphicObjects/DirectoryView.cs
@@ -34,9 +34,8 @@ namespace Crow
public class DirectoryView : TemplatedControl
{
#region CTOR
- public DirectoryView ()
- : base()
- {}
+ public DirectoryView () : base(){}
+ public DirectoryView (Interface iface) : base(iface){}
#endregion
#region events
diff --git a/src/GraphicObjects/DummyTemplate.cs b/src/GraphicObjects/DummyTemplate.cs
deleted file mode 100644
index 65d9e081..00000000
--- a/src/GraphicObjects/DummyTemplate.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// DummyTemplate.cs
-//
-// 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;
-
-namespace Crow
-{
- public class DummyTemplate : TemplatedControl
- {
- public DummyTemplate () : base()
- {
- }
- }
-}
-
diff --git a/src/GraphicObjects/Expandable.cs b/src/GraphicObjects/Expandable.cs
index 1cb36450..243caf06 100644
--- a/src/GraphicObjects/Expandable.cs
+++ b/src/GraphicObjects/Expandable.cs
@@ -33,9 +33,8 @@ namespace Crow
public class Expandable : TemplatedContainer
{
#region CTOR
- public Expandable() : base()
- {
- }
+ public Expandable () : base(){}
+ public Expandable (Interface iface) : base(iface){}
#endregion
#region Private fields
diff --git a/src/GraphicObjects/FileDialog.cs b/src/GraphicObjects/FileDialog.cs
index 8182e021..550e2eaf 100644
--- a/src/GraphicObjects/FileDialog.cs
+++ b/src/GraphicObjects/FileDialog.cs
@@ -37,18 +37,17 @@ namespace Crow
{
public class FileDialog: Window
{
+ #region CTOR
+ public FileDialog () : base(){}
+ public FileDialog (Interface iface) : base(iface){}
+ #endregion
+
string searchPattern, curDir, _selectedFile, _selectedDir;
#region events
public event EventHandler OkClicked;
#endregion
- #region CTOR
- public FileDialog () : base()
- {
- }
- #endregion
-
[XmlAttributeAttribute][DefaultValue("/home")]
public virtual string CurrentDirectory {
get { return curDir; }
diff --git a/src/GraphicObjects/GenericStack.cs b/src/GraphicObjects/GenericStack.cs
index cecdaffd..e52485ac 100644
--- a/src/GraphicObjects/GenericStack.cs
+++ b/src/GraphicObjects/GenericStack.cs
@@ -34,10 +34,8 @@ namespace Crow
public class GenericStack : Group
{
#region CTOR
- public GenericStack()
- : base()
- {
- }
+ public GenericStack () : base(){}
+ public GenericStack(Interface iface) : base(iface){}
#endregion
#region Private fields
diff --git a/src/GraphicObjects/GraduatedSlider.cs b/src/GraphicObjects/GraduatedSlider.cs
index 0721e767..b8d7d581 100644
--- a/src/GraphicObjects/GraduatedSlider.cs
+++ b/src/GraphicObjects/GraduatedSlider.cs
@@ -36,16 +36,17 @@ namespace Crow
public class GraduatedSlider : Slider
{
#region CTOR
- public GraduatedSlider() : base()
+ public GraduatedSlider () : base(){}
+ public GraduatedSlider(Interface iface) : base(iface)
{}
- public GraduatedSlider(double minimum, double maximum, double step)
- : base()
- {
- Minimum = minimum;
- Maximum = maximum;
- SmallIncrement = step;
- LargeIncrement = step * 5;
- }
+// public GraduatedSlider(double minimum, double maximum, double step)
+// : base()
+// {
+// Minimum = minimum;
+// Maximum = maximum;
+// SmallIncrement = step;
+// LargeIncrement = step * 5;
+// }
#endregion
protected override void DrawGraduations(Context gr, PointD pStart, PointD pEnd)
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 1ba524d7..954c08e7 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -64,17 +64,17 @@ namespace Crow
if (IsQueueForRedraw)
throw new Exception("Trying to dispose an object queued for Redraw: " + this.ToString());
#endif
- if (currentInterface.HoverWidget != null) {
- if (currentInterface.HoverWidget.IsOrIsInside(this))
- currentInterface.HoverWidget = null;
+ if (CurrentInterface.HoverWidget != null) {
+ if (CurrentInterface.HoverWidget.IsOrIsInside(this))
+ CurrentInterface.HoverWidget = null;
}
- if (currentInterface.ActiveWidget != null) {
- if (currentInterface.ActiveWidget.IsOrIsInside (this))
- currentInterface.ActiveWidget = null;
+ if (CurrentInterface.ActiveWidget != null) {
+ if (CurrentInterface.ActiveWidget.IsOrIsInside (this))
+ CurrentInterface.ActiveWidget = null;
}
- if (currentInterface.FocusedWidget != null) {
- if (currentInterface.FocusedWidget.IsOrIsInside (this))
- currentInterface.FocusedWidget = null;
+ if (CurrentInterface.FocusedWidget != null) {
+ if (CurrentInterface.FocusedWidget.IsOrIsInside (this))
+ CurrentInterface.FocusedWidget = null;
}
if (!localDataSourceIsNull)
DataSource = null;
@@ -91,20 +91,7 @@ namespace Crow
internal static ulong currentUid = 0;
internal ulong uid = 0;
- Interface currentInterface = null;
-
- [XmlIgnore]public Interface CurrentInterface {
- get {
- if (currentInterface == null) {
- currentInterface = Interface.CurrentInterface;
- Initialize ();
- }
- return currentInterface;
- }
- set {
- currentInterface = value;
- }
- }
+ public Interface CurrentInterface = null;
public Region Clipping;
@@ -118,13 +105,20 @@ namespace Crow
#endregion
#region CTOR
- public GraphicObject ()
- {
+ /// <summary>
+ /// default private parameter less constructor use in instantiators
+ /// </summary>
+ protected GraphicObject () {
Clipping = new Region ();
#if DEBUG
uid = currentUid;
currentUid++;
- #endif
+ #endif
+ }
+ public GraphicObject (Interface iface) : this()
+ {
+ CurrentInterface = iface;
+ Initialize ();
}
#endregion
internal bool initialized = false;
@@ -132,8 +126,8 @@ namespace Crow
/// Initialize this Graphic object instance by setting style and default values and loading template if required
/// </summary>
public virtual void Initialize(){
- if (currentInterface == null)
- currentInterface = Interface.CurrentInterface;
+// if (CurrentInterface == null)
+// CurrentInterface = Interface.CurrentInterface;
loadDefaultValues ();
initialized = true;
}
@@ -1336,7 +1330,7 @@ namespace Crow
if (CurrentInterface.eligibleForDoubleClick == this && CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick)
onMouseDoubleClick (this, e);
else
- currentInterface.clickTimer.Restart();
+ CurrentInterface.clickTimer.Restart();
CurrentInterface.eligibleForDoubleClick = null;
if (CurrentInterface.ActiveWidget == null)
diff --git a/src/GraphicObjects/Grid.cs b/src/GraphicObjects/Grid.cs
index 3d1847a2..5756525e 100644
--- a/src/GraphicObjects/Grid.cs
+++ b/src/GraphicObjects/Grid.cs
@@ -43,8 +43,8 @@ namespace Crow
public class Grid : Group
{
#region CTOR
- public Grid()
- : base()
+ public Grid () : base(){}
+ public Grid(Interface iface) : base(iface)
{
}
#endregion
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs
index e4e9ba20..551db889 100644
--- a/src/GraphicObjects/Group.cs
+++ b/src/GraphicObjects/Group.cs
@@ -38,8 +38,8 @@ namespace Crow
public class Group : GraphicObject
{
#region CTOR
- public Group()
- : base(){}
+ public Group () : base(){}
+ public Group(Interface iface) : base(iface){}
#endregion
#region EVENT HANDLERS
diff --git a/src/GraphicObjects/GroupBox.cs b/src/GraphicObjects/GroupBox.cs
index 9cabbb51..ad79231e 100644
--- a/src/GraphicObjects/GroupBox.cs
+++ b/src/GraphicObjects/GroupBox.cs
@@ -35,7 +35,8 @@ namespace Crow
Container _contentContainer;
#region CTOR
- public GroupBox() : base(){}
+ public GroupBox () : base(){}
+ public GroupBox(Interface iface) : base(iface){}
#endregion
#region Template overrides
diff --git a/src/GraphicObjects/HorizontalStack.cs b/src/GraphicObjects/HorizontalStack.cs
index 620dab22..13ed4cb5 100644
--- a/src/GraphicObjects/HorizontalStack.cs
+++ b/src/GraphicObjects/HorizontalStack.cs
@@ -34,10 +34,12 @@ namespace Crow
{
public class HorizontalStack : GenericStack
{
- public HorizontalStack()
- : base()
+ #region CTOR
+ public HorizontalStack () : base(){}
+ public HorizontalStack(Interface iface) : base(iface)
{
}
+ #endregion
[XmlIgnore]
public override Orientation Orientation
diff --git a/src/GraphicObjects/HueSelector.cs b/src/GraphicObjects/HueSelector.cs
index 365cc72a..a94053fd 100644
--- a/src/GraphicObjects/HueSelector.cs
+++ b/src/GraphicObjects/HueSelector.cs
@@ -33,9 +33,12 @@ namespace Crow
{
public class HueSelector : ColorSelector
{
- public HueSelector () : base()
+ #region CTOR
+ public HueSelector () : base(){}
+ public HueSelector (Interface iface) : base(iface)
{
}
+ #endregion
Orientation _orientation;
double hue;
diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs
index 6a4c590d..3ec49d37 100644
--- a/src/GraphicObjects/Image.cs
+++ b/src/GraphicObjects/Image.cs
@@ -125,7 +125,8 @@ namespace Crow
#endregion
#region CTOR
- public Image () : base()
+ public Image () : base(){}
+ public Image (Interface iface) : base(iface)
{
}
#endregion
diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs
index e477c3f6..7c7c584c 100644
--- a/src/GraphicObjects/Label.cs
+++ b/src/GraphicObjects/Label.cs
@@ -38,15 +38,17 @@ namespace Crow
public class Label : GraphicObject
{
#region CTOR
- public Label()
- {
+ public Label () : base(){}
- }
- public Label(string _text)
- : base()
+ public Label(Interface iface) : base(iface)
{
- Text = _text;
+
}
+// public Label(string _text)
+// : base()
+// {
+// Text = _text;
+// }
#endregion
public event EventHandler<TextChangeEventArgs> TextChanged;
diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs
index f66edf61..67e4b583 100644
--- a/src/GraphicObjects/ListBox.cs
+++ b/src/GraphicObjects/ListBox.cs
@@ -39,7 +39,8 @@ namespace Crow
public class ListBox : TemplatedGroup
{
#region CTOR
- public ListBox () : base() {}
+ public ListBox () : base(){}
+ public ListBox (Interface iface) : base(iface) {}
#endregion
}
diff --git a/src/GraphicObjects/Menu.cs b/src/GraphicObjects/Menu.cs
index 50494815..d7a7f5a6 100644
--- a/src/GraphicObjects/Menu.cs
+++ b/src/GraphicObjects/Menu.cs
@@ -33,7 +33,8 @@ namespace Crow
public class Menu : TemplatedGroup
{
#region CTOR
- public Menu () : base() {}
+ public Menu () : base(){}
+ public Menu (Interface iface) : base(iface) {}
#endregion
Orientation orientation;
diff --git a/src/GraphicObjects/MenuItem.cs b/src/GraphicObjects/MenuItem.cs
index 0d99a2eb..5565ace3 100644
--- a/src/GraphicObjects/MenuItem.cs
+++ b/src/GraphicObjects/MenuItem.cs
@@ -33,7 +33,8 @@ namespace Crow
public class MenuItem : Menu
{
#region CTOR
- public MenuItem () : base() {}
+ public MenuItem () : base(){}
+ public MenuItem (Interface iface) : base(iface) {}
#endregion
public event EventHandler Open;
diff --git a/src/GraphicObjects/MessageBox.cs b/src/GraphicObjects/MessageBox.cs
index d8ce1dae..0e308bf9 100644
--- a/src/GraphicObjects/MessageBox.cs
+++ b/src/GraphicObjects/MessageBox.cs
@@ -32,13 +32,17 @@ namespace Crow
{
public class MessageBox : Window
{
+ #region CTOR
+ public MessageBox () : base(){}
+ public MessageBox (Interface iface) : base(iface){}
+ #endregion
+
public enum Type {
Information,
YesNo,
Alert,
Error
}
- public MessageBox (): base(){}
protected override void loadTemplate (GraphicObject template)
{
@@ -133,8 +137,7 @@ namespace Crow
}
public static MessageBox Show (Type msgBoxType, string message, string okMsg = "", string cancelMsg = ""){
lock (Interface.CurrentInterface.UpdateMutex) {
- MessageBox mb = new MessageBox ();
- mb.Initialize ();
+ MessageBox mb = new MessageBox (Interface.CurrentInterface);
mb.CurrentInterface.AddWidget (mb);
mb.MsgType = msgBoxType;
mb.Message = message;
diff --git a/src/GraphicObjects/NumericControl.cs b/src/GraphicObjects/NumericControl.cs
index 8ab60edb..d8fdead4 100644
--- a/src/GraphicObjects/NumericControl.cs
+++ b/src/GraphicObjects/NumericControl.cs
@@ -33,13 +33,14 @@ namespace Crow
public abstract class NumericControl : TemplatedControl
{
#region CTOR
- public NumericControl () : base()
- {
- }
- public NumericControl(double minimum, double maximum, double step)
- : base()
+ public NumericControl () : base(){}
+ public NumericControl (Interface iface) : base(iface)
{
}
+// public NumericControl(double minimum, double maximum, double step)
+// : base()
+// {
+// }
#endregion
#region private fields
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs
index 72a3fa8d..9f60aa40 100644
--- a/src/GraphicObjects/Popper.cs
+++ b/src/GraphicObjects/Popper.cs
@@ -33,9 +33,8 @@ namespace Crow
public class Popper : TemplatedContainer
{
#region CTOR
- public Popper() : base()
- {
- }
+ public Popper () : base(){}
+ public Popper (Interface iface) : base(iface){}
#endregion
bool _isPopped, _canPop;
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index c40bceb4..f25190ea 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -41,10 +41,8 @@ namespace Crow
public class PrivateContainer : GraphicObject
{
#region CTOR
- public PrivateContainer()
- : base()
- {
- }
+ public PrivateContainer () : base(){}
+ public PrivateContainer (Interface iface) : base(iface){}
#endregion
protected GraphicObject child;
diff --git a/src/GraphicObjects/ProgressBar.cs b/src/GraphicObjects/ProgressBar.cs
index 34366ca7..2995272b 100644
--- a/src/GraphicObjects/ProgressBar.cs
+++ b/src/GraphicObjects/ProgressBar.cs
@@ -39,7 +39,8 @@ namespace Crow
public class ProgressBar : NumericControl
{
#region CTOR
- public ProgressBar() : base(){}
+ public ProgressBar () : base(){}
+ public ProgressBar(Interface iface) : base(iface){}
#endregion
protected override void loadTemplate (GraphicObject template)
diff --git a/src/GraphicObjects/RadioButton.cs b/src/GraphicObjects/RadioButton.cs
index 993ead59..bf31a42c 100644
--- a/src/GraphicObjects/RadioButton.cs
+++ b/src/GraphicObjects/RadioButton.cs
@@ -35,7 +35,8 @@ namespace Crow
bool isChecked;
#region CTOR
- public RadioButton() : base(){}
+ public RadioButton () : base(){}
+ public RadioButton(Interface iface) : base(iface){}
#endregion
public event EventHandler Checked;
diff --git a/src/GraphicObjects/SaturationValueSelector.cs b/src/GraphicObjects/SaturationValueSelector.cs
index 39c324f4..fb3cbf48 100644
--- a/src/GraphicObjects/SaturationValueSelector.cs
+++ b/src/GraphicObjects/SaturationValueSelector.cs
@@ -32,7 +32,8 @@ namespace Crow
{
public class SaturationValueSelector : ColorSelector
{
- public SaturationValueSelector () : base()
+ public SaturationValueSelector () : base(){}
+ public SaturationValueSelector (Interface iface) : base(iface)
{
}
diff --git a/src/GraphicObjects/ScrollBar.cs b/src/GraphicObjects/ScrollBar.cs
index ca258aae..75a3b2db 100644
--- a/src/GraphicObjects/ScrollBar.cs
+++ b/src/GraphicObjects/ScrollBar.cs
@@ -35,7 +35,8 @@ namespace Crow
Orientation _orientation;
#region CTOR
- public ScrollBar() : base() {}
+ public ScrollBar () : base(){}
+ public ScrollBar(Interface iface) : base(iface) {}
#endregion
[XmlAttributeAttribute()][DefaultValue(Orientation.Vertical)]
diff --git a/src/GraphicObjects/Scroller.cs b/src/GraphicObjects/Scroller.cs
index e38b2205..7f7bd5de 100644
--- a/src/GraphicObjects/Scroller.cs
+++ b/src/GraphicObjects/Scroller.cs
@@ -34,6 +34,11 @@ namespace Crow
{
public class Scroller : Container
{
+ #region CTOR
+ public Scroller () : base(){}
+ public Scroller (Interface iface) : base(iface){}
+ #endregion
+
bool _verticalScrolling;
bool _horizontalScrolling;
bool _scrollbarVisible;
@@ -122,9 +127,6 @@ namespace Crow
}
#endregion
- public Scroller()
- : base(){}
-
#region GraphicObject Overrides
public override void OnLayoutChanges (LayoutingType layoutType)
{
diff --git a/src/GraphicObjects/ScrollingObject.cs b/src/GraphicObjects/ScrollingObject.cs
index 09558984..3d8c942c 100644
--- a/src/GraphicObjects/ScrollingObject.cs
+++ b/src/GraphicObjects/ScrollingObject.cs
@@ -36,9 +36,8 @@ namespace Crow
public class ScrollingObject : GraphicObject
{
#region CTOR
- public ScrollingObject ():base()
- {
- }
+ public ScrollingObject ():base(){}
+ public ScrollingObject (Interface iface):base(iface){}
#endregion
int scrollX, scrollY, maxScrollX, maxScrollY, mouseWheelSpeed;
diff --git a/src/GraphicObjects/ScrollingTextBox.cs b/src/GraphicObjects/ScrollingTextBox.cs
index a435f9ee..0fb9a7b4 100644
--- a/src/GraphicObjects/ScrollingTextBox.cs
+++ b/src/GraphicObjects/ScrollingTextBox.cs
@@ -42,6 +42,9 @@ namespace Crow
public class ScrollingTextBox : ScrollingObject
{
#region CTOR
+ public ScrollingTextBox (Interface iface):base(iface){
+ KeyEventsOverrides = true;
+ }
public ScrollingTextBox ():base()
{
KeyEventsOverrides = true;
diff --git a/src/GraphicObjects/Slider.cs b/src/GraphicObjects/Slider.cs
index 97c8b384..bf43f2fa 100644
--- a/src/GraphicObjects/Slider.cs
+++ b/src/GraphicObjects/Slider.cs
@@ -35,12 +35,13 @@ namespace Crow
public class Slider : NumericControl
{
#region CTOR
- public Slider() : base()
+ public Slider() : base(){}
+ public Slider(Interface iface) : base(iface)
{}
- public Slider(double minimum, double maximum, double step)
- : base(minimum,maximum,step)
- {
- }
+// public Slider(double minimum, double maximum, double step)
+// : base(minimum,maximum,step)
+// {
+// }
#endregion
#region implemented abstract members of TemplatedControl
diff --git a/src/GraphicObjects/Spinner.cs b/src/GraphicObjects/Spinner.cs
index 1bf93a37..c29a2b27 100644
--- a/src/GraphicObjects/Spinner.cs
+++ b/src/GraphicObjects/Spinner.cs
@@ -31,14 +31,10 @@ namespace Crow
public class Spinner : NumericControl
{
#region CTOR
- public Spinner () : base()
+ public Spinner() : base(){}
+ public Spinner (Interface iface) : base(iface)
{
}
- public Spinner (double minimum, double maximum, double step) :
- base (minimum, maximum, step)
- {
-
- }
#endregion
void onUp (object sender, MouseButtonEventArgs e)
diff --git a/src/GraphicObjects/Splitter.cs b/src/GraphicObjects/Splitter.cs
index 2f5dd15b..dab3937b 100644
--- a/src/GraphicObjects/Splitter.cs
+++ b/src/GraphicObjects/Splitter.cs
@@ -33,7 +33,8 @@ namespace Crow
public class Splitter : GraphicObject
{
#region CTOR
- public Splitter (): base(){}
+ public Splitter() : base(){}
+ public Splitter (Interface iface) : base(iface){}
#endregion
int thickness;
diff --git a/src/GraphicObjects/TabItem.cs b/src/GraphicObjects/TabItem.cs
index 7dac5472..2b578d18 100644
--- a/src/GraphicObjects/TabItem.cs
+++ b/src/GraphicObjects/TabItem.cs
@@ -34,7 +34,8 @@ namespace Crow
public class TabItem : TemplatedContainer
{
#region CTOR
- public TabItem () : base() {}
+ public TabItem() : base(){}
+ public TabItem (Interface iface) : base(iface){}
#endregion
#region Private fields
diff --git a/src/GraphicObjects/TabView.cs b/src/GraphicObjects/TabView.cs
index ecf38f10..62ada312 100644
--- a/src/GraphicObjects/TabView.cs
+++ b/src/GraphicObjects/TabView.cs
@@ -35,7 +35,8 @@ namespace Crow
public class TabView : Group
{
#region CTOR
- public TabView () : base() {}
+ public TabView() : base(){}
+ public TabView (Interface iface) : base(iface){}
#endregion
#region Private fields
diff --git a/src/GraphicObjects/TemplatedContainer.cs b/src/GraphicObjects/TemplatedContainer.cs
index b8a32167..c219f9b6 100644
--- a/src/GraphicObjects/TemplatedContainer.cs
+++ b/src/GraphicObjects/TemplatedContainer.cs
@@ -34,7 +34,8 @@ namespace Crow
public abstract class TemplatedContainer : TemplatedControl
{
#region CTOR
- public TemplatedContainer () : base(){}
+ public TemplatedContainer() : base(){}
+ public TemplatedContainer (Interface iface) : base(iface){}
#endregion
[XmlAttributeAttribute]public virtual GraphicObject Content{ get; set;}
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs
index c4ef5788..6476265a 100644
--- a/src/GraphicObjects/TemplatedControl.cs
+++ b/src/GraphicObjects/TemplatedControl.cs
@@ -40,9 +40,8 @@ namespace Crow
public abstract class TemplatedControl : PrivateContainer
{
#region CTOR
- public TemplatedControl () : base()
- {
- }
+ public TemplatedControl() : base(){}
+ public TemplatedControl (Interface iface) : base(iface){}
#endregion
string _template;
diff --git a/src/GraphicObjects/TemplatedGroup.cs b/src/GraphicObjects/TemplatedGroup.cs
index 3d5b7e83..dda03119 100644
--- a/src/GraphicObjects/TemplatedGroup.cs
+++ b/src/GraphicObjects/TemplatedGroup.cs
@@ -39,7 +39,8 @@ namespace Crow
public abstract class TemplatedGroup : TemplatedControl
{
#region CTOR
- public TemplatedGroup () : base(){}
+ public TemplatedGroup() : base(){}
+ public TemplatedGroup (Interface iface) : base(iface){}
#endregion
protected Group items;
@@ -300,9 +301,7 @@ namespace Crow
page = items;
itemPerPage = int.MaxValue;
} else if (typeof(GenericStack).IsAssignableFrom (items.GetType ())) {
- GenericStack gs = new GenericStack ();
- gs.CurrentInterface = items.CurrentInterface;
- gs.Initialize ();
+ GenericStack gs = new GenericStack (items.CurrentInterface);
gs.Orientation = (items as GenericStack).Orientation;
gs.Width = items.Width;
gs.Height = items.Height;
diff --git a/src/GraphicObjects/TextBox.cs b/src/GraphicObjects/TextBox.cs
index 0cbee9f8..2438c65a 100644
--- a/src/GraphicObjects/TextBox.cs
+++ b/src/GraphicObjects/TextBox.cs
@@ -34,13 +34,14 @@ namespace Crow
public class TextBox : Label
{
#region CTOR
- public TextBox()
+ public TextBox() : base(){}
+ public TextBox(Interface iface) : base(iface)
{ }
- public TextBox(string _initialValue)
- : base(_initialValue)
- {
-
- }
+// public TextBox(string _initialValue)
+// : base(_initialValue)
+// {
+//
+// }
#endregion
#region GraphicObject overrides
diff --git a/src/GraphicObjects/TextRun.cs b/src/GraphicObjects/TextRun.cs
index a312ca1e..55ac7f33 100644
--- a/src/GraphicObjects/TextRun.cs
+++ b/src/GraphicObjects/TextRun.cs
@@ -39,15 +39,8 @@ namespace Crow
public class TextRun : GraphicObject
{
#region CTOR
- public TextRun ()
- {
-
- }
- public TextRun (string _text)
- : base ()
- {
- Text = _text;
- }
+ public TextRun () : base(){}
+ public TextRun (Interface iface) : base (iface){}
#endregion
//TODO:change protected to private
diff --git a/src/GraphicObjects/TreeView.cs b/src/GraphicObjects/TreeView.cs
index 6549f148..80c3385f 100644
--- a/src/GraphicObjects/TreeView.cs
+++ b/src/GraphicObjects/TreeView.cs
@@ -39,7 +39,8 @@ namespace Crow
bool isRoot;
#region CTOR
- public TreeView () : base()
+ public TreeView() : base(){}
+ public TreeView (Interface iface) : base(iface)
{
}
#endregion
diff --git a/src/GraphicObjects/VerticalStack.cs b/src/GraphicObjects/VerticalStack.cs
index d5d0236b..23271624 100644
--- a/src/GraphicObjects/VerticalStack.cs
+++ b/src/GraphicObjects/VerticalStack.cs
@@ -33,8 +33,8 @@ namespace Crow
{
public class VerticalStack : GenericStack
{
- public VerticalStack()
- : base()
+ public VerticalStack() : base(){}
+ public VerticalStack(Interface iface) : base(iface)
{
}
diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs
index 7ea4db75..d4087d02 100644
--- a/src/GraphicObjects/Window.cs
+++ b/src/GraphicObjects/Window.cs
@@ -66,9 +66,8 @@ namespace Crow
#endregion
#region CTOR
- public Window () : base() {
-
- }
+ public Window() : base(){}
+ public Window (Interface iface) : base(iface){}
#endregion
#region TemplatedContainer overrides
diff --git a/src/GraphicObjects/Wrapper.cs b/src/GraphicObjects/Wrapper.cs
index 8b282ebb..81dce154 100644
--- a/src/GraphicObjects/Wrapper.cs
+++ b/src/GraphicObjects/Wrapper.cs
@@ -30,8 +30,10 @@ namespace Crow
{
public class Wrapper : GenericStack
{
- public Wrapper () : base()
- {}
+ #region CTOR
+ public Wrapper() : base(){}
+ public Wrapper (Interface iface) : base(iface){}
+ #endregion
#region Group Overrides
public override void ChildrenLayoutingConstraints (ref LayoutingType layoutType)