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