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