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