示例#1
0
 internal void OnMouseMove(NSEvent e, bool dragging)
 {
     viewDrawing?.HandleMouseMove(
         ClientRectangle,
         InnerView.ConvertPointFromView(e.LocationInWindow, null).ToPoint(),
         dragging,
         out var _
         );
 }
 internal void OnMouseMove(NSEvent e, bool dragging)
 {
     DrawingUtils.CursorType cursor;
     DrawingUtils.MouseMoveHelper(
         presentationDataAccess,
         drawContext,
         ClientRectangle,
         viewEvents,
         InnerView.ConvertPointFromView(e.LocationInWindow, null).ToPoint(),
         dragging,
         out cursor
         );
 }
        internal void OnMouseDown(NSEvent e)
        {
            MessageMouseEventFlag flags = MessageMouseEventFlag.None;

            if (e.Type == NSEventType.RightMouseDown)
            {
                flags |= MessageMouseEventFlag.RightMouseButton;
            }
            if ((e.ModifierFlags & NSEventModifierMask.ShiftKeyMask) != 0)
            {
                flags |= MessageMouseEventFlag.ShiftIsHeld;
            }
            if ((e.ModifierFlags & NSEventModifierMask.AlternateKeyMask) != 0)
            {
                flags |= MessageMouseEventFlag.AltIsHeld;
            }
            if ((e.ModifierFlags & NSEventModifierMask.ControlKeyMask) != 0)
            {
                flags |= MessageMouseEventFlag.CtrlIsHeld;
            }
            if (e.ClickCount == 2)
            {
                flags |= MessageMouseEventFlag.DblClick;
            }
            else
            {
                flags |= MessageMouseEventFlag.SingleClick;
            }

            bool captureTheMouse;

            DrawingUtils.MouseDownHelper(
                presentationDataAccess,
                drawContext,
                ClientRectangle,
                viewEvents,
                InnerView.ConvertPointFromView(e.LocationInWindow, null).ToPoint(),
                flags,
                out captureTheMouse
                );
        }
示例#4
0
        internal void OnMouseDown(NSEvent e)
        {
            MessageMouseEventFlag flags = MessageMouseEventFlag.None;

            if (e.Type == NSEventType.RightMouseDown)
            {
                flags |= MessageMouseEventFlag.RightMouseButton;
            }
            if ((e.ModifierFlags & NSEventModifierMask.ShiftKeyMask) != 0)
            {
                flags |= MessageMouseEventFlag.ShiftIsHeld;
            }
            if ((e.ModifierFlags & NSEventModifierMask.AlternateKeyMask) != 0)
            {
                flags |= MessageMouseEventFlag.AltIsHeld;
            }
            if ((e.ModifierFlags & NSEventModifierMask.ControlKeyMask) != 0)
            {
                flags |= MessageMouseEventFlag.CtrlIsHeld;
            }
            if (e.ClickCount == 2)
            {
                flags |= MessageMouseEventFlag.DblClick;
            }
            else
            {
                flags |= MessageMouseEventFlag.SingleClick;
            }

            viewDrawing?.HandleMouseDown(
                ClientRectangle,
                InnerView.ConvertPointFromView(e.LocationInWindow, null).ToPoint(),
                flags,
                out var _
                );
        }