X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Flayouting%2Flayout-parent-impl.h;h=a55c7cbb5104074bb318bd4047699e40868b2212;hb=b8c53c32af48487b8d5178425ecf8f801e44ad4d;hp=d55fb420e420d53b908fa9d64d51b0b88af6b3d0;hpb=e4235b523a775fbbee334dea6cd929a6f3ccbc80;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/layouting/layout-parent-impl.h b/dali-toolkit/devel-api/layouting/layout-parent-impl.h index d55fb42..a55c7cb 100644 --- a/dali-toolkit/devel-api/layouting/layout-parent-impl.h +++ b/dali-toolkit/devel-api/layouting/layout-parent-impl.h @@ -25,25 +25,40 @@ namespace Toolkit { namespace Internal { +class LayoutItem; /** - * Interface that allows a layout to determine its layout parent. - * - * Needed to prevent circular inheritance - most LayoutBases have a parent, - * but parenting is provided by LayoutGroup, which is a sub-class of LayoutBase. + * Interface that defines a layout Parent. Enables a layout child to access + * methods on its parent, e.g. Remove (during unparenting) */ class DALI_TOOLKIT_API LayoutParent { public: /** - * Set the parent of this layout. + * @brief Add a child to the parent + * @param[in] item The item to add to this layout parent */ - virtual void SetParent( LayoutParent* parent ) = 0; + virtual Toolkit::LayoutGroup::LayoutId Add( LayoutItem& item ) = 0; /** - * Get the parent of this layout. + * @brief Remove a layout child from this group. + * @param[in] childId The layout child id */ - virtual LayoutParent* GetParent() = 0; + virtual void Remove( Toolkit::LayoutGroup::LayoutId childId ) = 0; + + /** + * @brief Remove a child from this parent + * @param[in] item The item to remove from this layout parent + */ + virtual void Remove( LayoutItem& item ) = 0; + + /** + * @brief Insert a child to the parent + * @param[in] target The target item + * @param[in] item The item to insert to this layout parent + */ + virtual Toolkit::LayoutGroup::LayoutId Insert( LayoutItem& target, LayoutItem& item ) = 0; + protected: virtual ~LayoutParent() @@ -52,6 +67,7 @@ protected: }; + } // namespace Internal } // namespace Toolkit } // namespace Dali