Use enum for wxMouseEvent::m_wheelAxis instead of int.

This variable can take only 2 values, use symbolic names for them instead of
difficult to understand 0 and 1.

See ##14105.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-03-22 00:26:59 +00:00
parent 32632baf6d
commit 41469c9e5e
5 changed files with 32 additions and 12 deletions

View File

@@ -2187,6 +2187,16 @@ public:
wxClipboardTextEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
};
/**
Possible axis values for mouse wheel scroll events.
@since 2.9.4
*/
enum wxMouseWheelAxis
{
wxMOUSE_WHEEL_VERTICAL, ///< Vertical scroll event.
wxMOUSE_WHEEL_HORIZONTAL ///< Horizontal scroll event.
};
/**
@@ -2440,12 +2450,16 @@ public:
int GetWheelRotation() const;
/**
Gets the axis the wheel operation concerns; @c 0 is the Y axis as on
most mouse wheels, @c 1 is the X axis.
Gets the axis the wheel operation concerns.
Note that only some models of mouse have horizontal wheel axis.
Usually the mouse wheel is used to scroll vertically so @c
wxMOUSE_WHEEL_VERTICAL is returned but some mice (and most trackpads)
also allow to use the wheel to scroll horizontally in which case
@c wxMOUSE_WHEEL_HORIZONTAL is returned.
Notice that before wxWidgets 2.9.4 this method returned @c int.
*/
int GetWheelAxis() const;
wxMouseWheelAxis GetWheelAxis() const;
/**
Returns @true if the event was a mouse button event (not necessarily a button