Add Layout complex animation.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / layouting / bin-layout.h
1 #ifndef DALI_TOOLKIT_LAYOUTING_BIN_LAYOUT_H
2 #define DALI_TOOLKIT_LAYOUTING_BIN_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 BinLayout;
34 }
35
36 /**
37  * This class implements a bin layout, providing a simple layout to accept
38  * children and perform ResizePolicy mapping.
39  *
40  * Children will be positioned with their AnchorPoint and position if provided.
41  * If multiple children are added then they could overlap.
42  */
43 class DALI_TOOLKIT_API BinLayout : public LayoutGroup
44 {
45 public:
46
47   /**
48    * @brief Creates an uninitialized BinLayout handle.
49    *
50    * Initialize it using BinLayout::New().
51    * Calling member functions with an uninitialized handle is not allowed.
52    */
53   BinLayout();
54
55   /**
56    * @brief Creates a BinLayout object.
57    */
58   static BinLayout New();
59
60   /**
61    * @brief Downcasts a handle to a BinLayout handle.
62    *
63    * If handle points to a BinLayout, the downcast produces a valid handle.
64    * If not, the returned handle is left uninitialized.
65
66    * @param[in] handle to an object
67    * @return Handle to a BinLayout or an uninitialized handle
68    */
69   static BinLayout DownCast( BaseHandle handle );
70
71   /**
72    * @brief Copy constructor
73    */
74   BinLayout( const BinLayout& other );
75
76   /**
77    * @brief Assignment operator
78    */
79   BinLayout& operator=( const BinLayout& other );
80
81   /**
82    * @brief Default destructor.
83    *
84    * This is non-virtual, since derived Handle types must not contain data or virtual methods
85    */
86   ~BinLayout()=default;
87
88
89 public: // Not intended for application developers
90
91   /// @cond internal
92   /**
93    * @brief This constructor is used by BinLayout::New() methods.
94    *
95    * @param[in] actor A pointer to a newly allocated Dali resource
96    */
97   explicit DALI_INTERNAL BinLayout( Internal::BinLayout* body );
98   /// @endcond
99 };
100
101 } // namespace Toolkit
102 } // namespace Dali
103
104 #endif // DALI_TOOLKIT_LAYOUTING_BIN_LAYOUT_H