]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/gesturedetector.h
Use default member initializers and defaulted default constructors
[libs/gui.git] / source / input / gesturedetector.h
index f39fdce98e609f5b345d02efdcb9c9a5fe8be9c7..7f9726c8295ce5d223b93f241dd013f3918cabd9 100644 (file)
@@ -13,8 +13,10 @@ enum Gesture
        GESTURE_NONE,
        GESTURE_TAP,
        GESTURE_TAP_2,
+       GESTURE_TAP_3,
        GESTURE_DRAG,
        GESTURE_DRAG_2,
+       GESTURE_DRAG_3,
        GESTURE_PINCH,
        GESTURE_ROTATE
 };
@@ -47,17 +49,17 @@ private:
 
        Touchscreen &touchscreen;
        TouchPoint points[MAX_POINTS];
-       Gesture current_gesture;
-       Gesture pending_tap;
-       bool invalid_gesture;
-       float threshold_x_sq;
-       float threshold_y_sq;
+       Gesture current_gesture = GESTURE_NONE;
+       Gesture pending_tap = GESTURE_NONE;
+       bool invalid_gesture = false;
+       float threshold_x_sq = 1.0f;
+       float threshold_y_sq = 1.0f;
 
 public:
        GestureDetector(Touchscreen &);
 
-       virtual std::string get_button_name(unsigned) const;
-       virtual std::string get_axis_name(unsigned) const;
+       std::string get_button_name(unsigned) const override;
+       std::string get_axis_name(unsigned) const override;
 
 private:
        void touch_down(unsigned);