Merge "Exporting one constructor used by csharpbinder and making an API private....
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / layouting / absolute-layout.h
1 #ifndef DALI_TOOLKIT_LAYOUTING_ABSOLUTE_LAYOUT_H
2 #define DALI_TOOLKIT_LAYOUTING_ABSOLUTE_LAYOUT_H
3
4 /*
5  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 #include <dali/public-api/common/dali-common.h>
21 #include <dali/public-api/object/base-handle.h>
22 #include <dali-toolkit/devel-api/layouting/layout-group.h>
23 #include <dali-toolkit/devel-api/layouting/layout-size.h>
24 #include <dali-toolkit/public-api/toolkit-property-index-ranges.h>
25
26 namespace Dali
27 {
28 namespace Toolkit
29 {
30
31 namespace Internal DALI_INTERNAL
32 {
33 class AbsoluteLayout;
34 }
35
36 /**
37  * This class implements a absolute layout, allowing explict positioning of
38  * children.
39  * Positions are from the top left of the layout and can be set using the
40  * Actor::Property::POSITION and alike.
41  */
42 class DALI_TOOLKIT_API AbsoluteLayout : public LayoutGroup
43 {
44 public:
45
46   enum PropertyRange
47   {
48     CHILD_PROPERTY_START_INDEX = ABSOLUTE_LAYOUT_CHILD_PROPERTY_START_INDEX,
49     CHILD_PROPERTY_END_INDEX   = ABSOLUTE_LAYOUT_CHILD_PROPERTY_END_INDEX
50   };
51
52   /**
53    * @brief Creates an uninitialized AbsoluteLayout handle.
54    *
55    * Initialize it using AbsoluteLayout::New().
56    * Calling member functions with an uninitialized handle is not allowed.
57    */
58   AbsoluteLayout();
59
60   /**
61    * @brief Creates a AbsoluteLayout object.
62    */
63   static AbsoluteLayout New();
64
65   /**
66    * @brief Downcasts a handle to a AbsoluteLayout handle.
67    *
68    * If handle points to a AbsoluteLayout, the downcast produces a valid handle.
69    * If not, the returned handle is left uninitialized.
70
71    * @param[in] handle to an object
72    * @return Handle to a AbsoluteLayout or an uninitialized handle
73    */
74   static AbsoluteLayout DownCast( BaseHandle handle );
75
76   /**
77    * @brief Copy constructor
78    */
79   AbsoluteLayout( const AbsoluteLayout& other );
80
81   /**
82    * @brief Assigment operator
83    */
84   AbsoluteLayout& operator=( const AbsoluteLayout& other );
85
86   /**
87    * @brief Default destructor.
88    *
89    * This is non-virtual, since derived Handle types must not contain data or virtual methods
90    */
91   ~AbsoluteLayout()=default;
92
93
94 public: // Not intended for application developers
95
96   /// @cond internal
97   /**
98    * @brief This constructor is used by AbsoluteLayout::New() methods.
99    *
100    * @param[in] actor A pointer to a newly allocated Dali resource
101    */
102   explicit DALI_INTERNAL AbsoluteLayout( Internal::AbsoluteLayout* body );
103   /// @endcond
104 };
105
106 } // namespace Toolkit
107 } // namespace Dali
108
109 #endif // DALI_TOOLKIT_LAYOUTING_ABSOLUTE_LAYOUT_H