Fixed some errors reported by Clang
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / layouting / layout-group.h
old mode 100644 (file)
new mode 100755 (executable)
index 61d81e2..45aec98
@@ -1,7 +1,7 @@
 #ifndef DALI_TOOLKIT_LAYOUTING_LAYOUT_GROUP_H
 #define DALI_TOOLKIT_LAYOUTING_LAYOUT_GROUP_H
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,9 +17,9 @@
  */
 
 #include <memory>
-#include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/actors/actor-enumerations.h>
-#include <dali-toolkit/devel-api/layouting/layout-base.h>
+#include <dali-toolkit/devel-api/toolkit-property-index-ranges.h>
+#include <dali-toolkit/devel-api/layouting/layout-item.h>
 #include <dali-toolkit/devel-api/layouting/measure-spec.h>
 
 namespace Dali
@@ -34,7 +34,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,27 +48,12 @@ 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,
-    };
-  };
-
-
   /**
    * @brief Creates an uninitialized LayoutGroup handle.
    *
@@ -86,6 +71,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 +104,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 +118,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 +140,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 <typename T>
-    LayoutBase GetChild( T childId ) = delete;
-
+    LayoutItem GetChild( T childId ) = delete;
 
 public:
   /// @cond internal
@@ -164,7 +155,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
 };