X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Flayouting%2Flayout-group.h;h=9d0e68431132c4afd08abbec13bf2ed305491c02;hb=56a9f0862566dfb88e0f0266c211ca9766e9bf49;hp=61d81e206997a2ca7f3812b60ab881af9c24d1fa;hpb=16634ab902b66b0ba2f3f39af8ff6ed25b5f7115;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/layouting/layout-group.h b/dali-toolkit/devel-api/layouting/layout-group.h index 61d81e2..9d0e684 100644 --- a/dali-toolkit/devel-api/layouting/layout-group.h +++ b/dali-toolkit/devel-api/layouting/layout-group.h @@ -19,7 +19,8 @@ #include #include #include -#include +#include +#include #include namespace Dali @@ -34,7 +35,7 @@ class LayoutGroup; /** - * A layout that has layout children. Implements LayoutBase. + * A layout that has layout children. Implements LayoutItem. * It can both layout it's children, and be laid out by a parent container. * * A layout group automatically handles adding a Control container's children to itself, @@ -48,23 +49,16 @@ class LayoutGroup; * To write a new layout, inherit from both LayoutGroup handle and Internal::LayoutGroup body. * */ -class DALI_IMPORT_API LayoutGroup : public LayoutBase +class DALI_TOOLKIT_API LayoutGroup : public LayoutItem { public: using LayoutId = unsigned int; static const unsigned int UNKNOWN_ID = 0; - enum PropertyRange - { - CHILD_PROPERTY_START_INDEX = CHILD_PROPERTY_REGISTRATION_START_INDEX+100, - CHILD_PROPERTY_END_INDEX = CHILD_PROPERTY_START_INDEX+1000 - }; - struct ChildProperty { enum { - MARGIN_SPECIFICATION = CHILD_PROPERTY_START_INDEX, }; }; @@ -86,6 +80,13 @@ public: ~LayoutGroup() = default; /** + * @brief Create an initialized LayoutGroup + * + * @param[in] handle A handle to the object that this layout for, e.g. a Control or a Visual::Base + */ + static LayoutGroup New( Handle& handle ); + + /** * @brief Copy constructor */ LayoutGroup(const LayoutGroup& copy) = default; @@ -112,7 +113,7 @@ public: * @param[in] childLayout The layout to add. * @return an Id of the child. */ - LayoutId Add( LayoutBase& childLayout ); + LayoutId Add( LayoutItem& childLayout ); /** * @brief Add a child layout to the layout group @@ -126,14 +127,14 @@ public: * * @param[in] childLayout The layout to remove. */ - void Remove( LayoutBase& childLayout ); + void Remove( LayoutItem& childLayout ); /** * @brief Get the child at the given index. * * @param[in] index The index of the child. */ - LayoutBase GetChildAt( unsigned int index ) const; + LayoutItem GetChildAt( unsigned int index ) const; /** * @brief Get the count of the children of the layout @@ -148,14 +149,13 @@ public: * @param[in] childId The id of the child to get * @return A handle to the child layout, or empty if not found */ - LayoutBase GetChild( LayoutId childId ) const ; + LayoutItem GetChild( LayoutId childId ) const ; /** * Delete template method to remove implicit casting to integer types. */ template - LayoutBase GetChild( T childId ) = delete; - + LayoutItem GetChild( T childId ) = delete; public: /// @cond internal @@ -164,7 +164,7 @@ public: * * @param[in] actor A pointer to a newly allocated Dali resource */ - explicit DALI_INTERNAL LayoutGroup( Internal::LayoutGroup* layoutGroup ); + explicit LayoutGroup( Internal::LayoutGroup* layoutGroup ); /// @endcond };