Uranium
Application Framework
|
Public Member Functions | |
None | __init__ (self, int event_type, int x=0, int y=0, int last_x=None, int last_y=None, List[str] buttons=None) |
int | x (self) |
int | y (self) |
Optional[int] | lastX (self) |
Optional[int] | lastY (self) |
int | deltaX (self) |
int | deltaY (self) |
List[str] | buttons (self) |
Static Public Attributes | |
str | LeftButton = "left" |
str | RightButton = "right" |
str | MiddleButton = "middle" |
Protected Attributes | |
int | _x = x |
int | _y = y |
_last_x = last_x | |
_last_y = last_y | |
list | _buttons = [] |
Mouse Event class. This class represents a mouse event. It has properties corresponding to important mouse event properties and constants for mouse buttons.
None UM.Event.MouseEvent.__init__ | ( | self, | |
int | event_type, | ||
int | x = 0, | ||
int | y = 0, | ||
int | last_x = None, | ||
int | last_y = None, | ||
List[str] | buttons = None ) |
Raise a new mouse event. :param event_type: The type of event. :sa Event :param x: The X coordinate of the event. :param y: The Y coordinate of the event. :param last_x: The X coordinate of the previous mouse event. Can be None. It is used to calculate deltaX. :param last_y: The Y coordinate of the previous mouse event. Cam be None. It is used to calculate deltaY. :param buttons: The buttons that are associated with this event.
List[str] UM.Event.MouseEvent.buttons | ( | self | ) |
The list of buttons associated with this event.
int UM.Event.MouseEvent.deltaX | ( | self | ) |
The change in X position between this event and the previous event.
int UM.Event.MouseEvent.deltaY | ( | self | ) |
The change in Y position between this event and the previous event.
Optional[int] UM.Event.MouseEvent.lastX | ( | self | ) |
The X coordinate of the previous event.
Optional[int] UM.Event.MouseEvent.lastY | ( | self | ) |
The Y coordinate of the previous event.
int UM.Event.MouseEvent.x | ( | self | ) |
The X coordinate of the event.
int UM.Event.MouseEvent.y | ( | self | ) |
The Y coordinate of the event.