Refactor MSW gesture events initialization
Don't repeat the same code for initializing events in several different functions but put it in a helper InitGestureEvent() function and just call it from the event-specific handlers.
This commit is contained in:
@@ -360,6 +360,10 @@ public:
|
||||
bool HandleMouseWheel(wxMouseWheelAxis axis,
|
||||
WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
// Common gesture event initialization, returns true if it is the initial
|
||||
// event (GF_BEGIN set in flags), false otherwise.
|
||||
bool InitGestureEvent(wxGestureEvent& event, int x, int y, WXDWORD flags);
|
||||
|
||||
bool HandlePanGesture(int x, int y, WXDWORD flags);
|
||||
bool HandleZoomGesture(int x, int y, WXDWORD fingerDistance, WXDWORD flags);
|
||||
bool HandleRotateGesture(int x, int y, WXDWORD angleArgument, WXDWORD flags);
|
||||
|
Reference in New Issue
Block a user