Change overshoot to have constant speed as a property
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / scrollable / scrollable.h
index e1ce852..d357b8a 100644 (file)
@@ -21,7 +21,7 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
-namespace Dali DALI_IMPORT_API
+namespace Dali
 {
 
 namespace Toolkit
@@ -67,7 +67,7 @@ struct ClampState3
  *
  * Scrollables such as ScrollView and ItemView can be derived from this class.
  */
-class Scrollable : public Control
+class DALI_IMPORT_API Scrollable : public Control
 {
 public:
 
@@ -101,6 +101,7 @@ public:
   /// @name Properties
   /** @{ */
   static const Property::Index PROPERTY_OVERSHOOT_EFFECT_COLOR;         ///< Property, name "overshoot-effect-color",  @see SetOvershootEffectColor(),  type VECTOR4
+  static const Property::Index PROPERTY_OVERSHOOT_ANIMATION_SPEED;      ///< Property, name "overshoot-animation-speed",  @see SetOvershootAnimationSpeed(),  type FLOAT
   /** @} */
 
   /// @name Signals
@@ -219,6 +220,19 @@ public:
    */
   Vector4 GetOvershootEffectColor() const;
 
+  /**
+   * @brief Set the speed of overshoot animation in pixels per second.
+   * When the speed is not greater than 0, the overshoot is set instantly with no animation.
+   * @param[in] pixelsPerSecond The speed of the overshoot animation.
+   */
+  void SetOvershootAnimationSpeed( float pixelsPerSecond );
+
+  /**
+   * @brief Get the speed of overshoot animation in pixels per second.
+   * @return The speed of the overshoot animation.
+   */
+  float GetOvershootAnimationSpeed() const;
+
 public: // Not intended for application developers
 
   /**
@@ -226,14 +240,14 @@ public: // Not intended for application developers
    *
    * @param[in]  implementation  The Control implementation.
    */
-  Scrollable(Internal::Scrollable& implementation);
+  DALI_INTERNAL Scrollable(Internal::Scrollable& implementation);
 
   /**
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @param[in]  internal  A pointer to the internal CustomActor.
    */
-  Scrollable( Dali::Internal::CustomActor* internal );
+  explicit DALI_INTERNAL Scrollable( Dali::Internal::CustomActor* internal );
 };
 
 } // namespace Toolkit