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>
25 #include <dali-toolkit/public-api/dali-toolkit-common.h>
32 namespace Internal DALI_INTERNAL
38 * This class implements a absolute layout, allowing explict positioning of
40 * Positions are from the top left of the layout and can be set using the
41 * Actor::Property::POSITION and alike.
43 class DALI_TOOLKIT_API AbsoluteLayout : public LayoutGroup
49 CHILD_PROPERTY_START_INDEX = ABSOLUTE_LAYOUT_CHILD_PROPERTY_START_INDEX,
50 CHILD_PROPERTY_END_INDEX = ABSOLUTE_LAYOUT_CHILD_PROPERTY_END_INDEX
54 * @brief Creates an uninitialized AbsoluteLayout handle.
56 * Initialize it using AbsoluteLayout::New().
57 * Calling member functions with an uninitialized handle is not allowed.
62 * @brief Creates a AbsoluteLayout object.
64 static AbsoluteLayout New();
67 * @brief Downcasts a handle to a AbsoluteLayout handle.
69 * If handle points to a AbsoluteLayout, the downcast produces a valid handle.
70 * If not, the returned handle is left uninitialized.
72 * @param[in] handle to an object
73 * @return Handle to a AbsoluteLayout or an uninitialized handle
75 static AbsoluteLayout DownCast( BaseHandle handle );
78 * @brief Copy constructor
80 AbsoluteLayout( const AbsoluteLayout& other );
83 * @brief Assigment operator
85 AbsoluteLayout& operator=( const AbsoluteLayout& other );
88 * @brief Default destructor.
90 * This is non-virtual, since derived Handle types must not contain data or virtual methods
92 ~AbsoluteLayout()=default;
95 public: // Not intended for application developers
99 * @brief This constructor is used by AbsoluteLayout::New() methods.
101 * @param[in] actor A pointer to a newly allocated Dali resource
103 explicit DALI_INTERNAL AbsoluteLayout( Internal::AbsoluteLayout* body );
107 } // namespace Toolkit
110 #endif // DALI_TOOLKIT_LAYOUTING_ABSOLUTE_LAYOUT_H