X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c1ea6afb878385e2586007fc85fef05c2c722a2b..8e77fd8bca165aab9709649d79a7cbc6a172d4e1:/include/wx/mousestate.h diff --git a/include/wx/mousestate.h b/include/wx/mousestate.h index 1e6dc5070d..8e954ad371 100644 --- a/include/wx/mousestate.h +++ b/include/wx/mousestate.h @@ -11,6 +11,7 @@ #ifndef _WX_MOUSESTATE_H_ #define _WX_MOUSESTATE_H_ +#include "wx/gdicmn.h" // for wxPoint #include "wx/kbdstate.h" // the symbolic names for the mouse buttons @@ -78,10 +79,6 @@ public: { switch ( but ) { - default: - wxFAIL_MSG(wxT("invalid parameter in wxMouseState::ButtonIsDown")); - // fall through - case wxMOUSE_BTN_ANY: return LeftIsDown() || MiddleIsDown() || RightIsDown() || Aux1IsDown() || Aux2IsDown(); @@ -100,7 +97,14 @@ public: case wxMOUSE_BTN_AUX2: return Aux2IsDown(); + + case wxMOUSE_BTN_NONE: + case wxMOUSE_BTN_MAX: + break; } + + wxFAIL_MSG(wxS("invalid parameter")); + return false; } @@ -122,7 +126,7 @@ public: // version of wxMouseState but their names are confusing as wxMouseEvent // has methods with the same names which do something quite different so // don't use them any more -#ifdef WXWIN_COMPATIBILITY_2_8 +#if WXWIN_COMPATIBILITY_2_8 wxDEPRECATED_INLINE(bool LeftDown() const, return LeftIsDown(); ) wxDEPRECATED_INLINE(bool MiddleDown() const, return MiddleIsDown(); ) wxDEPRECATED_INLINE(bool RightDown() const, return RightIsDown(); )