Publish the OVERSHOOT_SIZE property in Scrollable 06/66406/2
authorPaul Wisbey <p.wisbey@samsung.com>
Mon, 18 Apr 2016 16:42:44 +0000 (17:42 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Mon, 18 Apr 2016 17:11:20 +0000 (18:11 +0100)
Change-Id: If09ff5491b0c098d34300872f26957eab31f9f59

dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/public-api/controls/scrollable/scrollable.h

index e1f79ca3b20caeb756e6941371d99b492b8c6ad5..3a4ad999242fa4e9ccbc0bec618303582a2c37ab 100644 (file)
@@ -49,8 +49,7 @@ DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Scrollable, Toolkit::Control, Create );
 DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshootEffectColor",      VECTOR4, OVERSHOOT_EFFECT_COLOR    )
 DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshootAnimationSpeed",   FLOAT,   OVERSHOOT_ANIMATION_SPEED )
 DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshootEnabled",          BOOLEAN, OVERSHOOT_ENABLED )
-const int OVERSHOOT_SIZE = Dali::Toolkit::Scrollable::Property::OVERSHOOT_ENABLED + 1; // OVERSHOOT_SIZE is not public yet
-Dali::PropertyRegistration p1( typeRegistration, "overshootSize",  OVERSHOOT_SIZE, Property::VECTOR2, Dali::Toolkit::Internal::Scrollable::SetProperty, Dali::Toolkit::Internal::Scrollable::GetProperty );
+DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshootSize",             VECTOR2, OVERSHOOT_SIZE )
 
 DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scrollRelativePosition",   VECTOR2, SCROLL_RELATIVE_POSITION)
 DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scrollPositionMin",        VECTOR2, SCROLL_POSITION_MIN)
@@ -200,7 +199,7 @@ void Scrollable::SetProperty( BaseObject* object, Property::Index index, const P
         scrollableImpl.SetOvershootEnabled( value.Get<bool>() );
         break;
       }
-      case OVERSHOOT_SIZE: // OVERSHOOT_SIZE is not public yet
+      case Toolkit::Scrollable::Property::OVERSHOOT_SIZE:
       {
         Vector2 input;
         if( value.Get( input ) )
@@ -240,7 +239,7 @@ Property::Value Scrollable::GetProperty( BaseObject* object, Property::Index ind
         value = scrollableImpl.IsOvershootEnabled();
         break;
       }
-      case OVERSHOOT_SIZE: // OVERSHOOT_SIZE is not public yet
+      case Toolkit::Scrollable::Property::OVERSHOOT_SIZE:
       {
         value = scrollableImpl.mOvershootSize;
         break;
index cd04e0753e31200a02140cdc5ffc97a6a7d683a4..e8af4890d1910479423727db206420e7478b57f2 100644 (file)
@@ -79,6 +79,7 @@ public:
       OVERSHOOT_EFFECT_COLOR = PROPERTY_START_INDEX, ///< Property, name "overshootEffectColor",      @see SetOvershootEffectColor(),    type Vector4 @SINCE_1_0.0
       OVERSHOOT_ANIMATION_SPEED,                     ///< Property, name "overshootAnimationSpeed",   @see SetOvershootAnimationSpeed(), type float @SINCE_1_0.0
       OVERSHOOT_ENABLED,                             ///< Property, name "overshootEnabled",          @see SetOvershootEnabled(),        type bool,    @SINCE_1_1.18
+      OVERSHOOT_SIZE,                                ///< Property, name "overshootSize",                                                type Vector2, @SINCE_1_1.31
 
       // Animatable properties
       SCROLL_RELATIVE_POSITION = ANIMATABLE_PROPERTY_START_INDEX, ///< Property, name "scrollRelativePosition",   type Vector2 @SINCE_1_0.0