X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Flayouting%2Flayout-parent-impl.h;h=7c9414f6245daf1b7272cfa7a0fe748194a82d3d;hb=20125e47f9f183b0d39972ada01280da8984d942;hp=4ce1ab08fe6afb0733d9933c12d646d6d14e71ee;hpb=057a5b8dc25bf54f83799c4dda33bba6e8ed698b;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 old mode 100644 new mode 100755 index 4ce1ab0..7c9414f --- a/dali-toolkit/devel-api/layouting/layout-parent-impl.h +++ b/dali-toolkit/devel-api/layouting/layout-parent-impl.h @@ -17,31 +17,60 @@ * limitations under the License. */ +#include + namespace Dali { 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_IMPORT_API LayoutParent +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 Toolkit::LayoutGroup::LayoutId Add( LayoutItem& item ) = 0; + + /** + * @brief Remove a layout child from this group. + * @param[in] childId The layout child id + */ + 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 SetParent( LayoutParent* parent ) = 0; + virtual void Remove( LayoutItem& item ) = 0; /** - * Get the parent of this layout. + * @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 LayoutParent* GetParent() = 0; + virtual Toolkit::LayoutGroup::LayoutId Insert( LayoutItem& target, LayoutItem& item ) = 0; + + /** + * @brief Move a child to another position + * @param[in] target The target item + * @param[in] item The item to move + */ + virtual Toolkit::LayoutGroup::LayoutId Move( LayoutItem& target, LayoutItem& item ) = 0; + + /** + * @brief Move a child to back + * @param[in] item The item to move + */ + virtual Toolkit::LayoutGroup::LayoutId MoveBack( LayoutItem& item ) = 0; protected: virtual ~LayoutParent() @@ -50,6 +79,7 @@ protected: }; + } // namespace Internal } // namespace Toolkit } // namespace Dali