1 #ifndef DEMO_CUSTOM_LAYOUT_H
2 #define DEMO_CUSTOM_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.
21 #include <dali/public-api/object/base-handle.h>
22 #include <dali-toolkit/devel-api/layouting/layout-group.h>
33 * @brief This is the handle class to a very simple Custom Layout.
35 * This class lays out its children horizontally in a very simple manner.
37 class CustomLayout : public Dali::Toolkit::LayoutGroup
42 * @brief Creates an uninitialized CustomLayout handle.
44 * Initialize it using CustomLayout::New().
45 * Calling member functions with an uninitialized handle is not allowed.
47 CustomLayout() = default;
50 * @brief Creates a CustomLayout object.
52 static CustomLayout New();
56 * @brief Default destructor.
58 * This is non-virtual, since derived Handle types must not contain data or virtual methods
60 ~CustomLayout() = default;
63 * @brief Copy constructor
65 CustomLayout( const CustomLayout& ) = default;
68 * @brief Assigment operator
70 CustomLayout& operator=( const CustomLayout& ) = default;
73 * @brief Move constructor
75 CustomLayout( CustomLayout&& ) = default;
78 * @brief Movable assignment operator
80 CustomLayout& operator=( CustomLayout&& ) = default;
83 * @brief Downcasts a handle to a CustomLayout handle.
85 * If handle points to a CustomLayout, the downcast produces a valid handle.
86 * If not, the returned handle is left uninitialized.
88 * @param[in] handle to an object
89 * @return Handle to a CustomLayout or an uninitialized handle
91 static CustomLayout DownCast( BaseHandle handle );
93 public: // Not intended for application developers
97 * @brief This constructor is used by CustomLayout::New() methods.
99 * @param[in] actor A pointer to a newly allocated Dali resource
101 explicit CustomLayout( Internal::CustomLayout* body );
107 #endif // DEMO_CUSTOM_LAYOUT_H