- bool LeftDown() const { return m_leftDown; }
- bool MiddleDown() const { return m_middleDown; }
- bool RightDown() const { return m_rightDown; }
- bool Aux1Down() const { return m_aux1Down; }
- bool Aux2Down() const { return m_aux2Down; }
+ bool LeftIsDown() const { return m_leftDown; }
+ bool MiddleIsDown() const { return m_middleDown; }
+ bool RightIsDown() const { return m_rightDown; }
+ bool Aux1IsDown() const { return m_aux1Down; }
+ bool Aux2IsDown() const { return m_aux2Down; }
+
+ bool ButtonIsDown(wxMouseButton but) const
+ {
+ switch ( but )
+ {
+ default:
+ wxFAIL_MSG(wxT("invalid parameter in wxMouseState::ButtonIsDown"));
+ // fall through
+
+ case wxMOUSE_BTN_ANY:
+ return LeftIsDown() || MiddleIsDown() || RightIsDown() ||
+ Aux1IsDown() || Aux2IsDown();
+
+ case wxMOUSE_BTN_LEFT:
+ return LeftIsDown();
+
+ case wxMOUSE_BTN_MIDDLE:
+ return MiddleIsDown();
+
+ case wxMOUSE_BTN_RIGHT:
+ return RightIsDown();
+
+ case wxMOUSE_BTN_AUX1:
+ return Aux1IsDown();
+
+ case wxMOUSE_BTN_AUX2:
+ return Aux2IsDown();
+ }
+ }
+