Split dali-toolkit into Base & Optional
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / table-view / table-view.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://floralicense.org/license/
9 //
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.
15 //
16
17 // CLASS HEADER
18 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
19
20 // INTERNAL INCLUDES
21 #include <dali-toolkit/internal/controls/table-view/table-view-impl.h>
22
23 using std::vector;
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 TableView::TableView()
32 {
33 }
34
35 TableView::TableView( const TableView& handle )
36 : Control( handle )
37 {
38 }
39
40 TableView& TableView::operator=( const TableView& handle )
41 {
42   if( &handle != this )
43   {
44     Control::operator=( handle );
45   }
46   return *this;
47 }
48
49 TableView TableView::New( unsigned int initialRows, unsigned int initialColumns )
50 {
51   return Internal::TableView::New( initialRows, initialColumns );
52 }
53
54 TableView::~TableView()
55 {
56 }
57
58 TableView TableView::DownCast( BaseHandle handle )
59 {
60   return Control::DownCast<TableView, Internal::TableView>(handle);
61 }
62
63 bool TableView::AddChild( Actor child, CellPosition position )
64 {
65   return GetImpl(*this).AddChild( child, position );
66 }
67
68 Actor TableView::GetChildAt( CellPosition position )
69 {
70   return GetImpl(*this).GetChildAt( position );
71 }
72
73 Actor TableView::RemoveChildAt( CellPosition position )
74 {
75   return GetImpl(*this).RemoveChildAt( position );
76 }
77
78 bool TableView::FindChildPosition( Actor child, CellPosition& position )
79 {
80   return GetImpl(*this).FindChildPosition( child, position );
81 }
82
83 void TableView::InsertRow( unsigned int rowIndex )
84 {
85   GetImpl(*this).InsertRow( rowIndex );
86 }
87
88 void TableView::DeleteRow( unsigned int rowIndex )
89 {
90   GetImpl(*this).DeleteRow( rowIndex );
91 }
92
93 void TableView::DeleteRow( unsigned int rowIndex, vector<Actor>& removed )
94 {
95   GetImpl(*this).DeleteRow( rowIndex, removed );
96 }
97
98 void TableView::InsertColumn( unsigned int columnIndex )
99 {
100   GetImpl(*this).InsertColumn( columnIndex );
101 }
102
103 void TableView::DeleteColumn( unsigned int columnIndex )
104 {
105   GetImpl(*this).DeleteColumn( columnIndex );
106 }
107
108 void TableView::DeleteColumn( unsigned int columnIndex, vector<Actor>& removed )
109 {
110   GetImpl(*this).DeleteColumn( columnIndex, removed );
111 }
112
113 void TableView::Resize( unsigned int rows, unsigned int columns )
114 {
115   GetImpl(*this).Resize( rows, columns );
116 }
117
118 void TableView::Resize( unsigned int rows, unsigned int columns, vector<Actor>& removed )
119 {
120   GetImpl(*this).Resize( rows, columns, removed );
121 }
122
123 void TableView::SetCellPadding( Size padding )
124 {
125   GetImpl(*this).SetCellPadding( padding );
126 }
127
128 Size TableView::GetCellPadding()
129 {
130   return GetImpl(*this).GetCellPadding();
131 }
132
133 void TableView::SetFixedHeight( unsigned int rowIndex, float height )
134 {
135   GetImpl(*this).SetFixedHeight( rowIndex, height );
136 }
137
138 float TableView::GetFixedHeight( unsigned int rowIndex ) const
139 {
140   return GetImpl(*this).GetFixedHeight( rowIndex );
141 }
142
143 void TableView::SetRelativeHeight( unsigned int rowIndex, float heightPercentage )
144 {
145   GetImpl(*this).SetRelativeHeight( rowIndex, heightPercentage );
146 }
147
148 float TableView::GetRelativeHeight( unsigned int rowIndex ) const
149 {
150   return GetImpl(*this).GetRelativeHeight( rowIndex );
151 }
152
153 void TableView::SetFixedWidth( unsigned int columnIndex, float width )
154 {
155   GetImpl(*this).SetFixedWidth( columnIndex, width );
156 }
157
158 float TableView::GetFixedWidth( unsigned int columnIndex ) const
159 {
160   return GetImpl(*this).GetFixedWidth( columnIndex );
161 }
162
163 void TableView::SetRelativeWidth( unsigned int columnIndex, float widthPercentage )
164 {
165   GetImpl(*this).SetRelativeWidth( columnIndex, widthPercentage );
166 }
167
168 float TableView::GetRelativeWidth( unsigned int columnIndex ) const
169 {
170   return GetImpl(*this).GetRelativeWidth( columnIndex );
171 }
172
173 void TableView::SetLayoutAnimationDuration( float duration )
174 {
175   GetImpl(*this).SetLayoutAnimationDuration( duration );
176 }
177
178 float TableView::GetLayoutAnimationDuration()
179 {
180   return GetImpl(*this).GetLayoutAnimationDuration();
181 }
182
183 unsigned int TableView::GetRows()
184 {
185   return GetImpl(*this).GetRows();
186 }
187
188 unsigned int TableView::GetColumns()
189 {
190   return GetImpl(*this).GetColumns();
191 }
192
193 TableView::TableView(Internal::TableView& implementation)
194 : Control(implementation)
195 {
196 }
197
198 TableView::TableView( Dali::Internal::CustomActor* internal )
199 : Control( internal )
200 {
201   VerifyCustomActorPointer<Internal::TableView>(internal);
202 }
203
204 } // namespace Toolkit
205
206 } // namespace Dali