1 #ifndef DALI_TOOLKIT_LAYOUTING_GRID_LAYOUT_H
2 #define DALI_TOOLKIT_LAYOUTING_GRID_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
38 * This class implements a horizontal box layout, automatically handling
39 * right to left or left to right direction change.
41 class DALI_TOOLKIT_API Grid : public LayoutGroup
46 * @brief Creates an uninitialized Grid handle.
48 * Initialize it using Grid::New().
49 * Calling member functions with an uninitialized handle is not allowed.
54 * @brief Creates a Grid object.
59 * @brief Downcasts a handle to a Grid handle.
61 * If handle points to a Grid, the downcast produces a valid handle.
62 * If not, the returned handle is left uninitialized.
64 * @param[in] handle to an object
65 * @return Handle to a Grid or an uninitialized handle
67 static Grid DownCast( BaseHandle handle );
70 * @brief Copy constructor
72 Grid( const Grid& other );
75 * @brief Assigment operator
77 Grid& operator=( const Grid& other );
80 * @brief Default destructor.
82 * This is non-virtual, since derived Handle types must not contain data or virtual methods
87 * @brief Set the number of columns in the Grid.
88 * @param[in] columns number of columns,
90 void SetNumberOfColumns( int columns );
93 * @brief Get the number of columns in the grid.
94 * @return the number of columns.
96 int GetNumberOfColumns() const;
98 public: // Not intended for application developers
102 * @brief This constructor is used by Grid::New() methods.
104 * @param[in] actor A pointer to a newly allocated Dali resource
106 explicit DALI_INTERNAL Grid( Internal::Grid* body );
110 } // namespace Toolkit
113 #endif // DALI_TOOLKIT_LAYOUTING_GRID_LAYOUT_H