MouseEvent

Mouse event

Constructors

this
this(MouseEvent e)

copy constructor

this
this(MouseAction a, MouseButton b, ushort f, short x, short y, short wheelDelta)

construct mouse event from data

Members

Functions

changeAction
void changeAction(MouseAction a)

override action code (for usage from platform code)

track
void track(Widget w)

override mouse tracking widget

Properties

action
MouseAction action [@property getter]

action

button
MouseButton button [@property getter]

button which caused ButtonUp or ButtonDown action

buttonDetails
ButtonDetails buttonDetails [@property getter]

button state details for event's button

buttonFlags
ushort buttonFlags [@property getter]

returns mouse button flags only

doNotTrackButtonDown
bool doNotTrackButtonDown [@property setter]

sets mouse button tracking flag

doNotTrackButtonDown
bool doNotTrackButtonDown [@property getter]

returns mouse button tracking flag

doubleClick
bool doubleClick [@property getter]

Returns true for ButtonDown event when button is pressed second time in short interval after pressing first time

flags
ushort flags [@property getter]

returns flags (buttons and keys state)

hasModifiers
bool hasModifiers [@property getter]

returns true if any modifier flag is set

keyFlags
ushort keyFlags [@property getter]

returns keyboard modifier flags only

lbutton
ButtonDetails lbutton [@property getter]

left button state details

mbutton
ButtonDetails mbutton [@property getter]

middle button state details

noModifiers
bool noModifiers [@property getter]

returns true if no modifier flags are set

pos
Point pos [@property getter]

returns point for mouse cursor position

rbutton
ButtonDetails rbutton [@property getter]

right button state details

toString
string toString [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
trackingWidget
Widget trackingWidget [@property getter]

get event tracking widget to override

tripleClick
bool tripleClick [@property getter]

Returns true for ButtonDown event when button is pressed third time in short interval after pressing first time

wheelDelta
short wheelDelta [@property getter]

returns delta for Wheel event

x
short x [@property getter]

x coordinate of mouse pointer (relative to window client area)

y
short y [@property getter]

y coordinate of mouse pointer (relative to window client area)

Variables

_action
MouseAction _action;

mouse action code

_button
MouseButton _button;

mouse button code for ButtonUp/ButtonDown

_doNotTrackButtonDown
bool _doNotTrackButtonDown;

when true, no tracking of mouse on ButtonDown is necessary

_eventTimestamp
long _eventTimestamp;

timestamp of event

_flags
ushort _flags;

flags bit set - usually from MouseFlag enum

_lbutton
ButtonDetails _lbutton;

left button state details

_mbutton
ButtonDetails _mbutton;

middle button state details

_rbutton
ButtonDetails _rbutton;

right button state details

_trackingWidget
Widget _trackingWidget;

widget which currently tracks mouse events

_wheelDelta
short _wheelDelta;

wheel delta

_x
short _x;

x coordinate of pointer

_y
short _y;

y coordinate of pointer

Meta