1 #ifndef DALI_TOOLKIT_LAYOUTING_ABSOLUTE_LAYOUT_H
2 #define DALI_TOOLKIT_LAYOUTING_ABSOLUTE_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 absolute layout, allowing explict positioning of
39 * Positions are from the top left of the layout and can be set using the
40 * Actor::Property::POSITION and alike.
42 class DALI_TOOLKIT_API AbsoluteLayout : public LayoutGroup
48 CHILD_PROPERTY_START_INDEX = ABSOLUTE_LAYOUT_CHILD_PROPERTY_START_INDEX,
49 CHILD_PROPERTY_END_INDEX = ABSOLUTE_LAYOUT_CHILD_PROPERTY_END_INDEX
53 * @brief Creates an uninitialized AbsoluteLayout handle.
55 * Initialize it using AbsoluteLayout::New().
56 * Calling member functions with an uninitialized handle is not allowed.
61 * @brief Creates a AbsoluteLayout object.
63 static AbsoluteLayout New();
66 * @brief Downcasts a handle to a AbsoluteLayout handle.
68 * If handle points to a AbsoluteLayout, the downcast produces a valid handle.
69 * If not, the returned handle is left uninitialized.
71 * @param[in] handle to an object
72 * @return Handle to a AbsoluteLayout or an uninitialized handle
74 static AbsoluteLayout DownCast( BaseHandle handle );
77 * @brief Copy constructor
79 AbsoluteLayout( const AbsoluteLayout& other );
82 * @brief Assigment operator
84 AbsoluteLayout& operator=( const AbsoluteLayout& other );
87 * @brief Default destructor.
89 * This is non-virtual, since derived Handle types must not contain data or virtual methods
91 ~AbsoluteLayout()=default;
94 public: // Not intended for application developers
98 * @brief This constructor is used by AbsoluteLayout::New() methods.
100 * @param[in] actor A pointer to a newly allocated Dali resource
102 explicit DALI_INTERNAL AbsoluteLayout( Internal::AbsoluteLayout* body );
106 } // namespace Toolkit
109 #endif // DALI_TOOLKIT_LAYOUTING_ABSOLUTE_LAYOUT_H