#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>
/**
* Base class for layouts.
*/
-class DALI_IMPORT_API LayoutItem : public BaseObject,
- public LayoutParent
+class DALI_TOOLKIT_API LayoutItem : public BaseObject,
+ public LayoutChild
{
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();
bool IsLayoutAnimated() const;
/**
- * @brief Register child properties of layout with owner type.
- *
- * The Actor hierarchy uses these registered properties in the type
- * system to ensure child custom properties are properly initialized.
- *
- * @param[in] containerType The type of the containing view (owner)
- */
- void RegisterChildProperties( const std::string& containerType );
-
- /**
* @brief This is called to find out how big a layout should be.
*
* The parent supplies constraint information in the width and height parameters.
static LayoutLength GetDefaultSize( LayoutLength size, MeasureSpec measureSpec );
/**
- * @copydoc LayoutParent::GetParent
+ * @copydoc LayoutChild::SetParent
*/
- virtual LayoutParent* GetParent() override;
+ void SetParent( LayoutParent* parent ) override;
+
+ /**
+ * @copydoc LayoutChild::GetParent
+ */
+ LayoutParent* GetParent() override;
/**
* @brief Request that this layout is re-laid out.
bool IsLayoutRequested() const;
/**
+ * @brief Set layout requested flag (mark the layout dirty).
+ */
+ void SetLayoutRequested();
+
+ /**
* @brief Get the measured width (without any measurement flags).
*
* This method should be used only during measurement and layout calculations.
*/
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.
*/
void OnLayoutAnimationFinished( Animation& animation );
+ /**
+ * @brief Register child properties of layout with owner type.
+ *
+ * The Actor hierarchy uses these registered properties in the type
+ * system to ensure child custom properties are properly initialized.
+ *
+ * @param[in] containerType The type of the containing view (owner)
+ */
+ void RegisterChildProperties( const std::string& containerType );
+
public:
class Impl; // Class declaration is public so we can add devel API's in the future