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
{
// make sure our string member (which uses COW, aka refcounting) is not
// shared by other wxString instances:
- SetString(GetString().c_str());
+ SetString(GetString().Clone());
}
virtual wxEvent *Clone() const
wxEVT_RIGHT_DCLICK
*/
+enum wxMouseWheelAxis
+{
+ wxMOUSE_WHEEL_VERTICAL,
+ wxMOUSE_WHEEL_HORIZONTAL
+};
+
class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent,
public wxMouseState
{
// 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.
public:
int m_clickCount;
- int m_wheelAxis;
+ wxMouseWheelAxis m_wheelAxis;
int m_wheelRotation;
int m_wheelDelta;
int m_linesPerAction;