2 * Copyright (c) 2015 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/public-api/controls/table-view/table-view.h>
22 #include <dali-toolkit/internal/controls/table-view/table-view-impl.h>
32 TableView::TableView()
36 TableView::TableView( const TableView& handle )
41 TableView& TableView::operator=( const TableView& handle )
45 Control::operator=( handle );
50 TableView TableView::New( unsigned int initialRows, unsigned int initialColumns )
52 return Internal::TableView::New( initialRows, initialColumns );
55 TableView::~TableView()
59 TableView TableView::DownCast( BaseHandle handle )
61 return Control::DownCast<TableView, Internal::TableView>(handle);
64 bool TableView::AddChild( Actor child, CellPosition position )
66 return GetImpl(*this).AddChild( child, position );
69 Actor TableView::GetChildAt( CellPosition position )
71 return GetImpl(*this).GetChildAt( position );
74 Actor TableView::RemoveChildAt( CellPosition position )
76 return GetImpl(*this).RemoveChildAt( position );
79 bool TableView::FindChildPosition( Actor child, CellPosition& position )
81 return GetImpl(*this).FindChildPosition( child, position );
84 void TableView::InsertRow( unsigned int rowIndex )
86 GetImpl(*this).InsertRow( rowIndex );
89 void TableView::DeleteRow( unsigned int rowIndex )
91 GetImpl(*this).DeleteRow( rowIndex );
94 void TableView::DeleteRow( unsigned int rowIndex, vector<Actor>& removed )
96 GetImpl(*this).DeleteRow( rowIndex, removed );
99 void TableView::InsertColumn( unsigned int columnIndex )
101 GetImpl(*this).InsertColumn( columnIndex );
104 void TableView::DeleteColumn( unsigned int columnIndex )
106 GetImpl(*this).DeleteColumn( columnIndex );
109 void TableView::DeleteColumn( unsigned int columnIndex, vector<Actor>& removed )
111 GetImpl(*this).DeleteColumn( columnIndex, removed );
114 void TableView::Resize( unsigned int rows, unsigned int columns )
116 GetImpl(*this).Resize( rows, columns );
119 void TableView::Resize( unsigned int rows, unsigned int columns, vector<Actor>& removed )
121 GetImpl(*this).Resize( rows, columns, removed );
124 void TableView::SetCellPadding( Size padding )
126 GetImpl(*this).SetCellPadding( padding );
129 Size TableView::GetCellPadding()
131 return GetImpl(*this).GetCellPadding();
134 void TableView::SetFitHeight( unsigned int rowIndex )
136 GetImpl(*this).SetFitHeight( rowIndex );
139 bool TableView::IsFitHeight( unsigned int rowIndex ) const
141 return GetImpl(*this).IsFitHeight( rowIndex );
144 void TableView::SetFitWidth( unsigned int columnIndex )
146 GetImpl(*this).SetFitWidth( columnIndex );
149 bool TableView::IsFitWidth( unsigned int columnIndex ) const
151 return GetImpl(*this).IsFitWidth( columnIndex );
154 void TableView::SetFixedHeight( unsigned int rowIndex, float height )
156 GetImpl(*this).SetFixedHeight( rowIndex, height );
159 float TableView::GetFixedHeight( unsigned int rowIndex ) const
161 return GetImpl(*this).GetFixedHeight( rowIndex );
164 void TableView::SetRelativeHeight( unsigned int rowIndex, float heightPercentage )
166 GetImpl(*this).SetRelativeHeight( rowIndex, heightPercentage );
169 float TableView::GetRelativeHeight( unsigned int rowIndex ) const
171 return GetImpl(*this).GetRelativeHeight( rowIndex );
174 void TableView::SetFixedWidth( unsigned int columnIndex, float width )
176 GetImpl(*this).SetFixedWidth( columnIndex, width );
179 float TableView::GetFixedWidth( unsigned int columnIndex ) const
181 return GetImpl(*this).GetFixedWidth( columnIndex );
184 void TableView::SetRelativeWidth( unsigned int columnIndex, float widthPercentage )
186 GetImpl(*this).SetRelativeWidth( columnIndex, widthPercentage );
189 float TableView::GetRelativeWidth( unsigned int columnIndex ) const
191 return GetImpl(*this).GetRelativeWidth( columnIndex );
194 unsigned int TableView::GetRows()
196 return GetImpl(*this).GetRows();
199 unsigned int TableView::GetColumns()
201 return GetImpl(*this).GetColumns();
204 void TableView::SetCellAlignment( CellPosition position, HorizontalAlignment::Type horizontal, VerticalAlignment::Type vertical )
206 GetImpl(*this).SetCellAlignment( position, horizontal, vertical );
209 TableView::TableView(Internal::TableView& implementation)
210 : Control(implementation)
214 TableView::TableView( Dali::Internal::CustomActor* internal )
215 : Control( internal )
217 VerifyCustomActorPointer<Internal::TableView>(internal);
220 } // namespace Toolkit