2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/devel-api/controls/table-view/table-view.h>
22 #include <dali-toolkit/internal/controls/table-view/table-view-impl.h>
30 TableView::TableView()
34 TableView::TableView(const TableView& handle)
39 TableView& TableView::operator=(const TableView& handle)
43 Control::operator=(handle);
48 TableView TableView::New(unsigned int initialRows, unsigned int initialColumns)
50 return Internal::TableView::New(initialRows, initialColumns);
53 TableView::~TableView()
57 TableView TableView::DownCast(BaseHandle handle)
59 return Control::DownCast<TableView, Internal::TableView>(handle);
62 bool TableView::AddChild(Actor child, CellPosition position)
64 return GetImpl(*this).AddChild(child, position);
67 Actor TableView::GetChildAt(CellPosition position)
69 return GetImpl(*this).GetChildAt(position);
72 Actor TableView::RemoveChildAt(CellPosition position)
74 return GetImpl(*this).RemoveChildAt(position);
77 bool TableView::FindChildPosition(Actor child, CellPosition& position)
79 return GetImpl(*this).FindChildPosition(child, position);
82 void TableView::InsertRow(unsigned int rowIndex)
84 GetImpl(*this).InsertRow(rowIndex);
87 void TableView::DeleteRow(unsigned int rowIndex)
89 GetImpl(*this).DeleteRow(rowIndex);
92 void TableView::DeleteRow(unsigned int rowIndex, vector<Actor>& removed)
94 GetImpl(*this).DeleteRow(rowIndex, removed);
97 void TableView::InsertColumn(unsigned int columnIndex)
99 GetImpl(*this).InsertColumn(columnIndex);
102 void TableView::DeleteColumn(unsigned int columnIndex)
104 GetImpl(*this).DeleteColumn(columnIndex);
107 void TableView::DeleteColumn(unsigned int columnIndex, vector<Actor>& removed)
109 GetImpl(*this).DeleteColumn(columnIndex, removed);
112 void TableView::Resize(unsigned int rows, unsigned int columns)
114 GetImpl(*this).Resize(rows, columns);
117 void TableView::Resize(unsigned int rows, unsigned int columns, vector<Actor>& removed)
119 GetImpl(*this).Resize(rows, columns, removed);
122 void TableView::SetCellPadding(Size padding)
124 GetImpl(*this).SetCellPadding(padding);
127 Size TableView::GetCellPadding()
129 return GetImpl(*this).GetCellPadding();
132 void TableView::SetFitHeight(unsigned int rowIndex)
134 GetImpl(*this).SetFitHeight(rowIndex);
137 bool TableView::IsFitHeight(unsigned int rowIndex) const
139 return GetImpl(*this).IsFitHeight(rowIndex);
142 void TableView::SetFitWidth(unsigned int columnIndex)
144 GetImpl(*this).SetFitWidth(columnIndex);
147 bool TableView::IsFitWidth(unsigned int columnIndex) const
149 return GetImpl(*this).IsFitWidth(columnIndex);
152 void TableView::SetFixedHeight(unsigned int rowIndex, float height)
154 GetImpl(*this).SetFixedHeight(rowIndex, height);
157 float TableView::GetFixedHeight(unsigned int rowIndex) const
159 return GetImpl(*this).GetFixedHeight(rowIndex);
162 void TableView::SetRelativeHeight(unsigned int rowIndex, float heightPercentage)
164 GetImpl(*this).SetRelativeHeight(rowIndex, heightPercentage);
167 float TableView::GetRelativeHeight(unsigned int rowIndex) const
169 return GetImpl(*this).GetRelativeHeight(rowIndex);
172 void TableView::SetFixedWidth(unsigned int columnIndex, float width)
174 GetImpl(*this).SetFixedWidth(columnIndex, width);
177 float TableView::GetFixedWidth(unsigned int columnIndex) const
179 return GetImpl(*this).GetFixedWidth(columnIndex);
182 void TableView::SetRelativeWidth(unsigned int columnIndex, float widthPercentage)
184 GetImpl(*this).SetRelativeWidth(columnIndex, widthPercentage);
187 float TableView::GetRelativeWidth(unsigned int columnIndex) const
189 return GetImpl(*this).GetRelativeWidth(columnIndex);
192 unsigned int TableView::GetRows()
194 return GetImpl(*this).GetRows();
197 unsigned int TableView::GetColumns()
199 return GetImpl(*this).GetColumns();
202 void TableView::SetCellAlignment(CellPosition position, HorizontalAlignment::Type horizontal, VerticalAlignment::Type vertical)
204 GetImpl(*this).SetCellAlignment(position, horizontal, vertical);
207 TableView::TableView(Internal::TableView& implementation)
208 : Control(implementation)
212 TableView::TableView(Dali::Internal::CustomActor* internal)
215 VerifyCustomActorPointer<Internal::TableView>(internal);
218 } // namespace Toolkit