]>
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
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 /// Symbolic names for the mouse buttons.
12 /// Any mouse button, means to check for any button being pressed for
16 /// None of the mouse buttons.
19 /// Left mouse button.
22 /// Middle mouse button.
23 wxMOUSE_BTN_MIDDLE
= 2,
25 /// Right mouse button.
26 wxMOUSE_BTN_RIGHT
= 3,
28 /// First additional mouse button.
31 /// Second additional mouse button.
41 Represents the mouse state.
43 This class is used as a base class by wxMouseEvent and so its methods may
44 be used to obtain information about the mouse state for the mouse events.
45 It also inherits from wxKeyboardState and so carries information about the
46 keyboard state and not only the mouse one.
48 This class is implemented entirely inline in @<wx/mousestate.h@> and thus
49 has no linking requirements.
54 @see wxGetMouseState(), wxMouseEvent
56 class wxMouseState
: public wxKeyboardState
65 Returns X coordinate of the physical mouse event position.
70 Returns Y coordinate of the physical mouse event position.
75 Returns the physical mouse position.
78 wxPoint
GetPosition() const;
79 void GetPosition(int *x
, int *y
) const;
83 Returns @true if the left mouse button is currently down.
85 bool LeftIsDown() const;
88 Returns @true if the middle mouse button is currently down.
90 bool MiddleIsDown() const;
93 Returns @true if the right mouse button is currently down.
95 bool RightIsDown() const;
98 Returns @true if the first extra button mouse button is currently down.
100 bool Aux1IsDown() const;
103 Returns @true if the second extra button mouse button is currently down.
105 bool Aux2IsDown() const;
108 void SetX(wxCoord x
);
109 void SetY(wxCoord y
);
110 void SetPosition(wxPoint pos
);
112 void SetLeftDown(bool down
);
113 void SetMiddleDown(bool down
);
114 void SetRightDown(bool down
);
115 void SetAux1Down(bool down
);
116 void SetAux2Down(bool down
);
118 void SetState(const wxMouseState
& state
);