aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/GraphicObject.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-08-30 13:18:21 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-09-01 12:44:39 +0200
commite68f66a334bd37c60416615d8314a62dd9d05740 (patch)
treee5470014265563fd480427fe841013834668e405 /src/GraphicObjects/GraphicObject.cs
parent8e0a800f3fdec3ce0815ac797f365837eec67d30 (diff)
debug mouse focus
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
-rw-r--r--src/GraphicObjects/GraphicObject.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 28e45d30..f5b19bb0 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -116,7 +116,7 @@ namespace Crow
/// This size is computed on each child' layout changes.
/// In stacking widget, it is used to compute the remaining space for the stretched
/// widget inside the stack, which is never added to the contentSize, instead, its size
- /// is deducted from (parent.ClientRectangle - contentSize)
+ /// is deducted from (parent.ClientRectangle - contentSize)
/// </summary>
internal Size contentSize;
#endregion
@@ -600,7 +600,7 @@ namespace Crow
if (string.IsNullOrEmpty (styleKey))
styleKey = thisType.FullName;
-
+
//Reflexion being very slow compared to dyn method or delegates,
//I compile the initial values coded in the CustomAttribs of the class,
//all other instance of this type would not longer use reflexion to init properly
@@ -1140,12 +1140,11 @@ namespace Crow
if (Interface.clickTimer.ElapsedMilliseconds > 0 &&
Interface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick) {
Interface.clickTimer.Reset ();
- Debug.WriteLine ("double click");
onMouseDoubleClick (this, e);
return;
} else
Interface.clickTimer.Restart ();
-
+
GraphicObject p = Parent as GraphicObject;
if (p != null)
p.onMouseClick(sender,e);
@@ -1160,7 +1159,7 @@ namespace Crow
public virtual void onMouseWheel(object sender, MouseWheelEventArgs e){
GraphicObject p = Parent as GraphicObject;
if (p != null)
- p.onMouseWheel(this,e);
+ p.onMouseWheel(sender,e);
MouseWheelChanged.Raise (this, e);
}
@@ -1177,6 +1176,17 @@ namespace Crow
Debug.WriteLine("MouseLeave => " + this.ToString());
#endif
MouseLeave.Raise (this, e);
+
+ GraphicObject p = Parent as GraphicObject;
+ CurrentInterface.HoverWidget = p;
+
+ if (p == null)
+ return;
+
+ if (p.MouseIsIn (e.Position)&&e!=null)
+ p.checkHoverWidget (e);
+ else
+ p.onMouseLeave (sender, e);
}
#endregion
@@ -1356,7 +1366,7 @@ namespace Crow
}
public virtual void ReadXml (System.Xml.XmlReader reader)
{
- if (reader.HasAttributes) {
+ if (reader.HasAttributes) {
style = reader.GetAttribute ("Style");