X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7bc57fd972ddf7621bc6d4716e6dbda1cf09312e..fd5cfba71157c481b5bc90563d0d990ec67ecb11:/include/wx/event.h diff --git a/include/wx/event.h b/include/wx/event.h index 0c074e6bae..8303647c39 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -225,10 +225,13 @@ public: const wxObjectEventFunctor &other = static_cast< const wxObjectEventFunctor & >( functor ); - // FIXME-VC6: amazing but true: replacing "method == NULL" here - // with "!method" makes VC6 crash with an ICE in DLL build (only!) + // FIXME-VC6: amazing but true: replacing "m_method == 0" here + // with "!m_method" makes VC6 crash with an ICE in DLL build (only!) + // Also notice that using "NULL" instead of "0" results in warnings + // about "using NULL in arithmetics" from arm-linux-androideabi-g++ + // 4.4.3 used for wxAndroid build. - return ( m_method == other.m_method || other.m_method == NULL ) && + return ( m_method == other.m_method || other.m_method == 0 ) && ( m_handler == other.m_handler || other.m_handler == NULL ); } else @@ -1443,20 +1446,14 @@ private: wxEVT_LEFT_DCLICK wxEVT_MIDDLE_DCLICK wxEVT_RIGHT_DCLICK - wxEVT_NC_LEFT_DOWN - wxEVT_NC_LEFT_UP, - wxEVT_NC_MIDDLE_DOWN, - wxEVT_NC_MIDDLE_UP, - wxEVT_NC_RIGHT_DOWN, - wxEVT_NC_RIGHT_UP, - wxEVT_NC_MOTION, - wxEVT_NC_ENTER_WINDOW, - wxEVT_NC_LEAVE_WINDOW, - wxEVT_NC_LEFT_DCLICK, - wxEVT_NC_MIDDLE_DCLICK, - wxEVT_NC_RIGHT_DCLICK, */ +enum wxMouseWheelAxis +{ + wxMOUSE_WHEEL_VERTICAL, + wxMOUSE_WHEEL_HORIZONTAL +}; + class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent, public wxMouseState { @@ -1544,10 +1541,10 @@ public: // should occur for each delta. int GetWheelDelta() const { return m_wheelDelta; } - // Gets the axis the wheel operation concerns, 0 being the y axis as on - // most mouse wheels, 1 is the x axis for things like MightyMouse scrolls - // or horizontal trackpad scrolling - int GetWheelAxis() const { return m_wheelAxis; } + // Gets the axis the wheel operation concerns; wxMOUSE_WHEEL_VERTICAL + // (most common case) or wxMOUSE_WHEEL_HORIZONTAL (for horizontal scrolling + // using e.g. a trackpad). + wxMouseWheelAxis GetWheelAxis() const { return m_wheelAxis; } // Returns the configured number of lines (or whatever) to be scrolled per // wheel action. Defaults to one. @@ -1569,7 +1566,7 @@ public: public: int m_clickCount; - int m_wheelAxis; + wxMouseWheelAxis m_wheelAxis; int m_wheelRotation; int m_wheelDelta; int m_linesPerAction; @@ -1868,7 +1865,6 @@ private: /* wxEVT_PAINT wxEVT_NC_PAINT - wxEVT_PAINT_ICON */ #if wxDEBUG_LEVEL && (defined(__WXMSW__) || defined(__WXPM__))