Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Event.MouseEvent Class Reference
Inheritance diagram for UM.Event.MouseEvent:
UM.Event.WheelEvent

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 = []
 

Detailed Description

Mouse Event class.

This class represents a mouse event. It has properties corresponding to important mouse
event properties and constants for mouse buttons.

Constructor & Destructor Documentation

◆ __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[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.

Member Function Documentation

◆ buttons()

List[str] 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.

The documentation for this class was generated from the following file: