MouseInputData class

Data class that contains information about a mouse event.

Constructors

MouseInputData({GDisplayObject? target, required GDisplayObject dispatcher, required MouseInputType type})
Creates a new instance of MouseInputData.

Properties

buttonDown bool
Whether the mouse button is pressed.
getter/setter pair
buttonsFlags int?
An integer that defines which mouse buttons are pressed.
getter/setter pair
captured bool
Whether the mouse event has been captured.
getter/setter pair
dispatcher GDisplayObject
The display object that is the dispatcher of the event.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isPrimaryDown bool
Whether the primary mouse button is pressed.
no setter
isSecondaryDown bool
Whether the secondary mouse button is pressed.
no setter
isTertiaryDown bool
Whether the tertiary mouse button is pressed.
no setter
localDelta GPoint
The delta of the mouse movement in the display object's coordinate system.
no setter
localPosition GPoint
The position of the mouse in the display object's coordinate system.
getter/setter pair
localX double
The x-coordinate of the mouse in the display object's coordinate system.
no setter
localY double
The y-coordinate of the mouse in the display object's coordinate system.
no setter
mouseOut bool
Whether the mouse is outside the display object's bounds.
getter/setter pair
rawEvent PointerEventData?
The raw pointer event that triggered the mouse event.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDelta GPoint
The delta of the mouse wheel or the pan gesture in the display object's coordinate system.
getter/setter pair
stagePosition GPoint
The position of the mouse in the stage's coordinate system.
no setter
stageX double
The x-coordinate of the mouse in the stage's coordinate system.
no setter
stageY double
The y-coordinate of the mouse in the stage's coordinate system.
no setter
target GDisplayObject?
The display object that is the target of the event.
getter/setter pair
time double
The time at which the event occurred.
getter/setter pair
type MouseInputType
The type of mouse event that occurred.
getter/setter pair
uid int
Unique identifier for the mouse event.
getter/setter pair
windowX double
The x-coordinate of the mouse in the window's coordinate system.
no setter
windowY double
The y-coordinate of the mouse in the window's coordinate system.
no setter

Methods

clone(GDisplayObject target, GDisplayObject dispatcher, MouseInputType type) MouseInputData
Clones a new instance of MouseInputData with the provided target, dispatcher and type, and copies the properties of the original instance into the new one, including uid, buttonDown, rawEvent, captured, buttonsFlags, time, _stagePosition, scrollDelta, localPosition, and mouseOut. Returns the new instance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Returns a string representation of the MouseInputData.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

doubleClickTime int
Duration in milliseconds within which two mouse clicks count as a double click.
getter/setter pair
uniqueId int
Unique static identifier to assign to new mouse events.
getter/setter pair

Static Methods

fromNativeType(PointerEventType? nativeType) MouseInputType
Converts a PointerEventType into the equivalent MouseInputType as follows: