protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (DateTime.Now.Subtract(lastTooltipUpdate).TotalSeconds > 0.01) { KChartHandler.ShowEndNames(!shiftKeyDown); if (mouseDown) { UpdateTooltip(new Point(0, 0), ""); } else if (!shiftKeyDown) { UpdateTooltip(new Point(e.X, e.Y), KChartHandler.HitListTooltip(Swipe.Inverse(new SKPoint(e.X, e.Y), KChartHandler.GetManualPinchPan()), 10)); } lastTooltipUpdate = DateTime.Now; if (!KControls.IsSimulating()) { Invalidate(); // because of ShowEndNames } } if (mouseDown) { touch.onTouchSwipeOrMouseDrag?.Invoke(mouseDownPoint, new SKPoint(e.Location.X, e.Location.Y)); } }
public bool MyModifiersChanged(NSEvent e) { if (e.ModifierFlags.HasFlag(NSEventModifierMask.ShiftKeyMask)) //0x38 kVK_Shift { shiftKeyDown = true; if (mouseInsideChartControl) { KChartHandler.ShowEndNames(false); showTooltip = false; UpdateTooltip(e); if (!KControls.IsSimulating()) { Invalidate(); } } return(true); } else { shiftKeyDown = false; if (mouseInsideChartControl) { KChartHandler.ShowEndNames(true); showTooltip = true; UpdateTooltip(e); if (!KControls.IsSimulating()) { Invalidate(); } } return(false); } }
protected override void OnMouseEnter(EventArgs e) { base.OnMouseEnter(e); mouseInsideChartControl = true; KChartHandler.ShowEndNames(true); if (!KControls.IsSimulating()) { Invalidate(); } }
protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); mouseInsideChartControl = false; UpdateTooltip(new Point(0, 0), ""); KChartHandler.ShowEndNames(false); if (!KControls.IsSimulating()) { Invalidate(); } }
public override void MouseExited(NSEvent e) { base.MouseExited(e); mouseInsideChartControl = false; showTooltip = false; UpdateTooltip(e); KChartHandler.ShowEndNames(false); if (!KControls.IsSimulating()) { Invalidate(); } }
public override void MouseEntered(NSEvent e) { base.MouseEntered(e); mouseInsideChartControl = true; showTooltip = !shiftKeyDown; KChartHandler.ShowEndNames(!shiftKeyDown); if (!KControls.IsSimulating()) { Invalidate(); } }
public static void OnShiftKeyUp() // called from GuiToWin.GuiToWin_KeyUp form callback { shiftKeyDown = false; if (mouseInsideChartControl) { KChartHandler.ShowEndNames(true); if (!KControls.IsSimulating()) { chartControl.Invalidate(); } } }
public static bool shiftKeyDown = false; // See also WinGui_KeyDown, WinGui_KeyUp public static void OnShiftKeyDown() // called from GuiToWin.GuiToWin_KeyDown form callback { shiftKeyDown = true; if (mouseInsideChartControl) { KChartHandler.ShowEndNames(false); chartControl.UpdateTooltip(new Point(0, 0), ""); if (!KControls.IsSimulating()) { chartControl.Invalidate(); } } }
public override void MouseMoved(NSEvent e) { base.MouseMoved(e); if (!mouseInsideChartControl) { return; } (CGPoint native, SKPoint location) = ConvertToCanvasPoint(e); lastLocationForZoom = location; if (DateTime.Now.Subtract(lastTooltipUpdate).TotalSeconds > 0.01) { KChartHandler.ShowEndNames(!shiftKeyDown); showTooltip = !shiftKeyDown; UpdateTooltip(e); lastTooltipUpdate = DateTime.Now; if (!KControls.IsSimulating()) { Invalidate(); // because of ShowEndNames } } }