adding scroll axis to wheel events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b2ddcd05fc
commit
aea37008b7
@ -855,6 +855,11 @@ public:
|
|||||||
// should occur for each delta.
|
// should occur for each delta.
|
||||||
int GetWheelDelta() const { return m_wheelDelta; }
|
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; }
|
||||||
|
|
||||||
// Returns the configured number of lines (or whatever) to be scrolled per
|
// Returns the configured number of lines (or whatever) to be scrolled per
|
||||||
// wheel action. Defaults to one.
|
// wheel action. Defaults to one.
|
||||||
int GetLinesPerAction() const { return m_linesPerAction; }
|
int GetLinesPerAction() const { return m_linesPerAction; }
|
||||||
@ -878,6 +883,7 @@ public:
|
|||||||
bool m_altDown;
|
bool m_altDown;
|
||||||
bool m_metaDown;
|
bool m_metaDown;
|
||||||
|
|
||||||
|
int m_wheelAxis;
|
||||||
int m_wheelRotation;
|
int m_wheelRotation;
|
||||||
int m_wheelDelta;
|
int m_wheelDelta;
|
||||||
int m_linesPerAction;
|
int m_linesPerAction;
|
||||||
|
@ -539,6 +539,7 @@ wxMouseEvent::wxMouseEvent(wxEventType commandType)
|
|||||||
m_wheelRotation = 0;
|
m_wheelRotation = 0;
|
||||||
m_wheelDelta = 0;
|
m_wheelDelta = 0;
|
||||||
m_linesPerAction = 0;
|
m_linesPerAction = 0;
|
||||||
|
m_wheelAxis = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMouseEvent::Assign(const wxMouseEvent& event)
|
void wxMouseEvent::Assign(const wxMouseEvent& event)
|
||||||
@ -560,6 +561,7 @@ void wxMouseEvent::Assign(const wxMouseEvent& event)
|
|||||||
m_wheelRotation = event.m_wheelRotation;
|
m_wheelRotation = event.m_wheelRotation;
|
||||||
m_wheelDelta = event.m_wheelDelta;
|
m_wheelDelta = event.m_wheelDelta;
|
||||||
m_linesPerAction = event.m_linesPerAction;
|
m_linesPerAction = event.m_linesPerAction;
|
||||||
|
m_wheelAxis = event.m_wheelAxis;
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if was a button dclick event
|
// return true if was a button dclick event
|
||||||
|
Loading…
Reference in New Issue
Block a user