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); }); }
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); }); }
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)); }); }
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; } }