1 #ifndef DALI_TOOLKIT_LAYOUTING_BIN_LAYOUT_H
2 #define DALI_TOOLKIT_LAYOUTING_BIN_LAYOUT_H
5 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
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>
31 namespace Internal DALI_INTERNAL
37 * This class implements a bin layout, providing a simple layout to accept
38 * children and perform ResizePolicy mapping.
40 * Children will be positioned with their AnchorPoint and position if provided.
41 * If multiple children are added then they could overlap.
43 class DALI_TOOLKIT_API BinLayout : public LayoutGroup
48 * @brief Creates an uninitialized BinLayout handle.
50 * Initialize it using BinLayout::New().
51 * Calling member functions with an uninitialized handle is not allowed.
56 * @brief Creates a BinLayout object.
58 static BinLayout New();
61 * @brief Downcasts a handle to a BinLayout handle.
63 * If handle points to a BinLayout, the downcast produces a valid handle.
64 * If not, the returned handle is left uninitialized.
66 * @param[in] handle to an object
67 * @return Handle to a BinLayout or an uninitialized handle
69 static BinLayout DownCast( BaseHandle handle );
72 * @brief Copy constructor
74 BinLayout( const BinLayout& other );
77 * @brief Assignment operator
79 BinLayout& operator=( const BinLayout& other );
82 * @brief Default destructor.
84 * This is non-virtual, since derived Handle types must not contain data or virtual methods
89 public: // Not intended for application developers
93 * @brief This constructor is used by BinLayout::New() methods.
95 * @param[in] actor A pointer to a newly allocated Dali resource
97 explicit DALI_INTERNAL BinLayout( Internal::BinLayout* body );
101 } // namespace Toolkit
104 #endif // DALI_TOOLKIT_LAYOUTING_BIN_LAYOUT_H