2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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.
18 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
21 #include <dali-toolkit/internal/controls/table-view/table-view-impl.h>
31 TableView::TableView()
35 TableView::TableView( const TableView& handle )
40 TableView& TableView::operator=( const TableView& handle )
44 Control::operator=( handle );
49 TableView TableView::New( unsigned int initialRows, unsigned int initialColumns )
51 return Internal::TableView::New( initialRows, initialColumns );
54 TableView::~TableView()
58 TableView TableView::DownCast( BaseHandle handle )
60 return Control::DownCast<TableView, Internal::TableView>(handle);
63 bool TableView::AddChild( Actor child, CellPosition position )
65 return GetImpl(*this).AddChild( child, position );
68 Actor TableView::GetChildAt( CellPosition position )
70 return GetImpl(*this).GetChildAt( position );
73 Actor TableView::RemoveChildAt( CellPosition position )
75 return GetImpl(*this).RemoveChildAt( position );
78 bool TableView::FindChildPosition( Actor child, CellPosition& position )
80 return GetImpl(*this).FindChildPosition( child, position );
83 void TableView::InsertRow( unsigned int rowIndex )
85 GetImpl(*this).InsertRow( rowIndex );
88 void TableView::DeleteRow( unsigned int rowIndex )
90 GetImpl(*this).DeleteRow( rowIndex );
93 void TableView::DeleteRow( unsigned int rowIndex, vector<Actor>& removed )
95 GetImpl(*this).DeleteRow( rowIndex, removed );
98 void TableView::InsertColumn( unsigned int columnIndex )
100 GetImpl(*this).InsertColumn( columnIndex );
103 void TableView::DeleteColumn( unsigned int columnIndex )
105 GetImpl(*this).DeleteColumn( columnIndex );
108 void TableView::DeleteColumn( unsigned int columnIndex, vector<Actor>& removed )
110 GetImpl(*this).DeleteColumn( columnIndex, removed );
113 void TableView::Resize( unsigned int rows, unsigned int columns )
115 GetImpl(*this).Resize( rows, columns );
118 void TableView::Resize( unsigned int rows, unsigned int columns, vector<Actor>& removed )
120 GetImpl(*this).Resize( rows, columns, removed );
123 void TableView::SetCellPadding( Size padding )
125 GetImpl(*this).SetCellPadding( padding );
128 Size TableView::GetCellPadding()
130 return GetImpl(*this).GetCellPadding();
133 void TableView::SetFixedHeight( unsigned int rowIndex, float height )
135 GetImpl(*this).SetFixedHeight( rowIndex, height );
138 float TableView::GetFixedHeight( unsigned int rowIndex ) const
140 return GetImpl(*this).GetFixedHeight( rowIndex );
143 void TableView::SetRelativeHeight( unsigned int rowIndex, float heightPercentage )
145 GetImpl(*this).SetRelativeHeight( rowIndex, heightPercentage );
148 float TableView::GetRelativeHeight( unsigned int rowIndex ) const
150 return GetImpl(*this).GetRelativeHeight( rowIndex );
153 void TableView::SetFixedWidth( unsigned int columnIndex, float width )
155 GetImpl(*this).SetFixedWidth( columnIndex, width );
158 float TableView::GetFixedWidth( unsigned int columnIndex ) const
160 return GetImpl(*this).GetFixedWidth( columnIndex );
163 void TableView::SetRelativeWidth( unsigned int columnIndex, float widthPercentage )
165 GetImpl(*this).SetRelativeWidth( columnIndex, widthPercentage );
168 float TableView::GetRelativeWidth( unsigned int columnIndex ) const
170 return GetImpl(*this).GetRelativeWidth( columnIndex );
173 void TableView::SetLayoutAnimationDuration( float duration )
175 GetImpl(*this).SetLayoutAnimationDuration( duration );
178 float TableView::GetLayoutAnimationDuration()
180 return GetImpl(*this).GetLayoutAnimationDuration();
183 unsigned int TableView::GetRows()
185 return GetImpl(*this).GetRows();
188 unsigned int TableView::GetColumns()
190 return GetImpl(*this).GetColumns();
193 TableView::TableView(Internal::TableView& implementation)
194 : Control(implementation)
198 TableView::TableView( Dali::Internal::CustomActor* internal )
199 : Control( internal )
201 VerifyCustomActorPointer<Internal::TableView>(internal);
204 } // namespace Toolkit