]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mousestate.h
Don't create multiple parent-less top level frames in layout sample.
[wxWidgets.git] / include / wx / mousestate.h
index 21eee5cb0edea854192ce24d160b82f5d5814ca5..8e954ad371742d5007976d818368d285af392b64 100644 (file)
@@ -79,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();
@@ -101,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;
     }
 
 
@@ -123,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(); )