-#ifndef __DALI_INTERNAL_TAP_GESTURE_EVENT_PROCESSOR_H__
-#define __DALI_INTERNAL_TAP_GESTURE_EVENT_PROCESSOR_H__
+#ifndef DALI_INTERNAL_TAP_GESTURE_EVENT_PROCESSOR_H
+#define DALI_INTERNAL_TAP_GESTURE_EVENT_PROCESSOR_H
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
namespace Dali
{
-namespace Integration
-{
-class GestureManager;
-struct GestureEvent;
-struct TapGestureEvent;
-}
-
namespace Internal
{
+class Scene;
class Stage;
class Actor;
+struct GestureEvent;
+struct TapGestureEvent;
+
/**
* Tap Gesture Event Processing:
*
* - Find the actor that requires a tap where the tap occurred.
* - Emit the gesture if the tap gesture event satisfies the detector conditions.
*/
-class TapGestureProcessor : public GestureProcessor
+class TapGestureProcessor : public GestureProcessor, public RecognizerObserver<TapGestureEvent>
{
public:
/**
* Create a tap gesture processor.
- * @param[in] stage The stage.
- * @param[in] gestureManager The gesture manager.
*/
- TapGestureProcessor(Stage& stage, Integration::GestureManager& gestureManager);
+ TapGestureProcessor();
/**
* Non-virtual destructor; TapGestureProcessor is not a base class
/**
* This method is called whenever a tap gesture event occurs.
+ * @param[in] scene The scene the tap gesture event occurs in.
* @param[in] tapEvent The event that has occurred.
*/
- void Process(const Integration::TapGestureEvent& tapEvent);
+ void Process( Scene& scene, const TapGestureEvent& event);
/**
* Adds a gesture detector to this gesture processor.
* gesture with the adaptor.
* @param[in] gestureDetector The gesture detector being added.
*/
- void AddGestureDetector(TapGestureDetector* gestureDetector);
+ void AddGestureDetector(TapGestureDetector* gestureDetector, Scene& scene);
/**
* Removes the specified gesture detector from this gesture processor. If, after removing this
private:
- Stage& mStage;
- Integration::GestureManager& mGestureManager;
- TapGestureDetectorContainer mGestureDetectors;
+ TapGestureDetectorContainer mTapGestureDetectors;
unsigned int mMinTapsRequired;
unsigned int mMaxTapsRequired;
unsigned int mMaxTouchesRequired;
ActorObserver mCurrentTapActor; ///< Observer for the current gesture actor
- const Integration::TapGestureEvent* mCurrentTapEvent; ///< Pointer to current TapEvent, used when calling ProcessAndEmit()
+ const TapGestureEvent* mCurrentTapEvent; ///< Pointer to current TapEvent, used when calling ProcessAndEmit()
bool mPossibleProcessed; ///< Indication of whether we've processed a touch down for this gestuee
};
} // namespace Dali
-#endif // __DALI_INTERNAL_TAP_GESTURE_EVENT_PROCESSOR_H__
+#endif // DALI_INTERNAL_TAP_GESTURE_EVENT_PROCESSOR_H