Author: miguel
Date: 2007-06-12 20:19:45 -0400 (Tue, 12 Jun 2007)
New Revision: 79355

Modified:
   trunk/olive/class/agclr/System.Windows.Input/MouseEventArgs.cs
   trunk/olive/class/agclr/System.Windows/UIElement.cs
Log:
Some more work

Modified: trunk/olive/class/agclr/System.Windows/UIElement.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows/UIElement.cs 2007-06-13 00:12:10 UTC 
(rev 79354)
+++ trunk/olive/class/agclr/System.Windows/UIElement.cs 2007-06-13 00:19:45 UTC 
(rev 79355)
@@ -177,5 +177,11 @@
                public event MouseEventHandler MouseLeftButtonDown;
                public event MouseEventHandler MouseLeftButtonUp;
                public event MouseEventHandler MouseMove;
+
+               internal void InvokeMouseMove (MouseEventArgs m)
+               {
+                       MouseMove (this, m);
+               }
+               
        }
 }

Modified: trunk/olive/class/agclr/System.Windows.Input/MouseEventArgs.cs
===================================================================
--- trunk/olive/class/agclr/System.Windows.Input/MouseEventArgs.cs      
2007-06-13 00:12:10 UTC (rev 79354)
+++ trunk/olive/class/agclr/System.Windows.Input/MouseEventArgs.cs      
2007-06-13 00:19:45 UTC (rev 79355)
@@ -29,12 +29,16 @@
 namespace System.Windows.Input {
        
        public sealed class MouseEventArgs : EventArgs {
-               bool ctrl, shift;
-
-               internal MouseEventArgs (bool ctrl, bool shift)
+               DependencyObject o;
+               int state;
+               double x, y;
+               
+               internal MouseEventArgs (DependencyObject o, int state, double 
x, double y)
                {
-                       this.ctrl = ctrl;
-                       this.shift = shift;
+                       this.o = o;
+                       this.state = state;
+                       this.x = x;
+                       this.y = y;
                }
                
                public MouseEventArgs ()
@@ -43,7 +47,8 @@
 
                public Point GetPosition (UIElement uiElement)
                {
-                       throw new NotImplementedException ();
+                       Console.WriteLine ("We should get the matrix and figure 
what this really is");
+                       return new Point (x, y);
                }
 
 #if not_yet_done
@@ -59,12 +64,22 @@
 #endif
                
                public bool Ctrl {
-                       get { return ctrl; }
-                       set { ctrl = value; }
+                       get { return (state & 4) != 0; }
+                       set {
+                               if (value)
+                                       state |= 4;
+                               else
+                                       state &= ~4;
+                       }
                }
                public bool Shift {
-                       get { return shift; } 
-                       set { shift = value; }
+                       get { return (state & 1) != 0; } 
+                       set {
+                               if (value)
+                                       state |= 1;
+                               else
+                                       state &= ~1;
+                       }
                }
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to