Legacy Size negotiation mapper
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / layouting / layout-item-impl.h
index 8e4cdf3..3850e5f 100644 (file)
@@ -24,7 +24,7 @@
 #include <dali/public-api/actors/actor-enumerations.h>
 #include <dali-toolkit/devel-api/layouting/child-layout-data.h>
 #include <dali-toolkit/devel-api/layouting/layout-item.h>
-#include <dali-toolkit/devel-api/layouting/layout-parent-impl.h>
+#include <dali-toolkit/devel-api/layouting/layout-child-impl.h>
 #include <dali-toolkit/devel-api/layouting/layout-controller.h>
 #include <dali-toolkit/devel-api/layouting/layout-size.h>
 #include <dali-toolkit/devel-api/layouting/measure-spec.h>
@@ -45,7 +45,7 @@ using LayoutItemPtr = IntrusivePtr<LayoutItem>;
  * Base class for layouts.
  */
 class DALI_TOOLKIT_API LayoutItem : public BaseObject,
-                                    public LayoutParent
+                                    public LayoutChild
 {
 public:
   /**
@@ -94,7 +94,8 @@ public:
   Handle GetOwner() const;
 
   /**
-   * @brief Unparent this layout from it's owner, and remove any layout children in derived types
+   * @brief Unparent this layout from it's parent, remove it from it's owner
+   * and remove any layout children in derived types.
    */
   void Unparent();
 
@@ -158,14 +159,14 @@ public:
   static LayoutLength GetDefaultSize( LayoutLength size, MeasureSpec measureSpec );
 
   /**
-   * @copydoc LayoutParent::SetParent
+   * @copydoc LayoutChild::SetParent
    */
-  virtual void SetParent( LayoutParent* parent ) override;
+  void SetParent( LayoutParent* parent ) override;
 
   /**
-   * @copydoc LayoutParent::GetParent
+   * @copydoc LayoutChild::GetParent
    */
-  virtual LayoutParent* GetParent() override;
+  LayoutParent* GetParent() override;
 
   /**
    * @brief Request that this layout is re-laid out.
@@ -187,6 +188,18 @@ public:
   void SetLayoutRequested();
 
   /**
+   * @brief Checks if the Resize policy is being used for this LayoutItem
+   * @return true is ResizePolicy is used
+   */
+  bool IsResizePolicyRequired() const;
+
+  /**
+   * @brief Sets if the ResizePolicy is needed or not for this LayoutItem
+   * @param[in] resizeRequired true or false flag
+   */
+  void SetResizePolicyRequired( bool resizeRequired );
+
+  /**
    * @brief Get the measured width (without any measurement flags).
    *
    * This method should be used only during measurement and layout calculations.
@@ -419,6 +432,11 @@ protected:
    */
   virtual void OnInitialize();
 
+  /**
+   * @brief Called when a layer animation state is changed.
+   */
+  virtual void OnAnimationStateChanged( bool animateLayout ) {}
+
 private:
   /**
    * @brief Called to change the size of the layout.