(ItemLayout) Remove redundant GetResizeAnimation 16/42316/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 25 Jun 2015 14:38:10 +0000 (15:38 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 25 Jun 2015 14:38:10 +0000 (15:38 +0100)
Change-Id: I11688a480ad0a37519f3ff35ab6d943fed23cc8a

automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h
dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp
dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h

index 67a228787c91959bf38307d0ee67627459c359db..68938b9034ad74cb8ce8bd1d6dcfeb625a500112 100644 (file)
@@ -185,18 +185,6 @@ public: // From ItemLayout
   {
   }
 
-  /**
-   * Retrieve the resize animation in the layout.
-   *
-   * @param[in] animation The resize animation, not owned by the layout
-   * @param[in] actor The actor to animate
-   * @param [in] size The target size.
-   * @param [in] durationSeconds The duration of the resizing.
-   */
-  virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const
-  {
-  }
-
   /**
    * @brief Query the scroll direction of the layout.
    * @return The scroll direction in degrees.
index 2fa572dd601cbc966ee01b64c732064e5723f964..557a0892ab1788ed5ff03ad1fd5f462b16759555 100644 (file)
@@ -418,14 +418,6 @@ void DepthLayout::GetDefaultItemSize( unsigned int itemId, const Vector3& layout
   itemSize.width = itemSize.height = itemSize.depth = ( IsVertical( GetOrientation() ) ? layoutSize.width : layoutSize.height ) / static_cast<float>( mImpl->mNumberOfColumns + 1 );
 }
 
-void DepthLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const
-{
-  if(animation)
-  {
-    animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size );
-  }
-}
-
 Degree DepthLayout::GetScrollDirection() const
 {
   Degree scrollDirection(0.0f);
index c1f18f9bdcd76da69e29a412129ebc23ad3da719..82ce8fcd1404666584869d712644c89dc3f9aaa4 100644 (file)
@@ -190,11 +190,6 @@ private:
    */
   virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const;
 
-  /**
-   * @copydoc ItemLayout::GetResizeAnimation()
-   */
-  virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const;
-
   /**
    * @copydoc ItemLayout::GetScrollDirection()
    */
index 9339f0a1f0e9de5c84bae6dd25a452b247b5656a..e1ca4d04111406a82fe5d7f11abceaa3b782e16e 100644 (file)
@@ -506,23 +506,6 @@ void GridLayout::GetDefaultItemSize( unsigned int itemId, const Vector3& layoutS
   itemSize.height = itemSize.depth = itemSize.width * 0.75f;
 }
 
-void GridLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const
-{
-  if(animation)
-  {
-    Vector3 currentSize( actor.GetCurrentSize() );
-    Vector3 shrink( currentSize );
-
-    shrink.width = std::min(size.width, currentSize.width);
-    shrink.height = std::min(size.height, currentSize.height);
-
-    // Do a nonlinear size animation to shrink the actor first when the actor size changes,
-    // so that we can avoid the actors overlapping during orientation change.
-    animation.AnimateTo( Property( actor, Actor::Property::SIZE ), shrink, AlphaFunction::EASE_OUT, TimePeriod( 0.0f, durationSeconds * 0.5f ) );
-    animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size, AlphaFunction::EASE_IN, TimePeriod( 0.0f, durationSeconds ) );
-  }
-}
-
 Degree GridLayout::GetScrollDirection() const
 {
   Degree scrollDirection(0.0f);
index b2b3bd91829abba30182c4c495cf8aae7924852a..8cbdd33ea05e67e3df5b7f78e3ebad5adaf694e1 100644 (file)
@@ -233,11 +233,6 @@ private:
    */
   virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const;
 
-  /**
-   * @copydoc ItemLayout::GetResizeAnimation()
-   */
-  virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const;
-
   /**
    * @copydoc ItemLayout::GetScrollDirection()
    */
index 731fa90797adb39a98fda9e005e2d060f0d30ac3..83d2a1f8ccae4a1e6a8b55fbeb191aa5dedcce61 100644 (file)
@@ -397,14 +397,6 @@ void SpiralLayout::GetDefaultItemSize( unsigned int itemId, const Vector3& layou
   itemSize.height = itemSize.depth = ( itemSize.width / 4.0f ) * 3.0f;
 }
 
-void SpiralLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const
-{
-  if(animation)
-  {
-    animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size );
-  }
-}
-
 Degree SpiralLayout::GetScrollDirection() const
 {
   Degree scrollDirection(0);
index 326dcc71024b404f0a7e4a34e067b94bc935ca6e..00f550a4b7c82820eaa59af64c414ef8d788e03f 100644 (file)
@@ -163,11 +163,6 @@ private:
    */
   virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const;
 
-  /**
-   * @copydoc ItemLayout::GetResizeAnimation()
-   */
-  virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const;
-
   /**
    * @copydoc ItemLayout::GetScrollDirection()
    */
index 2ed5f1ed78a4162083932e2b1d855b4f0c3d571f..cc1a2ae67b2311ed17efdba88971713cd5963f6e 100644 (file)
@@ -243,17 +243,6 @@ public:
    */
   virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const = 0;
 
-  /**
-   * @brief Retrieve the resize animation in the layout.
-   *
-   * @note This allows the layout to provide its own resize animation.
-   * @param[in] animation The resize animation, not owned by the layout
-   * @param[in] actor The actor to animate
-   * @param [in] size The target size.
-   * @param [in] durationSeconds The duration of the resizing.
-   */
-  virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const = 0;
-
   /**
    * @brief Query the scroll direction of the layout.
    *