#define __DALI_INTERNAL_GESTURE_DETECTOR_H__
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
/**
* @copydoc Dali::GestureDetector
*/
-class GestureDetector : public ProxyObject, public ProxyObject::Observer
+class GestureDetector : public Object, public Object::Observer
{
public:
void DetachAll();
/**
- * @copydoc Dali::GestureDetector::GetAttachedActors() const
+ * @copydoc Dali::GestureDetector::GetAttachedActorCount() const
*/
- std::vector<Dali::Actor> GetAttachedActors() const;
+ size_t GetAttachedActorCount() const;
+
+ /**
+ * @copydoc Dali::GestureDetector::GetAttachedActor() const
+ */
+ Dali::Actor GetAttachedActor(size_t index) const;
/**
* Returns a const reference to the container of attached actor pointers.
GestureDetector& operator=(const GestureDetector& rhs);
/**
- * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded()
+ * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded()
*/
- virtual void SceneObjectAdded(ProxyObject& proxy) {}
+ virtual void SceneObjectAdded(Object& object) {}
/**
- * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded()
+ * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded()
*/
- virtual void SceneObjectRemoved(ProxyObject& proxy) {}
+ virtual void SceneObjectRemoved(Object& object) {}
/**
- * @copydoc Dali::Internal::ProxyObject::Observer::ProxyDestroyed()
+ * @copydoc Dali::Internal::Object::Observer::ObjectDestroyed()
*/
- virtual void ProxyDestroyed(ProxyObject& proxy);
+ virtual void ObjectDestroyed(Object& object);
/**
* For use in derived classes, called after an actor is attached.
*/
virtual void OnActorDestroyed(Object& object) = 0;
- /**
- * Dummy touch event handler. We do not need to know when touch happens on our actor. We just
- * need to connect a function so that our attached actor is checked during our hit testing.
- * @param[in] actor The hit actor (or one of its parents).
- * @param[in] event The touch event.
- * @return false always as we do not process the event.
- */
- bool OnTouchEvent(Dali::Actor actor, const TouchEvent& event);
-
-private: // Default property extensions from ProxyObject
+private: // Default property extensions from Object
/**
- * @copydoc Dali::Internal::ProxyObject::IsSceneObjectRemovable()
- */
- virtual bool IsSceneObjectRemovable() const;
-
- /**
- * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount()
+ * @copydoc Dali::Internal::Object::GetDefaultPropertyCount()
*/
virtual unsigned int GetDefaultPropertyCount() const;
/**
- * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices()
+ * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices()
*/
virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const;
/**
- * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName()
+ * @copydoc Dali::Internal::Object::GetDefaultPropertyName()
*/
- virtual const std::string& GetDefaultPropertyName(Property::Index index) const;
+ virtual const char* GetDefaultPropertyName(Property::Index index) const;
/**
- * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex()
+ * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex()
*/
virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const;
/**
- * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable()
+ * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable()
*/
virtual bool IsDefaultPropertyWritable(Property::Index index) const;
/**
- * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable()
+ * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable()
*/
virtual bool IsDefaultPropertyAnimatable(Property::Index index) const;
/**
- * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput()
+ * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput()
*/
virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const;
/**
- * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType()
+ * @copydoc Dali::Internal::Object::GetDefaultPropertyType()
*/
virtual Property::Type GetDefaultPropertyType(Property::Index index) const;
/**
- * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty()
+ * @copydoc Dali::Internal::Object::SetDefaultProperty()
*/
virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue);
/**
- * @copydoc Dali::Internal::ProxyObject::SetCustomProperty()
- */
- virtual void SetCustomProperty( Property::Index index, const CustomProperty& entry, const Property::Value& value );
-
- /**
- * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty()
+ * @copydoc Dali::Internal::Object::GetDefaultProperty()
*/
virtual Property::Value GetDefaultProperty( Property::Index index ) const;
/**
- * @copydoc Dali::Internal::ProxyObject::InstallSceneObjectProperty()
+ * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
*/
- virtual void InstallSceneObjectProperty( SceneGraph::PropertyBase& newProperty, const std::string& name, unsigned int index );
+ virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const;
/**
- * @copydoc Dali::Internal::ProxyObject::GetSceneObject()
+ * @copydoc Dali::Internal::Object::GetSceneObject()
*/
virtual const SceneGraph::PropertyOwner* GetSceneObject() const;
/**
- * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty()
+ * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
*/
virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const;
/**
- * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty()
+ * @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.
- GestureDetectorActorContainer mAttachedActors; ///< Proxy<Node>::Observer is used to provide weak-pointer behaviour
+ GestureDetectorActorContainer mAttachedActors; ///< Object::Observer is used to provide weak-pointer behaviour
GestureEventProcessor& mGestureEventProcessor; ///< A reference to the gesture event processor.
-
-private:
-
- SlotDelegate< GestureDetector > mSlotDelegate;
};
} // namespace Internal