-#ifndef __DALI_TAP_GESTURE_DETECTOR_H__
-#define __DALI_TAP_GESTURE_DETECTOR_H__
+#ifndef DALI_TAP_GESTURE_DETECTOR_H
+#define DALI_TAP_GESTURE_DETECTOR_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class TapGestureDetector;
}
-struct TapGesture;
+class TapGesture;
/**
* @brief This class emits a signal when a tap gesture occurs that meets the requirements set by the
class DALI_CORE_API TapGestureDetector : public GestureDetector
{
public: // Typedefs
-
/**
* @brief Signal type for detected signal.
* @SINCE_1_0.0
*/
- typedef Signal< void ( Actor, const TapGesture& ) > DetectedSignalType;
+ using DetectedSignalType = Signal<void(Actor, const TapGesture&)>;
public: // Creation & Destruction
-
/**
* @brief Creates an uninitialized TapGestureDetector; this can be initialized with TapGestureDetector::New().
*
* @param[in] tapsRequired The minimum & maximum number of taps required
* @return A handle to a newly allocated Dali resource
*/
- static TapGestureDetector New( uint32_t tapsRequired );
+ static TapGestureDetector New(uint32_t tapsRequired);
/**
* @brief Downcasts a handle to TapGestureDetector handle.
* @param[in] handle Handle to an object
* @return Handle to a TapGestureDetector object or an uninitialized handle
*/
- static TapGestureDetector DownCast( BaseHandle handle );
+ static TapGestureDetector DownCast(BaseHandle handle);
/**
* @brief Destructor.
TapGestureDetector& operator=(const TapGestureDetector& rhs);
public: // Setters
-
/**
* @brief Sets the minimum number of taps required.
*
* @SINCE_1_0.0
* @param[in] minimumTaps The minimum taps required
* @pre The gesture detector has been initialized.
- * @note The default is '1'.
+ * @note The default is '1', the maximum is 2.
+ * @see ReceiveAllTapEvents
*/
- void SetMinimumTapsRequired( uint32_t minimumTaps );
+ void SetMinimumTapsRequired(uint32_t minimumTaps);
/**
* @brief Sets the maximum number of taps required.
* @SINCE_1_0.0
* @param[in] maximumTaps The maximum taps required
* @pre The gesture detector has been initialized.
- * @note The default is '1'.
+ * @note The default is '1', the maximum is 2.
+ * @see ReceiveAllTapEvents
*/
- void SetMaximumTapsRequired( uint32_t maximumTaps );
+ void SetMaximumTapsRequired(uint32_t maximumTaps);
-public: // Getters
+ /**
+ * @brief When set to true, all tap gestures will be received when multiple taps are supported by the gesture detector.
+ *
+ * @param[in] receive The receiving all tap events flag
+ * @pre The gesture detector has been initialized.
+ * @note The default is false.
+ */
+ void ReceiveAllTapEvents(bool receive);
+public: // Getters
/**
* @brief Retrieves the minimum number of taps required.
*
uint32_t GetMaximumTapsRequired() const;
public: // Signals
-
/**
* @brief This signal is emitted when the specified tap is detected on the attached actor.
*
DetectedSignalType& DetectedSignal();
public: // Not intended for Application developers
-
/// @cond internal
/**
* @brief This constructor is used by TapGestureDetector::New() methods.
} // namespace Dali
-#endif // __DALI_TAP_GESTURE_DETECTOR_H__
+#endif // DALI_TAP_GESTURE_DETECTOR_H