Uranium
Application Framework
|
Mouse Event class. More...
Public Member Functions | |
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. | |
int | x (self) |
The X coordinate of the event. | |
int | y (self) |
The Y coordinate of the event. | |
int | lastX (self) |
The X coordinate of the previous event. | |
int | lastY (self) |
The Y coordinate of the previous event. | |
int | deltaX (self) |
The change in X position between this event and the previous event. | |
int | deltaY (self) |
The change in Y position between this event and the previous event. | |
List | buttons (self) |
The list of buttons associated with this event. | |
Static Public Attributes | |
str | LeftButton = "left" |
Left mouse button. | |
str | RightButton = "right" |
str | MiddleButton = "middle" |
Protected Attributes | |
_x | |
_y | |
_last_x | |
_last_y | |
_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 | buttons = None |
||
) |
Raise a new mouse event.
type | The type of event. |
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. |
Reimplemented in UM.Event.WheelEvent.