]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/mousestate.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mousestate.h
3 // Purpose: documentation of wxMouseState
4 // Author: wxWidgets team
7 // Licence: wxWindows license
8 /////////////////////////////////////////////////////////////////////////////
10 /// Symbolic names for the mouse buttons.
13 /// Any mouse button, means to check for any button being pressed for
17 /// None of the mouse buttons.
20 /// Left mouse button.
23 /// Middle mouse button.
24 wxMOUSE_BTN_MIDDLE
= 2,
26 /// Right mouse button.
27 wxMOUSE_BTN_RIGHT
= 3,
29 /// First additional mouse button.
32 /// Second additional mouse button.
42 Represents the mouse state.
44 This class is used as a base class by wxMouseEvent and so its methods may
45 be used to obtain information about the mouse state for the mouse events.
46 It also inherits from wxKeyboardState and so carries information about the
47 keyboard state and not only the mouse one.
49 This class is implemented entirely inline in @<wx/mousestate.h@> and thus
50 has no linking requirements.
55 @see wxGetMouseState(), wxMouseEvent
57 class wxMouseState
: public wxKeyboardState
66 Returns X coordinate of the physical mouse event position.
71 Returns Y coordinate of the physical mouse event position.
76 Returns the physical mouse position.
79 wxPoint
GetPosition() const;
80 void GetPosition(int *x
, int *y
) const;
84 Returns @true if the left mouse button is currently down.
86 bool LeftIsDown() const;
89 Returns @true if the middle mouse button is currently down.
91 bool MiddleIsDown() const;
94 Returns @true if the right mouse button is currently down.
96 bool RightIsDown() const;
99 Returns @true if the first extra button mouse button is currently down.
101 bool Aux1IsDown() const;
104 Returns @true if the second extra button mouse button is currently down.
106 bool Aux2IsDown() const;