Ejemplo n.º 1
0
		public override void MouseMoved (NSEvent theEvent)
		{
			var p = ConvertPointFromView (theEvent.LocationInWindow, null);
			MouseMovedEventArgs args = new MouseMovedEventArgs ((long) TimeSpan.FromSeconds (theEvent.Timestamp).TotalMilliseconds, p.X, p.Y);
			context.InvokeUserCode (delegate {
				eventSink.OnMouseMoved (args);
			});
		}
Ejemplo n.º 2
0
        public override void MouseMoved(NSEvent theEvent)
        {
            CGPoint p = this.ConvertPointFromEvent(theEvent);

            if (!Bounds.Contains(p))
            {
                return;
            }
            MouseMovedEventArgs args = new MouseMovedEventArgs((long)TimeSpan.FromSeconds(theEvent.Timestamp).TotalMilliseconds, p.X, p.Y);

            context.InvokeUserCode(delegate {
                eventSink.OnMouseMoved(args);
            });
        }
Ejemplo n.º 3
0
 private void WidgetMouseMoveHandler(object sender, MouseEventArgs e)
 {
     Toolkit.Invoke(() => {
         var p = e.GetPosition(Widget);
         eventSink.OnMouseMoved(new MouseMovedEventArgs(
                                    e.Timestamp, p.X * WidthPixelRatio, p.Y * HeightPixelRatio));
     });
 }
Ejemplo n.º 4
0
        private void WidgetMouseMoveHandler(object sender, MouseEventArgs e)
        {
            var p = e.GetPosition(Widget);
            var a = new MouseMovedEventArgs(e.Timestamp, p.X, p.Y);

            Context.InvokeUserCode(() => {
                eventSink.OnMouseMoved(a);
            });
            if (a.Handled)
            {
                e.Handled = true;
            }
        }