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