aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-02-13 18:10:23 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-03-01 05:01:44 +0100
commitfa6dd3d807f7c7c9292b5f4d5cc10406d10e173d (patch)
tree27146a232022554983c8fa92f7be757554774e78 /src/GraphicObjects
parentc7a9d36bd679f827b649e2b792465b127fd577d1 (diff)
base changed done, need mouse state to be updated
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/Button.cs1
-rw-r--r--src/GraphicObjects/CheckBox.cs1
-rw-r--r--src/GraphicObjects/Container.cs1
-rw-r--r--src/GraphicObjects/Expandable.cs1
-rw-r--r--src/GraphicObjects/FileDialog.cs1
-rw-r--r--src/GraphicObjects/GraphicObject.cs8
-rw-r--r--src/GraphicObjects/Image.cs6
-rw-r--r--src/GraphicObjects/Label.cs1
-rw-r--r--src/GraphicObjects/ListBox.cs2
-rw-r--r--src/GraphicObjects/PrivateContainer.cs1
-rw-r--r--src/GraphicObjects/RadioButton.cs1
-rw-r--r--src/GraphicObjects/Scroller.cs11
-rw-r--r--src/GraphicObjects/Slider.cs6
-rw-r--r--src/GraphicObjects/Spinner.cs1
-rw-r--r--src/GraphicObjects/Splitter.cs6
-rw-r--r--src/GraphicObjects/TabItem.cs8
-rw-r--r--src/GraphicObjects/TabView.cs4
-rw-r--r--src/GraphicObjects/TemplatedControl.cs2
-rw-r--r--src/GraphicObjects/TextBox.cs1
-rw-r--r--src/GraphicObjects/TextRun.cs1
-rw-r--r--src/GraphicObjects/Window.cs1
21 files changed, 19 insertions, 46 deletions
diff --git a/src/GraphicObjects/Button.cs b/src/GraphicObjects/Button.cs
index 92d19af6..0b37118c 100644
--- a/src/GraphicObjects/Button.cs
+++ b/src/GraphicObjects/Button.cs
@@ -8,7 +8,6 @@ using System.Diagnostics;
using System.Xml.Serialization;
using Cairo;
-using OpenTK.Input;
using System.ComponentModel;
namespace Crow
diff --git a/src/GraphicObjects/CheckBox.cs b/src/GraphicObjects/CheckBox.cs
index edf6650b..71e686f9 100644
--- a/src/GraphicObjects/CheckBox.cs
+++ b/src/GraphicObjects/CheckBox.cs
@@ -1,5 +1,4 @@
using System;
-using OpenTK.Input;
using System.ComponentModel;
using System.Xml.Serialization;
diff --git a/src/GraphicObjects/Container.cs b/src/GraphicObjects/Container.cs
index 360eee51..cb6145a8 100644
--- a/src/GraphicObjects/Container.cs
+++ b/src/GraphicObjects/Container.cs
@@ -1,7 +1,6 @@
using System;
using System.Xml.Serialization;
using System.Reflection;
-using OpenTK.Input;
using System.ComponentModel;
using System.Linq;
diff --git a/src/GraphicObjects/Expandable.cs b/src/GraphicObjects/Expandable.cs
index 16b3e974..af8b5640 100644
--- a/src/GraphicObjects/Expandable.cs
+++ b/src/GraphicObjects/Expandable.cs
@@ -1,5 +1,4 @@
using System;
-using OpenTK.Input;
using System.ComponentModel;
using System.Xml.Serialization;
diff --git a/src/GraphicObjects/FileDialog.cs b/src/GraphicObjects/FileDialog.cs
index bed42a05..b1c93119 100644
--- a/src/GraphicObjects/FileDialog.cs
+++ b/src/GraphicObjects/FileDialog.cs
@@ -24,7 +24,6 @@ using System.ComponentModel;
using System.IO;
using System.Collections.Generic;
using System.Diagnostics;
-using OpenTK.Input;
using System.Linq;
using System.Text.RegularExpressions;
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 2ddcecca..9f1bf811 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -1,15 +1,13 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Diagnostics;
-using System.Linq;
+using System.Xml.Serialization;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
-using System.Xml.Serialization;
using Cairo;
-using OpenTK.Input;
-using System.IO;
+using System.Linq;
+using System.Diagnostics;
namespace Crow
{
diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs
index 46d081eb..8f02a19e 100644
--- a/src/GraphicObjects/Image.cs
+++ b/src/GraphicObjects/Image.cs
@@ -1,14 +1,10 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using Cairo;
-using System.IO;
-using System.Runtime.InteropServices;
using System.Xml.Serialization;
using System.ComponentModel;
using System.Diagnostics;
+
namespace Crow
{
public class Image : GraphicObject
diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs
index 6782e259..fa2d5828 100644
--- a/src/GraphicObjects/Label.cs
+++ b/src/GraphicObjects/Label.cs
@@ -7,7 +7,6 @@ using Cairo;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using System.ComponentModel;
-using OpenTK.Input;
namespace Crow
{
diff --git a/src/GraphicObjects/ListBox.cs b/src/GraphicObjects/ListBox.cs
index 69e71784..31555306 100644
--- a/src/GraphicObjects/ListBox.cs
+++ b/src/GraphicObjects/ListBox.cs
@@ -1,4 +1,4 @@
-//
+ //
// ListBox.cs
//
// Author:
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index 640e8d0b..3a3d9067 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -21,7 +21,6 @@
using System;
using System.Xml.Serialization;
using System.ComponentModel;
-using OpenTK.Input;
using Cairo;
namespace Crow
diff --git a/src/GraphicObjects/RadioButton.cs b/src/GraphicObjects/RadioButton.cs
index 4370d157..a6248706 100644
--- a/src/GraphicObjects/RadioButton.cs
+++ b/src/GraphicObjects/RadioButton.cs
@@ -1,5 +1,4 @@
using System;
-using OpenTK.Input;
using System.ComponentModel;
using System.Xml.Serialization;
diff --git a/src/GraphicObjects/Scroller.cs b/src/GraphicObjects/Scroller.cs
index 459205fe..58a0f245 100644
--- a/src/GraphicObjects/Scroller.cs
+++ b/src/GraphicObjects/Scroller.cs
@@ -24,7 +24,6 @@ using System.Xml.Serialization;
using System.ComponentModel;
using System.Diagnostics;
using Cairo;
-using OpenTK.Input;
namespace Crow
{
@@ -166,10 +165,6 @@ namespace Crow
internal Point savedMousePos;
public override bool MouseIsIn (Point m)
{
-// Debug.WriteLine ("Mouse in scroller: {0} scr coord:{1} mouse:{2}",
-// base.ScreenCoordinates (Slot).ContainsOrIsEqual (m),
-// base.ScreenCoordinates (Slot), m);
-
return Visible ? base.ScreenCoordinates(Slot).ContainsOrIsEqual (m) : false;
}
public override void checkHoverWidget (MouseMoveEventArgs e)
@@ -180,10 +175,6 @@ namespace Crow
}
public override void onMouseWheel (object sender, MouseWheelEventArgs e)
{
- //base.onMouseWheel (sender, e); base event buble to the top
-// if (MouseWheelChanged!=null)
-// MouseWheelChanged (this, e);
-
if (Child == null)
return;
@@ -218,7 +209,7 @@ namespace Crow
gr.Save ();
//clip to scrolled client zone
- CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);//+ new Point((int)ScrollX,(int)ScrollY)
+ CairoHelpers.CairoRectangle (gr, ClientRectangle, CornerRadius);
gr.Clip ();
gr.Translate (-ScrollX, -ScrollY);
diff --git a/src/GraphicObjects/Slider.cs b/src/GraphicObjects/Slider.cs
index faaacd78..a96f2a40 100644
--- a/src/GraphicObjects/Slider.cs
+++ b/src/GraphicObjects/Slider.cs
@@ -172,7 +172,7 @@ namespace Crow
}
#region mouse handling
- public override void onMouseDown (object sender, OpenTK.Input.MouseButtonEventArgs e)
+ public override void onMouseDown (object sender, MouseButtonEventArgs e)
{
base.onMouseDown (sender, e);
@@ -191,13 +191,13 @@ namespace Crow
Value += LargeIncrement;
}
}
- public override void onMouseUp (object sender, OpenTK.Input.MouseButtonEventArgs e)
+ public override void onMouseUp (object sender,MouseButtonEventArgs e)
{
base.onMouseUp (sender, e);
holdCursor = false;
}
- public override void onMouseMove (object sender, OpenTK.Input.MouseMoveEventArgs e)
+ public override void onMouseMove (object sender, MouseMoveEventArgs e)
{
if (holdCursor) {
if (_orientation == Orientation.Horizontal)
diff --git a/src/GraphicObjects/Spinner.cs b/src/GraphicObjects/Spinner.cs
index ffc9472b..9447f205 100644
--- a/src/GraphicObjects/Spinner.cs
+++ b/src/GraphicObjects/Spinner.cs
@@ -19,7 +19,6 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
-using OpenTK.Input;
namespace Crow
{
diff --git a/src/GraphicObjects/Splitter.cs b/src/GraphicObjects/Splitter.cs
index 97cce52c..dbda87af 100644
--- a/src/GraphicObjects/Splitter.cs
+++ b/src/GraphicObjects/Splitter.cs
@@ -58,7 +58,7 @@ namespace Crow
base.Parent = value;
}
}
- public override void onMouseEnter (object sender, OpenTK.Input.MouseMoveEventArgs e)
+ public override void onMouseEnter (object sender, MouseMoveEventArgs e)
{
base.onMouseEnter (sender, e);
if ((Parent as GenericStack).Orientation == Orientation.Horizontal)
@@ -66,12 +66,12 @@ namespace Crow
else
this.HostContainer.MouseCursor = XCursor.V;
}
- public override void onMouseLeave (object sender, OpenTK.Input.MouseMoveEventArgs e)
+ public override void onMouseLeave (object sender, MouseMoveEventArgs e)
{
base.onMouseLeave (sender, e);
this.HostContainer.MouseCursor = XCursor.Default;
}
- public override void onMouseMove (object sender, OpenTK.Input.MouseMoveEventArgs e)
+ public override void onMouseMove (object sender, MouseMoveEventArgs e)
{
base.onMouseMove (sender, e);
diff --git a/src/GraphicObjects/TabItem.cs b/src/GraphicObjects/TabItem.cs
index b0e733fb..c2d863af 100644
--- a/src/GraphicObjects/TabItem.cs
+++ b/src/GraphicObjects/TabItem.cs
@@ -158,18 +158,18 @@ namespace Crow
|| mouseIsInTitle;
}
bool holdCursor = false;
- public override void onMouseDown (object sender, OpenTK.Input.MouseButtonEventArgs e)
+ public override void onMouseDown (object sender, MouseButtonEventArgs e)
{
base.onMouseDown (sender, e);
holdCursor = true;
}
- public override void onMouseUp (object sender, OpenTK.Input.MouseButtonEventArgs e)
+ public override void onMouseUp (object sender, MouseButtonEventArgs e)
{
base.onMouseUp (sender, e);
holdCursor = false;
(Parent as TabView).UpdateLayout (LayoutingType.ArrangeChildren);
}
- public override void onMouseMove (object sender, OpenTK.Input.MouseMoveEventArgs e)
+ public override void onMouseMove (object sender, MouseMoveEventArgs e)
{
base.onMouseMove (sender, e);
@@ -206,7 +206,7 @@ namespace Crow
TabOffset = tmp;
}
}
- public void butCloseTabClick (object sender, OpenTK.Input.MouseButtonEventArgs e){
+ public void butCloseTabClick (object sender, MouseButtonEventArgs e){
(Parent as TabView).RemoveChild(this);
}
#endregion
diff --git a/src/GraphicObjects/TabView.cs b/src/GraphicObjects/TabView.cs
index a480ae09..7bf827d6 100644
--- a/src/GraphicObjects/TabView.cs
+++ b/src/GraphicObjects/TabView.cs
@@ -23,7 +23,6 @@ using System.Xml.Serialization;
using System.ComponentModel;
using Cairo;
using System.Diagnostics;
-using OpenTK.Input;
namespace Crow
{
@@ -207,7 +206,8 @@ namespace Crow
}
}
#endregion
- void Ti_MouseDown (object sender, OpenTK.Input.MouseButtonEventArgs e)
+
+ void Ti_MouseDown (object sender, MouseButtonEventArgs e)
{
SelectedTab = Children.IndexOf (sender as GraphicObject);
}
diff --git a/src/GraphicObjects/TemplatedControl.cs b/src/GraphicObjects/TemplatedControl.cs
index bb2fbd28..c8ec2d9e 100644
--- a/src/GraphicObjects/TemplatedControl.cs
+++ b/src/GraphicObjects/TemplatedControl.cs
@@ -23,8 +23,8 @@ using System.Xml.Serialization;
using System.ComponentModel;
using System.IO;
using System.Xml;
-using System.Linq;
using System.Diagnostics;
+using System.Linq;
namespace Crow
{
diff --git a/src/GraphicObjects/TextBox.cs b/src/GraphicObjects/TextBox.cs
index 91122523..7907eb42 100644
--- a/src/GraphicObjects/TextBox.cs
+++ b/src/GraphicObjects/TextBox.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
-using OpenTK.Input;
using Cairo;
using System.Diagnostics;
using System.Xml.Serialization;
diff --git a/src/GraphicObjects/TextRun.cs b/src/GraphicObjects/TextRun.cs
index bb308eb6..0fa463af 100644
--- a/src/GraphicObjects/TextRun.cs
+++ b/src/GraphicObjects/TextRun.cs
@@ -7,7 +7,6 @@ using Cairo;
using System.Text.RegularExpressions;
using System.Xml.Serialization;
using System.ComponentModel;
-using OpenTK.Input;
namespace Crow
{
diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs
index 5e1bd681..757ee080 100644
--- a/src/GraphicObjects/Window.cs
+++ b/src/GraphicObjects/Window.cs
@@ -2,7 +2,6 @@
using System.Xml.Serialization;
using System.ComponentModel;
using System.Diagnostics;
-using OpenTK.Input;
namespace Crow
{