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