Removed On(...)Event()
[platform/core/uifw/dali-core.git] / dali / public-api / actors / custom-actor-impl.h
index f4cc9fe..39672af 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_CUSTOM_ACTOR_IMPL_H__
-#define __DALI_CUSTOM_ACTOR_IMPL_H__
+#ifndef DALI_CUSTOM_ACTOR_IMPL_H
+#define DALI_CUSTOM_ACTOR_IMPL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -44,10 +44,9 @@ class Animation;
 class CustomActor;
 class CustomActorImpl;
 class RelayoutContainer;
-struct KeyEvent;
-struct TouchEvent;
-struct HoverEvent;
-struct WheelEvent;
+class KeyEvent;
+class HoverEvent;
+class WheelEvent;
 struct Vector2;
 struct Vector3;
 
@@ -87,14 +86,14 @@ public:
   CustomActor Self() const;
 
   /**
-   * @brief Called after the actor has been connected to the stage.
+   * @brief Called after the actor has been connected to the Scene.
    *
    * When an actor is connected, it will be directly or indirectly parented to the root Actor.
-   * @SINCE_1_0.0
+   * @SINCE_1_9.24
    * @param[in] depth The depth in the hierarchy for the actor
    *
-   * @note The root Actor is provided automatically by Dali::Stage, and is always considered to be connected.
-   * When the parent of a set of actors is connected to the stage, then all of the children
+   * @note The root Actor is provided automatically by the Scene, and is always considered to be connected.
+   * When the parent of a set of actors is connected to the scene, then all of the children
    * will received this callback.
    * For the following actor tree, the callback order will be A, B, D, E, C, and finally F.
    *
@@ -109,15 +108,15 @@ public:
    * @endcode
    * @param[in] depth The depth in the hierarchy for the actor
    */
-  virtual void OnStageConnection( int32_t depth ) = 0;
+  virtual void OnSceneConnection( int32_t depth ) = 0;
 
   /**
-   * @brief Called after the actor has been disconnected from Stage.
+   * @brief Called after the actor has been disconnected from the Scene.
    *
    * If an actor is disconnected, it either has no parent or is parented to a disconnected actor.
    *
-   * @SINCE_1_0.0
-   * @note When the parent of a set of actors is disconnected to the stage, then all of the children
+   * @SINCE_1_9.24
+   * @note When the parent of a set of actors is disconnected to the scene, then all of the children
    * will received this callback, starting with the leaf actors.
    * For the following actor tree, the callback order will be D, E, B, F, C, and finally A.
    *
@@ -131,7 +130,7 @@ public:
    *
    * @endcode
    */
-  virtual void OnStageDisconnection() = 0;
+  virtual void OnSceneDisconnection() = 0;
 
   /**
    * @brief Called after a child has been added to the owning actor.
@@ -176,47 +175,6 @@ public:
   virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize) = 0;
 
   /**
-   * @DEPRECATED_1_1.37 Connect to TouchSignal() instead.
-   *
-   * @brief Called after a touch-event is received by the owning actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] event The touch event
-   * @return True if the event should be consumed
-   * @note CustomActorImpl::REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
-   */
-  virtual bool OnTouchEvent(const TouchEvent& event) DALI_DEPRECATED_API = 0;
-
-  /**
-   * @brief Called after a hover-event is received by the owning actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] event The hover event
-   * @return True if the event should be consumed
-   * @note CustomActorImpl::REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
-   */
-  virtual bool OnHoverEvent(const HoverEvent& event) = 0;
-
-  /**
-   * @brief Called after a key-event is received by the actor that has had its focus set.
-   *
-   * @SINCE_1_0.0
-   * @param[in] event The Key Event
-   * @return True if the event should be consumed
-   */
-  virtual bool OnKeyEvent(const KeyEvent& event) = 0;
-
-  /**
-   * @brief Called after a wheel-event is received by the owning actor.
-   *
-   * @SINCE_1_0.0
-   * @param[in] event The wheel event
-   * @return True if the event should be consumed
-   * @note CustomActorImpl::REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomActorImpl::CustomActorImpl( ActorFlags flags ).
-   */
-  virtual bool OnWheelEvent(const WheelEvent& event) = 0;
-
-  /**
    * @brief Called after the size negotiation has been finished for this control.
    *
    * The control is expected to assign this given size to itself/its children.
@@ -330,17 +288,13 @@ protected: // For derived classes
    */
   enum ActorFlags
   {
-    ACTOR_BEHAVIOUR_NONE          = 0,          ///< Use if no change to default behaviour is needed. @DEPRECATED_1_2_10
     ACTOR_BEHAVIOUR_DEFAULT       = 0,          ///< Use to provide default behaviour (size negotiation is on, event callbacks are not called). @SINCE_1_2_10
     DISABLE_SIZE_NEGOTIATION      = 1 << 0,     ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm @SINCE_1_0.0
-    REQUIRES_TOUCH_EVENTS         = 1 << 1,     ///< True if the OnTouchEvent() callback is required. @SINCE_1_0.0
-    REQUIRES_HOVER_EVENTS         = 1 << 2,     ///< True if the OnHoverEvent() callback is required. @SINCE_1_0.0
-    REQUIRES_WHEEL_EVENTS   = 1 << 3,     ///< True if the OnWheelEvent() callback is required. @SINCE_1_0.0
 
     LAST_ACTOR_FLAG                             ///< Special marker for last actor flag @SINCE_1_0.0
   };
 
-  static const int32_t ACTOR_FLAG_COUNT = Log< LAST_ACTOR_FLAG - 1 >::value + 1;      ///< Value for deriving classes to continue on the flag enum
+  static constexpr int32_t ACTOR_FLAG_COUNT = Log< LAST_ACTOR_FLAG - 1 >::value + 1;      ///< Value for deriving classes to continue on the flag enum
 
   /**
    * @brief Creates a CustomActorImpl.
@@ -422,30 +376,6 @@ public: // Not intended for application developers
   Internal::CustomActor* GetOwner() const;
 
   /**
-   * @brief Returns whether the OnTouchEvent() callback is required.
-   * @SINCE_1_0.0
-   * @return True if the OnTouchEvent() callback is required
-   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
-   */
-  bool RequiresTouchEvents() const;
-
-  /**
-   * @brief Returns whether the OnHoverEvent() callback is required.
-   * @SINCE_1_0.0
-   * @return True if the OnHoverEvent() callback is required
-   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
-   */
-  bool RequiresHoverEvents() const;
-
-  /**
-   * @brief Returns whether the OnWheelEvent() callback is required.
-   * @SINCE_1_0.0
-   * @return True if the OnWheelEvent() callback is required
-   * @note Called when ownership of the CustomActorImpl is passed to a CustomActor.
-   */
-  bool RequiresWheelEvents() const;
-
-  /**
    * @brief Returns whether relayout is enabled.
    * @SINCE_1_0.0
    * @return Return true if relayout is enabled on the custom actor
@@ -456,7 +386,7 @@ public: // Not intended for application developers
 private:
 
   Internal::CustomActor* mOwner;        ///< Internal owner of this custom actor implementation
-  ActorFlags mFlags :ACTOR_FLAG_COUNT;  ///< ActorFlags flags to determine behaviour
+  ActorFlags mFlags;  ///< ActorFlags flags to determine behaviour
 };
 
 /**
@@ -464,4 +394,4 @@ private:
  */
 } // namespace Dali
 
-#endif // __DALI_CUSTOM_ACTOR_IMPL_H__
+#endif // DALI_CUSTOM_ACTOR_IMPL_H