Merge "Exporting one constructor used by csharpbinder and making an API private....
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / layouting / layout-controller.h
1 #ifndef DALI_TOOLKIT_DEVEL_LAYOUT_CONTROLLER_H
2 #define DALI_TOOLKIT_DEVEL_LAYOUT_CONTROLLER_H
3 /*
4  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #include <dali/public-api/object/base-handle.h>
20 #include <dali/public-api/common/dali-common.h>
21 #include <dali-toolkit/public-api/controls/control.h>
22 #include <dali-toolkit/devel-api/layouting/layout-item.h>
23 #include <dali-toolkit/devel-api/layouting/layout-group.h>
24
25 namespace Dali
26 {
27 namespace Toolkit
28 {
29
30 namespace Internal
31 {
32 class LayoutController;
33 }
34
35 /**
36  * @brief Controls the process of layouting the control tree. It provides methods to enable
37  * controls to re-layout and internal systems to separately measure and layout controls.
38  */
39 class DALI_TOOLKIT_API LayoutController : public BaseHandle
40 {
41 public:
42   /**
43    * @brief Constructor - create an uninitialized handle.
44    *
45    * This can be initialized with LayoutController::Get().
46    * Calling member functions with an uninitialized handle is not allowed.
47    */
48   LayoutController();
49
50   /**
51    * @brief Destructor.
52    *
53    * This is non-virtual since derived Handle types must not contain data or virtual methods.
54    */
55   ~LayoutController();
56
57   /**
58    * @brief Gets the singleton of the LayoutController object.
59    *
60    * @return A handle to the LayoutController object.
61    */
62   static LayoutController Get();
63
64   /**
65    * @brief Request for a particular layout (wrapping a control or a visual) to be measured and laid out.
66    * @param[in] layout The layout to measure & relayout.
67    */
68   void RequestLayout( LayoutItem layout );
69
70 public:
71   /// @cond internal
72   /**
73    * @brief This constructor is used by LayoutController::New() methods.
74    *
75    * @param[in] actor A pointer to a newly allocated Dali resource
76    */
77   explicit DALI_INTERNAL LayoutController( Internal::LayoutController *impl );
78   /// @endcond
79 };
80
81 } // namespace Toolkit
82 } // namespace Dali
83
84 #endif // DALI_TOOLKIT_DEVEL_LAYOUT_CONTROLLER_H