Merge "[NUI] remove deprecated APIs"
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / TableView.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
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
18 using System;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI.BaseComponents
22 {
23
24     /// <summary>
25     /// TableView is a layout container for aligning child actors in a grid like layout.<br />
26     /// TableView constraints the X and the Y position and the width and the height of the child actors.<br />
27     /// The Z position and depth are left intact so that the 3D model actors can also be laid out
28     /// in a grid without loosing their depth scaling.<br />
29     /// </summary>
30     public class TableView : View
31     {
32         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33
34         internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TableView_SWIGUpcast(cPtr), cMemoryOwn)
35         {
36             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37         }
38
39         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TableView obj)
40         {
41             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42         }
43
44         /// <summary>
45         /// Dispose
46         /// </summary>
47         /// <param name="type">The dispose type</param>
48         /// <since_tizen> 3 </since_tizen>
49         protected override void Dispose(DisposeTypes type)
50         {
51             if(disposed)
52             {
53                 return;
54             }
55
56             if(type == DisposeTypes.Explicit)
57             {
58                 //Called by User
59                 //Release your own managed resources here.
60                 //You should release all of your own disposable objects here.
61             }
62
63             //Release your own unmanaged resources here.
64             //You should not access any managed member here except static instance.
65             //because the execution order of Finalizes is non-deterministic.
66
67             if (swigCPtr.Handle != global::System.IntPtr.Zero)
68             {
69                 if (swigCMemOwn)
70                 {
71                     swigCMemOwn = false;
72                     NDalicPINVOKE.delete_TableView(swigCPtr);
73                 }
74                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
75             }
76
77             base.Dispose(type);
78         }
79
80
81         internal new class Property
82         {
83             internal static readonly int ROWS = NDalicPINVOKE.TableView_Property_ROWS_get();
84             internal static readonly int COLUMNS = NDalicPINVOKE.TableView_Property_COLUMNS_get();
85             internal static readonly int CELL_PADDING = NDalicPINVOKE.TableView_Property_CELL_PADDING_get();
86             internal static readonly int LAYOUT_ROWS = NDalicPINVOKE.TableView_Property_LAYOUT_ROWS_get();
87             internal static readonly int LAYOUT_COLUMNS = NDalicPINVOKE.TableView_Property_LAYOUT_COLUMNS_get();
88         }
89
90         internal class ChildProperty
91         {
92             internal static readonly int CELL_INDEX = NDalicPINVOKE.TableView_ChildProperty_CELL_INDEX_get();
93             internal static readonly int ROW_SPAN = NDalicPINVOKE.TableView_ChildProperty_ROW_SPAN_get();
94             internal static readonly int COLUMN_SPAN = NDalicPINVOKE.TableView_ChildProperty_COLUMN_SPAN_get();
95             internal static readonly int CELL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
96             internal static readonly int CELL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();
97         }
98
99         /// <summary>
100         /// Class to specify the layout position for the child view.
101         /// </summary>
102         public class CellPosition : global::System.IDisposable
103         {
104             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
105             /// <summary>
106             /// swigCMemOwn
107             /// </summary>
108             /// <since_tizen> 3 </since_tizen>
109             protected bool swigCMemOwn;
110
111             internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn)
112             {
113                 swigCMemOwn = cMemoryOwn;
114                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
115             }
116
117             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj)
118             {
119                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
120             }
121
122             //A Flag to check who called Dispose(). (By User or DisposeQueue)
123             private bool isDisposeQueued = false;
124             /// <summary>
125             /// A Flat to check if it is already disposed.
126             /// </summary>
127             /// <since_tizen> 3 </since_tizen>
128             protected bool disposed = false;
129
130             /// <summary>
131             /// Dispose.
132             /// </summary>
133             /// <since_tizen> 3 </since_tizen>
134             ~CellPosition()
135             {
136                 if(!isDisposeQueued)
137                 {
138                     isDisposeQueued = true;
139                     DisposeQueue.Instance.Add(this);
140                 }
141             }
142
143             /// <summary>
144             /// Dispose.
145             /// </summary>
146             /// <since_tizen> 3 </since_tizen>
147             public void Dispose()
148             {
149                 //Throw excpetion if Dispose() is called in separate thread.
150                 if (!Window.IsInstalled())
151                 {
152                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
153                 }
154
155                 if (isDisposeQueued)
156                 {
157                     Dispose(DisposeTypes.Implicit);
158                 }
159                 else
160                 {
161                     Dispose(DisposeTypes.Explicit);
162                     System.GC.SuppressFinalize(this);
163                 }
164             }
165
166             /// <summary>
167             /// Dispose.
168             /// </summary>
169             /// <param name="type">DisposeTypes</param>
170             /// <since_tizen> 3 </since_tizen>
171             protected virtual void Dispose(DisposeTypes type)
172             {
173                 if (disposed)
174                 {
175                     return;
176                 }
177
178                 if(type == DisposeTypes.Explicit)
179                 {
180                     //Called by User
181                     //Release your own managed resources here.
182                     //You should release all of your own disposable objects here.
183                 }
184
185                 //Release your own unmanaged resources here.
186                 //You should not access any managed member here except static instance.
187                 //because the execution order of Finalizes is non-deterministic.
188
189                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
190                 {
191                     if (swigCMemOwn)
192                     {
193                         swigCMemOwn = false;
194                         NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
195                     }
196                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
197                 }
198                 disposed = true;
199             }
200
201             /// <summary>
202             /// The constructor.
203             /// </summary>
204             /// <param name="rowIndex">The row index initialized.</param>
205             /// <param name="columnIndex">The column index initialized.</param>
206             /// <param name="rowSpan">The row span initialized.</param>
207             /// <param name="columnSpan">The column span initialized.</param>
208             /// <since_tizen> 3 </since_tizen>
209             public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true)
210             {
211                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212             }
213
214             /// <summary>
215             /// The constructor to initialize values to defaults for convenience.
216             /// </summary>
217             /// <param name="rowIndex">The row index initialized.</param>
218             /// <param name="columnIndex">The column index initialized.</param>
219             /// <param name="rowSpan">The row span initialized.</param>
220             /// <since_tizen> 3 </since_tizen>
221             public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true)
222             {
223                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224             }
225
226             /// <summary>
227             /// The constructor to initialize values to defaults for convenience.
228             /// </summary>
229             /// <param name="rowIndex">The row index initialized.</param>
230             /// <param name="columnIndex">The column index initialized.</param>
231             /// <since_tizen> 3 </since_tizen>
232             public CellPosition(uint rowIndex, uint columnIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true)
233             {
234                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235             }
236
237             /// <summary>
238             /// The constructor to initialize values to default for convenience.
239             /// </summary>
240             /// <param name="rowIndex">The row index initialized.</param>
241             /// <since_tizen> 3 </since_tizen>
242             public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true)
243             {
244                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245             }
246
247             /// <summary>
248             /// The default constructor.
249             /// </summary>
250             /// <since_tizen> 3 </since_tizen>
251             public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true)
252             {
253                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254             }
255
256             /// <summary>
257             /// The index of a row.
258             /// </summary>
259             /// <since_tizen> 3 </since_tizen>
260             public uint rowIndex
261             {
262                 set
263                 {
264                     NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
265                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266                 }
267                 get
268                 {
269                     uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
270                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271                     return ret;
272                 }
273             }
274
275             /// <summary>
276             /// The index of a column.
277             /// </summary>
278             /// <since_tizen> 3 </since_tizen>
279             public uint columnIndex
280             {
281                 set
282                 {
283                     NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
284                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285                 }
286                 get
287                 {
288                     uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
289                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290                     return ret;
291                 }
292             }
293
294             /// <summary>
295             /// The span of a row.
296             /// </summary>
297             /// <since_tizen> 3 </since_tizen>
298             public uint rowSpan
299             {
300                 set
301                 {
302                     NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
303                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
304                 }
305                 get
306                 {
307                     uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
308                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309                     return ret;
310                 }
311             }
312
313             /// <summary>
314             /// The span of a column.
315             /// </summary>
316             /// <since_tizen> 3 </since_tizen>
317             public uint columnSpan
318             {
319                 set
320                 {
321                     NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
322                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323                 }
324                 get
325                 {
326                     uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
327                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328                     return ret;
329                 }
330             }
331
332         }
333
334         /// <summary>
335         /// Creates the TableView view.
336         /// </summary>
337         /// <param name="initialRows">Initial rows for the table.</param>
338         /// <param name="initialColumns">Initial columns for the table.</param>
339         /// <since_tizen> 3 </since_tizen>
340         public TableView(uint initialRows, uint initialColumns) : this(NDalicPINVOKE.TableView_New(initialRows, initialColumns), true)
341         {
342             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343
344         }
345
346         /// <summary>
347         /// The Copy constructor. Creates another handle that points to the same real object.
348         /// </summary>
349         /// <param name="handle">Handle to copy from.</param>
350         /// <since_tizen> 3 </since_tizen>
351         public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true)
352         {
353             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354         }
355         /// <summary>
356         /// Downcasts a handle to tabelView handle.
357         /// </summary>
358         /// <since_tizen> 3 </since_tizen>
359         /// Please do not use! this will be deprecated!
360         /// Instead please use as keyword.
361         [Obsolete("Please DO NOT use! This will be deprecated, instead please USE as keyword.")]
362         [EditorBrowsable(EditorBrowsableState.Never)]
363         public new static TableView DownCast(BaseHandle handle)
364         {
365             TableView ret =  Registry.GetManagedBaseHandleFromNativePtr(handle) as TableView;
366             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
367             return ret;
368         }
369
370         /// <summary>
371         /// Adds a child to the table.<br />
372         /// If the row or column index is outside the table, the table gets resized bigger.<br />
373         /// </summary>
374         /// <param name="child">The child to add.</param>
375         /// <param name="position">The position for the child.</param>
376         /// <returns>True if the addition succeeded, and false if the cell is already occupied.</returns>
377         /// <since_tizen> 3 </since_tizen>
378         public bool AddChild(View child, TableView.CellPosition position)
379         {
380             bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
381             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382             return ret;
383         }
384
385         /// <summary>
386         /// Returns a child from the given layout position.
387         /// </summary>
388         /// <param name="position">The position in the table.</param>
389         /// <returns>Child that was in the cell or an uninitialized handle.</returns>
390         /// <since_tizen> 3 </since_tizen>
391         public View GetChildAt(TableView.CellPosition position)
392         {
393             IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
394             View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
395
396             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
397             return ret;
398         }
399
400         /// <summary>
401         /// Removes a child from the given layout position.
402         /// </summary>
403         /// <param name="position">The position for the child to remove.</param>
404         /// <returns>Child that was removed or an uninitialized handle.</returns>
405         /// <since_tizen> 3 </since_tizen>
406         public View RemoveChildAt(TableView.CellPosition position)
407         {
408             IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
409             View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
410
411             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
412             return ret;
413         }
414
415         /// <summary>
416         /// Finds the child's layout position.
417         /// </summary>
418         /// <param name="child">The child to search for.</param>
419         /// <param name="position">The position for the child.</param>
420         /// <returns>True if the child was included in this TableView.</returns>
421         /// <since_tizen> 3 </since_tizen>
422         public bool FindChildPosition(View child, TableView.CellPosition position)
423         {
424             bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
425             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
426             return ret;
427         }
428
429         /// <summary>
430         /// Inserts a new row to the given index.
431         /// </summary>
432         /// <param name="rowIndex">The rowIndex of the new row.</param>
433         /// <since_tizen> 3 </since_tizen>
434         public void InsertRow(uint rowIndex)
435         {
436             NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
437             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438         }
439
440         /// <summary>
441         /// Deletes a row from the given index.<br />
442         /// Removed elements are deleted.<br />
443         /// </summary>
444         /// <param name="rowIndex">The rowIndex of the row to delete.</param>
445         /// <since_tizen> 3 </since_tizen>
446         public void DeleteRow(uint rowIndex)
447         {
448             NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
449             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
450         }
451
452         /// <summary>
453         /// Inserts a new column to the given index.
454         /// </summary>
455         /// <param name="columnIndex">The columnIndex of the new column.</param>
456         /// <since_tizen> 3 </since_tizen>
457         public void InsertColumn(uint columnIndex)
458         {
459             NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
460             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
461         }
462
463         /// <summary>
464         /// Deletes a column from the given index.<br />
465         /// Removed elements are deleted.<br />
466         /// </summary>
467         /// <param name="columnIndex">The columnIndex of the column to delete.</param>
468         /// <since_tizen> 3 </since_tizen>
469         public void DeleteColumn(uint columnIndex)
470         {
471             NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
472             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
473         }
474
475         /// <summary>
476         /// Resizes the TableView.
477         /// </summary>
478         /// <param name="rows">The rows for the table.</param>
479         /// <param name="columns">The columns for the table.</param>
480         /// <since_tizen> 3 </since_tizen>
481         public void Resize(uint rows, uint columns)
482         {
483             NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
484             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
485         }
486
487         /// <summary>
488         /// Sets the horizontal and the vertical padding between cells.
489         /// </summary>
490         /// <param name="padding">Width and height.</param>
491         /// <since_tizen> 3 </since_tizen>
492         public void SetCellPadding(Size2D padding)
493         {
494             NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Size2D.getCPtr(padding));
495             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
496         }
497
498         /// <summary>
499         /// Gets the current padding as width and height.
500         /// </summary>
501         /// <returns>The current padding as width and height.</returns>
502         /// <since_tizen> 3 </since_tizen>
503         public Vector2 GetCellPadding()
504         {
505             Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
506             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507             return ret;
508         }
509
510         /// <summary>
511         /// Specifies this row as fitting its height to its children.
512         /// </summary>
513         /// <param name="rowIndex">The row to set.</param>
514         /// <since_tizen> 3 </since_tizen>
515         public void SetFitHeight(uint rowIndex)
516         {
517             NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
518             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
519         }
520
521         /// <summary>
522         /// Checks if the row is a fit row.
523         /// </summary>
524         /// <param name="rowIndex">The row to check.</param>
525         /// <returns>True if the row is fit.</returns>
526         /// <since_tizen> 3 </since_tizen>
527         public bool IsFitHeight(uint rowIndex)
528         {
529             bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
530             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
531             return ret;
532         }
533
534         /// <summary>
535         /// Specifies this column as fitting its width to its children.
536         /// </summary>
537         /// <param name="columnIndex">The column to set.</param>
538         /// <since_tizen> 3 </since_tizen>
539         public void SetFitWidth(uint columnIndex)
540         {
541             NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
542             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
543         }
544
545         /// <summary>
546         /// Checks if the column is a fit column.
547         /// </summary>
548         /// <param name="columnIndex">The column to check.</param>
549         /// <returns>True if the column is fit.</returns>
550         /// <since_tizen> 3 </since_tizen>
551         public bool IsFitWidth(uint columnIndex)
552         {
553             bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
554             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555             return ret;
556         }
557
558         /// <summary>
559         /// Sets a row to have a fixed height.<br />
560         /// Setting a fixed height of 0 has no effect.<br />
561         /// </summary>
562         /// <param name="rowIndex">The rowIndex for row with a fixed height.</param>
563         /// <param name="height">The height in world coordinate units.</param>
564         /// <since_tizen> 3 </since_tizen>
565         public void SetFixedHeight(uint rowIndex, float height)
566         {
567             NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
568             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
569         }
570
571         /// <summary>
572         /// Gets a row's fixed height.
573         /// </summary>
574         /// <param name="rowIndex">The row index with a fixed height.</param>
575         /// <returns>height The height in world coordinate units.</returns>
576         /// <since_tizen> 3 </since_tizen>
577         public float GetFixedHeight(uint rowIndex)
578         {
579             float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
580             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581             return ret;
582         }
583
584         /// <summary>
585         /// Sets a row to have a relative height. Relative height means percentage of
586         /// the remainder of the table height after subtracting padding and fixed height rows.<br />
587         /// Setting a relative height of 0 has no effect.<br />
588         /// </summary>
589         /// <param name="rowIndex">The rowIndex for row with a relative height.</param>
590         /// <param name="heightPercentage">The height percentage between 0.0f and 1.0f.</param>
591         /// <since_tizen> 3 </since_tizen>
592         public void SetRelativeHeight(uint rowIndex, float heightPercentage)
593         {
594             NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
595             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
596         }
597
598         /// <summary>
599         /// Gets a row's relative height.
600         /// </summary>
601         /// <param name="rowIndex">The row index with a relative height.</param>
602         /// <returns>Height in percentage units, between 0.0f and 1.0f.</returns>
603         /// <since_tizen> 3 </since_tizen>
604         public float GetRelativeHeight(uint rowIndex)
605         {
606             float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
607             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
608             return ret;
609         }
610
611         /// <summary>
612         /// Sets a column to have a fixed width.<br />
613         /// Setting a fixed width of 0 has no effect.<br />
614         /// </summary>
615         /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
616         /// <param name="width">The width in world coordinate units.</param>
617         /// <since_tizen> 3 </since_tizen>
618         public void SetFixedWidth(uint columnIndex, float width)
619         {
620             NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
621             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
622         }
623
624         /// <summary>
625         /// Gets a column's fixed width.
626         /// </summary>
627         /// <param name="columnIndex">The column index with a fixed width.</param>
628         /// <returns>Width in world coordinate units.</returns>
629         /// <since_tizen> 3 </since_tizen>
630         public float GetFixedWidth(uint columnIndex)
631         {
632             float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
633             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
634             return ret;
635         }
636
637         /// <summary>
638         /// Sets a column to have a relative width. Relative width means percentage of
639         /// the remainder of the table width after subtracting padding and fixed width columns.<br />
640         /// Setting a relative width of 0 has no effect.<br />
641         /// </summary>
642         /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
643         /// <param name="widthPercentage">The widthPercentage between 0.0f and 1.0f.</param>
644         /// <since_tizen> 3 </since_tizen>
645         public void SetRelativeWidth(uint columnIndex, float widthPercentage)
646         {
647             NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
648             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
649         }
650
651         /// <summary>
652         /// Gets a column's relative width.
653         /// </summary>
654         /// <param name="columnIndex">The column index with a relative width.</param>
655         /// <returns>Width in percentage units, between 0.0f and 1.0f.</returns>
656         /// <since_tizen> 3 </since_tizen>
657         public float GetRelativeWidth(uint columnIndex)
658         {
659             float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
660             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
661             return ret;
662         }
663
664         /// <summary>
665         /// Sets the alignment on a cell.<br />
666         /// Cells without calling this function have the default values of left and top respectively.<br />
667         /// </summary>
668         /// <param name="position">The cell to set alignment on.</param>
669         /// <param name="horizontal">The horizontal alignment.</param>
670         /// <param name="vertical">The vertical alignment.</param>
671         /// <since_tizen> 3 </since_tizen>
672         public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical)
673         {
674             NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
675             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
676         }
677
678         /// <summary>
679         /// Enumeration for describing how the size of a row or column has been set.
680         /// </summary>
681         /// <since_tizen> 3 </since_tizen>
682         public enum LayoutPolicy
683         {
684             /// <summary>
685             /// Fixed with the given value.
686             /// </summary>
687             /// <since_tizen> 3 </since_tizen>
688             Fixed,
689             /// <summary>
690             /// Calculated as percentage of the remainder after subtracting Padding and Fixed height/width.
691             /// </summary>
692             /// <since_tizen> 3 </since_tizen>
693             Relative,
694             /// <summary>
695             ///  Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns.
696             /// </summary>
697             /// <since_tizen> 3 </since_tizen>
698             Fill,
699             /// <summary>
700             /// Fit around its children.
701             /// </summary>
702             /// <since_tizen> 3 </since_tizen>
703             Fit
704         }
705
706         /// <summary>
707         /// The amount of rows in the table.
708         /// </summary>
709         /// <since_tizen> 3 </since_tizen>
710         public int Rows
711         {
712             get
713             {
714                 int temp = 0;
715                 GetProperty(TableView.Property.ROWS).Get(out temp);
716                 return temp;
717             }
718             set
719             {
720                 SetProperty(TableView.Property.ROWS, new Tizen.NUI.PropertyValue(value));
721             }
722         }
723         /// <summary>
724         /// The amount of columns in the table.
725         /// </summary>
726         /// <since_tizen> 3 </since_tizen>
727         public int Columns
728         {
729             get
730             {
731                 int temp = 0;
732                 GetProperty(TableView.Property.COLUMNS).Get(out temp);
733                 return temp;
734             }
735             set
736             {
737                 SetProperty(TableView.Property.COLUMNS, new Tizen.NUI.PropertyValue(value));
738             }
739         }
740         /// <summary>
741         /// Padding between cells.
742         /// </summary>
743         /// <since_tizen> 3 </since_tizen>
744         public Vector2 CellPadding
745         {
746             get
747             {
748                 Vector2 temp = new Vector2(0.0f, 0.0f);
749                 GetProperty(TableView.Property.CELL_PADDING).Get(temp);
750                 return temp;
751             }
752             set
753             {
754                 SetProperty(TableView.Property.CELL_PADDING, new Tizen.NUI.PropertyValue(value));
755             }
756         }
757
758         /// <summary>
759         /// The number of layout rows.
760         /// </summary>
761         /// <since_tizen> 3 </since_tizen>
762         public PropertyMap LayoutRows
763         {
764             get
765             {
766                 PropertyMap temp = new PropertyMap();
767                 GetProperty(TableView.Property.LAYOUT_ROWS).Get(temp);
768                 return temp;
769             }
770             set
771             {
772                 SetProperty(TableView.Property.LAYOUT_ROWS, new Tizen.NUI.PropertyValue(value));
773             }
774         }
775
776         /// <summary>
777         /// The number of layout columns.
778         /// </summary>
779         /// <since_tizen> 3 </since_tizen>
780         public PropertyMap LayoutColumns
781         {
782             get
783             {
784                 PropertyMap temp = new PropertyMap();
785                 GetProperty(TableView.Property.LAYOUT_COLUMNS).Get(temp);
786                 return temp;
787             }
788             set
789             {
790                 SetProperty(TableView.Property.LAYOUT_COLUMNS, new Tizen.NUI.PropertyValue(value));
791             }
792         }
793
794     }
795 }