1 #ifndef MSP_INPUT_GESTUREDETECTOR_H_
2 #define MSP_INPUT_GESTUREDETECTOR_H_
22 Interprets events from a Touchscreen as high-level gestures. One button is
23 provided for each type of gesture. Axes 0 and 1 indicate the starting position
24 of the gesture; axis 2 tracks its progress. The progress axis may exhibit
25 absolute values greater than one.
27 class GestureDetector: public Device
41 Touchscreen &touchscreen;
43 Gesture current_gesture;
44 unsigned active_points;
50 GestureDetector(Touchscreen &);
52 virtual std::string get_button_name(unsigned) const;
53 virtual std::string get_axis_name(unsigned) const;
56 void touch_down(unsigned);
57 void touch_up(unsigned);
58 void touch_move(unsigned, float, float);
60 void update_progress();
61 void window_resized(unsigned, unsigned);