-#ifndef __DALI_INTERNAL_GESTURE_DETECTOR_H__
-#define __DALI_INTERNAL_GESTURE_DETECTOR_H__
+#ifndef DALI_INTERNAL_GESTURE_DETECTOR_H
+#define DALI_INTERNAL_GESTURE_DETECTOR_H
/*
- * Copyright (c) 2017 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.
* Retrieves the type of GestureDetector
* @return The GestureDetector Type
*/
- Gesture::Type GetType() const
+ DevelGesture::Type GetType() const
{
return mType;
}
/**
- * Checks if the specified actor is still attached.
+ * Checks if the specified actor is still attached or pending attachment.
* @param[in] actor The actor to check.
- * @return true, if the actor is attached, false otherwise.
+ * @return true, if the actor is attached or pending, false otherwise.
*/
bool IsAttached(Actor& actor) const;
/**
* Construct a new GestureDetector.
+ * @param type the type of gesture
+ * @param pointer to the scene object, nullptr if none
+ * by default GestureDetectors don't have our own scene object
*/
- GestureDetector(Gesture::Type mType);
+ GestureDetector( DevelGesture::Type type, const SceneGraph::PropertyOwner* sceneObject = nullptr );
+
+ /**
+ * @copydoc GestureDetector( DevelGesture::Type, const SceneGraph::PropertyOwner* )
+ */
+ GestureDetector( Gesture::Type type, const SceneGraph::PropertyOwner* sceneObject = nullptr );
/**
* A reference counted object may only be deleted by calling Unreference()
private:
// Undefined
- GestureDetector(const GestureDetector&);
-
- // Undefined
- GestureDetector& operator=(const GestureDetector& rhs);
+ GestureDetector() = delete;
+ GestureDetector(const GestureDetector&) = delete;
+ GestureDetector& operator=(const GestureDetector& rhs) = delete;
/**
* @copydoc Dali::Internal::Object::Observer::SceneObjectAdded()
*/
- virtual void SceneObjectAdded(Object& object) {}
+ virtual void SceneObjectAdded(Object& object);
/**
* @copydoc Dali::Internal::Object::Observer::SceneObjectAdded()
*/
virtual void OnActorDestroyed(Object& object) = 0;
-private: // Default property extensions from Object
-
- /**
- * @copydoc Dali::Internal::Object::SetDefaultProperty()
- */
- virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue);
-
- /**
- * @copydoc Dali::Internal::Object::GetDefaultProperty()
- */
- virtual Property::Value GetDefaultProperty( Property::Index index ) const;
-
- /**
- * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
- */
- virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const;
-
- /**
- * @copydoc Dali::Internal::Object::GetSceneObject()
- */
- virtual const SceneGraph::PropertyOwner* GetSceneObject() const;
-
- /**
- * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
- */
- virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const;
-
- /**
- * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
- */
- virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const;
-
protected:
- Gesture::Type mType; ///< The gesture detector will detect this type of gesture.
+ DevelGesture::Type mType; ///< The gesture detector will detect this type of gesture.
GestureDetectorActorContainer mAttachedActors; ///< Object::Observer is used to provide weak-pointer behaviour
+ GestureDetectorActorContainer mPendingAttachActors; ///< Object::Observer is used to provide weak-pointer behaviour
GestureEventProcessor& mGestureEventProcessor; ///< A reference to the gesture event processor.
};
} // namespace Dali
-#endif // __DALI_INTERNAL_GESTURE_DETECTOR_H__
+#endif // DALI_INTERNAL_GESTURE_DETECTOR_H