]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/mousestate.h
adding default interpolation enum
[wxWidgets.git] / interface / wx / mousestate.h
CommitLineData
0e097789
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/mousestate.h
3// Purpose: documentation of wxMouseState
4// Author: wxWidgets team
5// Created: 2008-09-19
6// RCS-ID: $Id$
526954c5 7// Licence: wxWindows licence
0e097789
VZ
8/////////////////////////////////////////////////////////////////////////////
9
ab826fd8
VZ
10/// Symbolic names for the mouse buttons.
11enum wxMouseButton
12{
13 /// Any mouse button, means to check for any button being pressed for
14 /// example.
15 wxMOUSE_BTN_ANY = -1,
16
17 /// None of the mouse buttons.
18 wxMOUSE_BTN_NONE = 0,
19
20 /// Left mouse button.
21 wxMOUSE_BTN_LEFT = 1,
22
23 /// Middle mouse button.
24 wxMOUSE_BTN_MIDDLE = 2,
25
26 /// Right mouse button.
27 wxMOUSE_BTN_RIGHT = 3,
28
29 /// First additional mouse button.
30 wxMOUSE_BTN_AUX1 = 4,
31
32 /// Second additional mouse button.
33 wxMOUSE_BTN_AUX2 = 5,
34
35 wxMOUSE_BTN_MAX
36};
37
0e097789
VZ
38
39/**
40 @class wxMouseState
41
42 Represents the mouse state.
43
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.
48
49 This class is implemented entirely inline in @<wx/mousestate.h@> and thus
50 has no linking requirements.
51
ba1d7a6c 52 @nolibrary
9e0ed083 53 @category{events}
0e097789
VZ
54
55 @see wxGetMouseState(), wxMouseEvent
56 */
57class wxMouseState : public wxKeyboardState
58{
59public:
60 /**
61 Default constructor.
62 */
63 wxMouseState();
64
65 /**
66 Returns X coordinate of the physical mouse event position.
67 */
68 wxCoord GetX() const;
ba1d7a6c 69
0e097789
VZ
70 /**
71 Returns Y coordinate of the physical mouse event position.
72 */
73 wxCoord GetY() const;
ba1d7a6c 74
0e097789
VZ
75 /**
76 Returns the physical mouse position.
77 */
ab826fd8 78 //@{
0e097789 79 wxPoint GetPosition() const;
ab826fd8
VZ
80 void GetPosition(int *x, int *y) const;
81 //@}
0e097789
VZ
82
83 /**
ab826fd8 84 Returns @true if the left mouse button is currently down.
0e097789 85 */
ab826fd8 86 bool LeftIsDown() const;
ba1d7a6c 87
0e097789 88 /**
ab826fd8 89 Returns @true if the middle mouse button is currently down.
0e097789 90 */
ab826fd8 91 bool MiddleIsDown() const;
ba1d7a6c 92
0e097789 93 /**
ab826fd8 94 Returns @true if the right mouse button is currently down.
0e097789 95 */
ab826fd8 96 bool RightIsDown() const;
ba1d7a6c 97
0e097789 98 /**
ab826fd8 99 Returns @true if the first extra button mouse button is currently down.
0e097789 100 */
ab826fd8 101 bool Aux1IsDown() const;
ba1d7a6c 102
0e097789 103 /**
ab826fd8 104 Returns @true if the second extra button mouse button is currently down.
0e097789 105 */
ab826fd8 106 bool Aux2IsDown() const;
a90e69f7
RD
107
108
109 void SetX(wxCoord x);
110 void SetY(wxCoord y);
111 void SetPosition(wxPoint pos);
112
113 void SetLeftDown(bool down);
114 void SetMiddleDown(bool down);
115 void SetRightDown(bool down);
116 void SetAux1Down(bool down);
117 void SetAux2Down(bool down);
118
119 void SetState(const wxMouseState& state);
120
0e097789
VZ
121};
122
123