phoenix_title 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

wx.GetMouseState , wx.MouseEvent


class_hierarchy Class Hierarchy

Inheritance diagram for class MouseState:

sub_classes Known Subclasses

wx.MouseEvent


method_summary Methods Summary

__init__

Default constructor.

Aux1IsDown

Returns True if the first extra button mouse button is currently down.

Aux2IsDown

Returns True if the second extra button mouse button is currently down.

GetPosition

Returns the physical mouse position.

GetX

Returns X coordinate of the physical mouse event position.

GetY

Returns Y coordinate of the physical mouse event position.

LeftIsDown

Returns True if the left mouse button is currently down.

MiddleIsDown

Returns True if the middle mouse button is currently down.

RightIsDown

Returns True if the right mouse button is currently down.

SetAux1Down

SetAux2Down

SetLeftDown

SetMiddleDown

SetPosition

SetRightDown

SetState

SetX

SetY


property_summary Properties Summary

Position

See GetPosition and SetPosition

X

See GetX and SetX

Y

See GetY and SetY

aux1IsDown

See Aux1IsDown and SetAux1Down

aux2IsDown

See Aux2IsDown and SetAux2Down

leftIsDown

See LeftIsDown and SetLeftDown

middleIsDown

See MiddleIsDown and SetMiddleDown

rightIsDown

See RightIsDown and SetRightDown

x

See GetX and SetX

y

See GetY and SetY


api Class API

class wx.MouseState(KeyboardState)

Possible constructors:

MouseState()

Represents the mouse state.


Methods

__init__(self)

Default constructor.



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



GetPosition(self)

Returns the physical mouse position.

Return type:

wx.Point



GetX(self)

Returns X coordinate of the physical mouse event position.

Return type:

wx.Coord



GetY(self)

Returns Y coordinate of the physical mouse event position.

Return type:

wx.Coord



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) –



SetAux2Down(self, down)
Parameters:

down (bool) –



SetLeftDown(self, down)
Parameters:

down (bool) –



SetMiddleDown(self, down)
Parameters:

down (bool) –



SetPosition(self, pos)
Parameters:

pos (wx.Point) –



SetRightDown(self, down)
Parameters:

down (bool) –



SetState(self, state)
Parameters:

state (wx.MouseState) –



SetX(self, x)
Parameters:

x (int) –



SetY(self, y)
Parameters:

y (int) –


Properties

Position

See GetPosition and SetPosition



X

See GetX and SetX



Y

See GetY and SetY



aux1IsDown

See Aux1IsDown and SetAux1Down



aux2IsDown

See Aux2IsDown and SetAux2Down



leftIsDown

See LeftIsDown and SetLeftDown



middleIsDown

See MiddleIsDown and SetMiddleDown



rightIsDown

See RightIsDown and SetRightDown



x

See GetX and SetX



y

See GetY and SetY