Merge "(ItemLayout) Remove redundant GetResizeAnimation" into devel/master
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Thu, 25 Jun 2015 15:36:59 +0000 (08:36 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 25 Jun 2015 15:36:59 +0000 (08:36 -0700)
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 67a2287..68938b9 100644 (file)
@@ -186,18 +186,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 2fa572d..557a089 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 c1f18f9..82ce8fc 100644 (file)
@@ -191,11 +191,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()
    */
   virtual Degree GetScrollDirection() const;
index 9339f0a..e1ca4d0 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 b2b3bd9..8cbdd33 100644 (file)
@@ -234,11 +234,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()
    */
   virtual Degree GetScrollDirection() const;
index 731fa90..83d2a1f 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 326dcc7..00f550a 100644 (file)
@@ -164,11 +164,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()
    */
   virtual Degree GetScrollDirection() const;
index 2ed5f1e..cc1a2ae 100644 (file)
@@ -244,17 +244,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.
    *
    * When an input gesture follows this direction, the layout-position of items will be increased.