Use modern construct 'using' instead of typedef.
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / actor-impl.h
index 082fd98..169c329 100644 (file)
@@ -30,7 +30,6 @@
 #include <dali/public-api/math/viewport.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/size-negotiation/relayout-container.h>
-#include <dali/devel-api/events/gesture-devel.h>
 #include <dali/internal/common/memory-pool-object-allocator.h>
 #include <dali/internal/event/actors/actor-declarations.h>
 #include <dali/internal/event/common/object-impl.h>
 namespace Dali
 {
 
-struct KeyEvent;
+class KeyEvent;
 class TouchData;
-struct HoverEvent;
-struct WheelEvent;
+class TouchEvent;
+class WheelEvent;
 
 namespace Internal
 {
@@ -57,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.
@@ -113,7 +112,7 @@ public:
     Dimension::Type dimension;    ///< The dimension to hold
   };
 
-  typedef std::vector< ActorDimensionPair > ActorDimensionStack;
+  using ActorDimensionStack = std::vector<ActorDimensionPair>;
 
 public:
 
@@ -1400,7 +1399,7 @@ public:
    * @param[in] type The gesture type.
    * @return True if the gesture is required, false otherwise.
    */
-  bool IsGestureRequred( DevelGesture::Type type ) const;
+  bool IsGestureRequired( GestureType::Value type ) const;
 
   // Signals
 
@@ -1409,7 +1408,7 @@ public:
    * @param[in] touch The touch data.
    * @return True if the event was consumed.
    */
-  bool EmitTouchEventSignal( const Dali::TouchData& touch );
+  bool EmitTouchEventSignal( const Dali::TouchEvent& touch );
 
   /**
    * Used by the EventProcessor to emit hover event signals.
@@ -1423,7 +1422,7 @@ public:
    * @param[in] event The wheel event.
    * @return True if the event was consumed.
    */
-  bool EmitWheelEventSignal( const WheelEvent& event );
+  bool EmitWheelEventSignal( const Dali::WheelEvent& event );
 
   /**
    * @brief Emits the visibility change signal for this actor and all its children.
@@ -1451,9 +1450,9 @@ public:
   void EmitChildRemovedSignal( Actor& child );
 
   /**
-   * @copydoc Dali::Actor::TouchEventSignal()
+   * @copydoc Dali::Actor::TouchedSignal()
    */
-  Dali::Actor::TouchDataSignalType& TouchSignal();
+  Dali::Actor::TouchEventSignalType& TouchedSignal();
 
   /**
    * @copydoc Dali::Actor::HoveredSignal()
@@ -1831,28 +1830,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.
@@ -1967,7 +1944,7 @@ protected:
   ActorGestureData* mGestureData;   ///< Optional Gesture data. Only created when actor requires gestures
 
   // Signals
-  Dali::Actor::TouchDataSignalType         mTouchSignal;
+  Dali::Actor::TouchEventSignalType        mTouchedSignal;
   Dali::Actor::HoverSignalType             mHoveredSignal;
   Dali::Actor::WheelEventSignalType        mWheelEventSignal;
   Dali::Actor::OnSceneSignalType           mOnSceneSignal;
@@ -1997,9 +1974,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.