Mouse Event class.
More...
|
None | __init__ (self, int event_type, int x=0, int y=0, int last_x=None, int last_y=None, List buttons=None) |
| Raise a new mouse event. More...
|
|
int | x (self) |
| The X coordinate of the event. More...
|
|
int | y (self) |
| The Y coordinate of the event. More...
|
|
Optional[int] | lastX (self) |
| The X coordinate of the previous event. More...
|
|
Optional[int] | lastY (self) |
| The Y coordinate of the previous event. More...
|
|
int | deltaX (self) |
| The change in X position between this event and the previous event. More...
|
|
int | deltaY (self) |
| The change in Y position between this event and the previous event. More...
|
|
List | buttons (self) |
| The list of buttons associated with this event. More...
|
|
|
string | LeftButton = "left" |
| Left mouse button. More...
|
|
string | RightButton = "right" |
|
string | MiddleButton = "middle" |
|
Mouse Event class.
This class represents a mouse event. It has properties corresponding to important mouse event properties and constants for mouse buttons.
◆ __init__()
None UM.Event.MouseEvent.__init__ |
( |
|
self, |
|
|
int |
event_type, |
|
|
int |
x = 0 , |
|
|
int |
y = 0 , |
|
|
int |
last_x = None , |
|
|
int |
last_y = None , |
|
|
List |
buttons = None |
|
) |
| |
Raise a new mouse event.
- Parameters
-
- See also
- Event
- Parameters
-
x | The X coordinate of the event. |
y | The Y coordinate of the event. |
last_x | The X coordinate of the previous mouse event. Can be None. It is used to calculate deltaX. |
last_y | The Y coordinate of the previous mouse event. Cam be None. It is used to calculate deltaY. |
buttons | The buttons that are associated with this event. |
◆ buttons()
List UM.Event.MouseEvent.buttons |
( |
|
self | ) |
|
The list of buttons associated with this event.
◆ deltaX()
int UM.Event.MouseEvent.deltaX |
( |
|
self | ) |
|
The change in X position between this event and the previous event.
◆ deltaY()
int UM.Event.MouseEvent.deltaY |
( |
|
self | ) |
|
The change in Y position between this event and the previous event.
◆ lastX()
Optional[int] UM.Event.MouseEvent.lastX |
( |
|
self | ) |
|
The X coordinate of the previous event.
◆ lastY()
Optional[int] UM.Event.MouseEvent.lastY |
( |
|
self | ) |
|
The Y coordinate of the previous event.
◆ x()
int UM.Event.MouseEvent.x |
( |
|
self | ) |
|
The X coordinate of the event.
◆ y()
int UM.Event.MouseEvent.y |
( |
|
self | ) |
|
The Y coordinate of the event.
◆ LeftButton
string UM.Event.MouseEvent.LeftButton = "left" |
|
static |
The documentation for this class was generated from the following file: