47 orientation (
o), rotation (r),
48 tiltX (
tX), tiltY (
tY),
51 originalComponent (originator),
66 mods, pressure, orientation, rotation, tiltX, tiltY,
69 mouseDownTime, numberOfClicks, wasMovedSinceMouseDown != 0);
75 eventComponent, originalComponent, eventTime, mouseDownPosition, mouseDownTime,
76 numberOfClicks, wasMovedSinceMouseDown != 0);
82 tiltX, tiltY, eventComponent, originalComponent, eventTime, mouseDownPosition,
83 mouseDownTime, numberOfClicks, wasMovedSinceMouseDown != 0);
89 return wasMovedSinceMouseDown != 0;
133static int doubleClickTimeOutMs = 400;
The base class for all JUCE user-interface objects.
Point< int > localPointToGlobal(Point< int > localPoint) const
Converts a point relative to this component's top-left into a screen coordinate.
Represents the state of the mouse buttons and modifier keys.
Contains position and status information about a mouse event.
bool isOrientationValid() const noexcept
Returns true if the orientation value for this event is meaningful.
MouseEvent(MouseInputSource source, Point< float > position, ModifierKeys modifiers, float pressure, float orientation, float rotation, float tiltX, float tiltY, Component *eventComponent, Component *originator, Time eventTime, Point< float > mouseDownPos, Time mouseDownTime, int numberOfClicks, bool mouseWasDragged) noexcept
Creates a MouseEvent.
const Point< float > mouseDownPosition
The coordinates of the last place that a mouse button was pressed.
static int getDoubleClickTimeout() noexcept
Returns the application-wide setting for the double-click time limit.
Point< int > getOffsetFromDragStart() const noexcept
Returns the difference between the mouse's current position and where it was when the button was last...
int getMouseDownScreenX() const
Returns the x coordinate at which the mouse button was last pressed.
Point< int > getScreenPosition() const
Returns the mouse position of this event, in global screen coordinates.
const Time mouseDownTime
The time that the corresponding mouse-down event occurred.
int getMouseDownX() const noexcept
Returns the x coordinate of the last place that a mouse was pressed.
static void setDoubleClickTimeout(int timeOutMilliseconds) noexcept
Changes the application-wide setting for the double-click time limit.
Point< int > getPosition() const noexcept
The position of the mouse when the event occurred.
Point< int > getMouseDownPosition() const noexcept
Returns the coordinates of the last place that a mouse was pressed.
MouseEvent getEventRelativeTo(Component *newComponent) const noexcept
Creates a version of this event that is relative to a different component.
bool isRotationValid() const noexcept
Returns true if the rotation value for this event is meaningful.
const float orientation
The orientation of the touch input for this event in radians where 0 indicates a touch aligned with t...
const int x
The x-position of the mouse when the event occurred.
const float pressure
The pressure of the touch or stylus for this event.
const Point< float > position
The position of the mouse when the event occurred.
bool mouseWasDraggedSinceMouseDown() const noexcept
Returns true if the user seems to be performing a drag gesture.
bool isPressureValid() const noexcept
Returns true if the pressure value for this event is meaningful.
int getMouseDownScreenY() const
Returns the y coordinate at which the mouse button was last pressed.
const int y
The y-position of the mouse when the event occurred.
const float rotation
The rotation of the pen device for this event in radians.
const Time eventTime
The time that this mouse-event occurred.
Component *const eventComponent
The component that this event applies to.
int getLengthOfMousePress() const noexcept
Returns the time that the mouse button has been held down for.
Point< int > getMouseDownScreenPosition() const
Returns the coordinates at which the mouse button was last pressed.
MouseEvent withNewPosition(Point< float > newPosition) const noexcept
Creates a copy of this event with a different position.
int getScreenY() const
Returns the mouse y position of this event, in global screen coordinates.
int getDistanceFromDragStart() const noexcept
Returns the straight-line distance between where the mouse is now and where it was the last time the ...
int getScreenX() const
Returns the mouse x position of this event, in global screen coordinates.
bool isTiltValid(bool tiltX) const noexcept
Returns true if the current tilt value (either x- or y-axis) is meaningful.
int getDistanceFromDragStartY() const noexcept
Returns the difference between the mouse's current y position and where it was when the button was la...
int getMouseDownY() const noexcept
Returns the y coordinate of the last place that a mouse was pressed.
bool mouseWasClicked() const noexcept
Returns true if the mouse event is part of a click gesture rather than a drag.
int getDistanceFromDragStartX() const noexcept
Returns the difference between the mouse's current x position and where it was when the button was la...
A pair of (x, y) coordinates.
ValueType getDistanceFrom(Point other) const noexcept
Returns the straight-line distance between this point and another one.
constexpr Point< int > roundToInt() const noexcept
Casts this point to a Point<int> object using roundToInt() to convert the values.
ValueType y
The point's Y coordinate.
ValueType x
The point's X coordinate.
Holds an absolute date and time.
int64 toMilliseconds() const noexcept
Returns the time as a number of milliseconds.
constexpr Type jmax(Type a, Type b)
Returns the larger of two values.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
unsigned char uint8
A platform-independent 8-bit unsigned integer type.
int roundToInt(const FloatType value) noexcept
Fast floating-point-to-integer conversion.