wx.MouseState¶
Represents the mouse state.
This class is used as a base class by wx.MouseEvent and so its methods may be used to obtain information about the mouse state for the mouse events. It also inherits from wx.KeyboardState and so carries information about the keyboard state and not only the mouse one.
This class is implemented entirely inline in </mousestate.h > and thus has no linking requirements.
See also
Class Hierarchy¶
Known Subclasses¶
Methods Summary¶
Default constructor. |
|
Returns |
|
Returns |
|
Returns the physical mouse position. |
|
Returns X coordinate of the physical mouse event position. |
|
Returns Y coordinate of the physical mouse event position. |
|
Returns |
|
Returns |
|
Returns |
|
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
Class API¶
- class wx.MouseState(KeyboardState)¶
Possible constructors:
MouseState() -> None
Represents the mouse state.
Methods¶
- __init__(self)¶
Default constructor.
- Return type:
None
- Aux1IsDown(self)¶
Returns
True
if the first extra button mouse button is currently down.- Return type:
bool
- Aux2IsDown(self)¶
Returns
True
if the second extra button mouse button is currently down.- Return type:
bool
- GetX(self)¶
Returns X coordinate of the physical mouse event position.
- Return type:
int
- GetY(self)¶
Returns Y coordinate of the physical mouse event position.
- Return type:
int
- LeftIsDown(self)¶
Returns
True
if the left mouse button is currently down.- Return type:
bool
- MiddleIsDown(self)¶
Returns
True
if the middle mouse button is currently down.- Return type:
bool
- RightIsDown(self)¶
Returns
True
if the right mouse button is currently down.- Return type:
bool
- SetAux1Down(self, down)¶
- Parameters:
down (bool)
- Return type:
None
- SetAux2Down(self, down)¶
- Parameters:
down (bool)
- Return type:
None
- SetLeftDown(self, down)¶
- Parameters:
down (bool)
- Return type:
None
- SetMiddleDown(self, down)¶
- Parameters:
down (bool)
- Return type:
None
- SetRightDown(self, down)¶
- Parameters:
down (bool)
- Return type:
None
- SetState(self, state)¶
- Parameters:
state (wx.MouseState)
- Return type:
None
- SetX(self, x)¶
- Parameters:
x (int)
- Return type:
None
- SetY(self, y)¶
- Parameters:
y (int)
- Return type:
None
Properties¶
- Position¶
See
GetPosition
andSetPosition
- aux1IsDown¶
See
Aux1IsDown
andSetAux1Down
- aux2IsDown¶
See
Aux2IsDown
andSetAux2Down
- leftIsDown¶
See
LeftIsDown
andSetLeftDown
- middleIsDown¶
See
MiddleIsDown
andSetMiddleDown
- rightIsDown¶
See
RightIsDown
andSetRightDown