Ensure animation is not played when an actor is not on scene
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / actor-impl.h
index b69d897..379667b 100644 (file)
@@ -56,15 +56,15 @@ class RenderTask;
 class Renderer;
 class Scene;
 
-typedef std::vector< ActorPtr > ActorContainer;
-typedef ActorContainer::iterator ActorIter;
-typedef ActorContainer::const_iterator ActorConstIter;
+using ActorContainer = std::vector<ActorPtr>;
+using ActorIter      = ActorContainer::iterator;
+using ActorConstIter = ActorContainer::const_iterator;
 
-typedef std::vector< RendererPtr > RendererContainer;
-typedef RendererContainer::iterator RendererIter;
+using RendererContainer = std::vector<RendererPtr>;
+using RendererIter      = RendererContainer::iterator;
 
 class ActorDepthTreeNode;
-typedef Dali::Internal::MemoryPoolObjectAllocator< ActorDepthTreeNode > DepthNodeMemoryPool;
+using DepthNodeMemoryPool = Dali::Internal::MemoryPoolObjectAllocator<ActorDepthTreeNode>;
 
 /**
  * Actor is the primary object which Dali applications interact with.
@@ -112,7 +112,7 @@ public:
     Dimension::Type dimension;    ///< The dimension to hold
   };
 
-  typedef std::vector< ActorDimensionPair > ActorDimensionStack;
+  using ActorDimensionStack = std::vector<ActorDimensionPair>;
 
 public:
 
@@ -1399,7 +1399,7 @@ public:
    * @param[in] type The gesture type.
    * @return True if the gesture is required, false otherwise.
    */
-  bool IsGestureRequred( Gesture::Type type ) const;
+  bool IsGestureRequired( GestureType::Value type ) const;
 
   // Signals
 
@@ -1563,7 +1563,7 @@ protected:
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual ~Actor();
+  ~Actor() override;
 
   /**
    * Called on a child during Add() when the parent actor is connected to the Scene.
@@ -1641,42 +1641,47 @@ public:
   /**
    * @copydoc Dali::Internal::Object::SetDefaultProperty()
    */
-  virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue );
+  void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ) override;
 
   /**
    * @copydoc Dali::Internal::Object::SetSceneGraphProperty()
    */
-  virtual void SetSceneGraphProperty( Property::Index index, const PropertyMetadata& entry, const Property::Value& value );
+  void SetSceneGraphProperty( Property::Index index, const PropertyMetadata& entry, const Property::Value& value ) override;
 
   /**
    * @copydoc Dali::Internal::Object::GetDefaultProperty()
    */
-  virtual Property::Value GetDefaultProperty( Property::Index index ) const;
+  Property::Value GetDefaultProperty( Property::Index index ) const override;
 
   /**
    * @copydoc Dali::Internal::Object::GetDefaultPropertyCurrentValue()
    */
-  virtual Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const;
+  Property::Value GetDefaultPropertyCurrentValue( Property::Index index ) const override;
 
   /**
    * @copydoc Dali::Internal::Object::OnNotifyDefaultPropertyAnimation()
    */
-  virtual void OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value, Animation::Type animationType );
+  void OnNotifyDefaultPropertyAnimation( Animation& animation, Property::Index index, const Property::Value& value, Animation::Type animationType ) override;
 
   /**
    * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty()
    */
-  virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const;
+  const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const override;
 
   /**
    * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty()
    */
-  virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const;
+  const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const override;
 
   /**
    * @copydoc Dali::Internal::Object::GetPropertyComponentIndex()
    */
-  virtual int32_t GetPropertyComponentIndex( Property::Index index ) const;
+  int32_t GetPropertyComponentIndex( Property::Index index ) const override;
+
+  /**
+   * @copydoc Dali::Internal::Object::IsAnimationPossible()
+   */
+  bool IsAnimationPossible() const override;
 
   /**
    * Retrieve the actor's node.
@@ -1830,28 +1835,6 @@ private:
   }
 
   /**
-   * For use in derived classes.
-   * This is only called if mDerivedRequiresHover is true, and the hover-signal was not consumed.
-   * @param[in] event The hover event.
-   * @return True if the event should be consumed.
-   */
-  virtual bool OnHoverEvent( const HoverEvent& event )
-  {
-    return false;
-  }
-
-  /**
-   * For use in derived classes.
-   * This is only called if the wheel signal was not consumed.
-   * @param[in] event The wheel event.
-   * @return True if the event should be consumed.
-   */
-  virtual bool OnWheelEvent( const WheelEvent& event )
-  {
-    return false;
-  }
-
-  /**
    * @brief Retrieves the cached event side value of a default property.
    * @param[in]  index  The index of the property
    * @param[out] value  Is set with the cached value of the property if found.
@@ -1884,7 +1867,7 @@ private:
    * Retrieve the parent object of an Actor.
    * @return The parent object, or NULL if the Actor does not have a parent.
    */
-  virtual Object* GetParentObject() const;
+  Object* GetParentObject() const override;
 
   /**
    * Set Sibling order
@@ -1996,9 +1979,6 @@ protected:
   bool mSensitive                                  : 1; ///< Whether the actor emits touch event signals
   bool mLeaveRequired                              : 1; ///< Whether a touch event signal is emitted when the a touch leaves the actor's bounds
   bool mKeyboardFocusable                          : 1; ///< Whether the actor should be focusable by keyboard navigation
-  bool mDerivedRequiresTouch                       : 1; ///< Whether the derived actor type requires touch event signals
-  bool mDerivedRequiresHover                       : 1; ///< Whether the derived actor type requires hover event signals
-  bool mDerivedRequiresWheelEvent                  : 1; ///< Whether the derived actor type requires wheel event signals
   bool mOnSceneSignalled                           : 1; ///< Set to true before OnSceneConnection signal is emitted, and false before OnSceneDisconnection
   bool mInsideOnSizeSet                            : 1; ///< Whether we are inside OnSizeSet
   bool mInheritPosition                            : 1; ///< Cached: Whether the parent's position should be inherited.