Fix ItemView insert/remove when outside the current visible range
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / scrollable / item-view / item-view-impl.h
index 94a98bb..51bb3ae 100644 (file)
@@ -19,7 +19,9 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/dali.h>
+#include <dali/public-api/adaptor-framework/timer.h>
+#include <dali/public-api/animation/animation.h>
+#include <dali/public-api/object/property-notification.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
@@ -287,7 +289,7 @@ private:
   /**
    * Remove an Actor if found in the ItemPool.
    * @param[in] itemId The item to remove.
-   * @return True if an actor was removed.
+   * @return True if the remaining actors were reordered.
    */
   bool RemoveActor( unsigned int itemId );
 
@@ -397,6 +399,11 @@ private:
   void ReapplyAllConstraints( float durationSeconds );
 
   /**
+   * Helper to relayout after item(s) are removed.
+   */
+  void OnItemsRemoved();
+
+  /**
    * Helper to remove items outside a given range.
    * @param[in] range The range of required items.
    */
@@ -442,7 +449,7 @@ private:
    *
    * @param[in] gesture The gesture event.
    */
-  void OnPan(PanGesture pan);
+  void OnPan( const PanGesture& pan );
 
   /**
    * Helper to handle anchoring animations.