X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Flayouting%2Flayout-group-impl.h;h=ee73c889df06383768e2dca8c400c796a3bf5ab2;hb=7742c07e1fdc5d78bab7c2c9cc5d7803f04fb012;hp=025950c64f8e1519ed89917b13f62cf1223b4064;hpb=20b42a9bcaba6b874f2271f03a56da6f884c4053;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/layouting/layout-group-impl.h b/dali-toolkit/devel-api/layouting/layout-group-impl.h index 025950c..ee73c88 100644 --- a/dali-toolkit/devel-api/layouting/layout-group-impl.h +++ b/dali-toolkit/devel-api/layouting/layout-group-impl.h @@ -23,6 +23,7 @@ #include #include #include +#include #include namespace Dali @@ -54,8 +55,9 @@ using LayoutGroupPtr = IntrusivePtr; * OnLayout should use it's own layout parameters and the measured children's size to determine the children's * position and size; it should then call Layout() on the child layout to layout the child and it's hierarchy. */ -class DALI_IMPORT_API LayoutGroup : public LayoutItem, - public ConnectionTracker +class DALI_TOOLKIT_API LayoutGroup : public LayoutItem, + public LayoutParent, + public ConnectionTracker { public: /** @@ -63,6 +65,14 @@ public: */ LayoutGroup(); + /** + * @brief Construct + * + * @param[in] owner The owner (container view / child view / visual ) of this layout + * @return a new LayoutGroup object + */ + static LayoutGroupPtr New( Handle& owner ); + protected: /** * Virtual destructor may only be called by Unreference() @@ -79,19 +89,39 @@ public: * @param[in] layoutChild The child to add * @return The layout id of this child. */ - Toolkit::LayoutGroup::LayoutId Add( LayoutItem& layoutChild ); + Toolkit::LayoutGroup::LayoutId Add( LayoutItem& layoutChild ) override; /** * @brief Remove a layout child from this group. * @param[in] childId The layout child id */ - void Remove( Toolkit::LayoutGroup::LayoutId childId ); + void Remove( Toolkit::LayoutGroup::LayoutId childId ) override; /** * @brief Remove a layout child from this group * @param[in] child The layout child */ - void Remove( LayoutItem& child ); + void Remove( LayoutItem& child ) override; + + /** + * @brief Insert a child to the parent + * @param[in] target The target item + * @param[in] child The item to insert to this layout parent + */ + Toolkit::LayoutGroup::LayoutId Insert( LayoutItem& target, LayoutItem& child ) override; + + /** + * @brief Move a child to another position + * @param[in] target The target item + * @param[in] child The item to move + */ + Toolkit::LayoutGroup::LayoutId Move( LayoutItem& target, LayoutItem& child ) override; + + /** + * @brief Move a child to back + * @param[in] child The item to move + */ + Toolkit::LayoutGroup::LayoutId MoveBack( LayoutItem& child ) override; /** * @brief Remove all layout children. @@ -226,6 +256,15 @@ protected: LayoutLength widthUsed, MeasureSpec parentHeightMeasureSpec, LayoutLength heightUsed ); + /** + * @copydoc LayoutItem::OnMeasure + */ + virtual void OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeasureSpec ) override; + + /** + * @copydoc LayoutItem::OnLayout + */ + virtual void OnLayout( bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom ) override; private: /** @@ -245,6 +284,11 @@ private: void OnUnparent() override final; /** + * Method to remove a child from this group + */ + void RemoveChild( LayoutItem& item ); + + /** * Callback when child is added to owner */ void ChildAddedToOwner( Actor child ); @@ -255,6 +299,11 @@ private: void ChildRemovedFromOwner( Actor child ); /** + * Callback when child order is changed + */ + void ChildOrderChanged( Actor child ); + + /** * Callback when an owner property is set. Triggers a relayout if it's a child property */ void OnOwnerPropertySet( Handle& handle, Property::Index index, Property::Value value ); @@ -267,6 +316,11 @@ private: */ void OnSetChildProperties( Handle& handle, Property::Index index, Property::Value value ); + /** + * @brief Called when a layer animation state is changed. + */ + void OnAnimationStateChanged( bool animateLayout ) override final; + public: class Impl; // Class declaration is public so we can add devel API's in the future