2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.ComponentModel;
20 using System.Runtime.InteropServices;
22 namespace Tizen.NUI.BaseComponents
26 /// TableView is a layout container for aligning child actors in a grid like layout.<br />
27 /// TableView constraints the X and the Y position and the width and the height of the child actors.<br />
28 /// The Z position and depth are left intact so that the 3D model actors can also be laid out
29 /// in a grid without loosing their depth scaling.<br />
31 /// <since_tizen> 3 </since_tizen>
32 public class TableView : View
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36 internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TableView_SWIGUpcast(cPtr), cMemoryOwn)
38 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
41 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TableView obj)
43 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
49 /// <param name="type">The dispose type</param>
50 /// <since_tizen> 3 </since_tizen>
51 protected override void Dispose(DisposeTypes type)
58 if (type == DisposeTypes.Explicit)
61 //Release your own managed resources here.
62 //You should release all of your own disposable objects here.
65 //Release your own unmanaged resources here.
66 //You should not access any managed member here except static instance.
67 //because the execution order of Finalizes is non-deterministic.
69 if (swigCPtr.Handle != global::System.IntPtr.Zero)
74 NDalicPINVOKE.delete_TableView(swigCPtr);
76 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
83 internal new class Property
85 internal static readonly int ROWS = NDalicPINVOKE.TableView_Property_ROWS_get();
86 internal static readonly int COLUMNS = NDalicPINVOKE.TableView_Property_COLUMNS_get();
87 internal static readonly int CELL_PADDING = NDalicPINVOKE.TableView_Property_CELL_PADDING_get();
88 internal static readonly int LAYOUT_ROWS = NDalicPINVOKE.TableView_Property_LAYOUT_ROWS_get();
89 internal static readonly int LAYOUT_COLUMNS = NDalicPINVOKE.TableView_Property_LAYOUT_COLUMNS_get();
92 internal class ChildProperty
94 internal static readonly int CELL_INDEX = NDalicPINVOKE.TableView_ChildProperty_CELL_INDEX_get();
95 internal static readonly int ROW_SPAN = NDalicPINVOKE.TableView_ChildProperty_ROW_SPAN_get();
96 internal static readonly int COLUMN_SPAN = NDalicPINVOKE.TableView_ChildProperty_COLUMN_SPAN_get();
97 internal static readonly int CELL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
98 internal static readonly int CELL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();
102 /// Class to specify the layout position for the child view.
104 /// <since_tizen> 3 </since_tizen>
105 public class CellPosition : global::System.IDisposable
107 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
111 /// <since_tizen> 3 </since_tizen>
112 protected bool swigCMemOwn;
114 internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn)
116 swigCMemOwn = cMemoryOwn;
117 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
120 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj)
122 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
125 //A Flag to check who called Dispose(). (By User or DisposeQueue)
126 private bool isDisposeQueued = false;
128 /// A Flat to check if it is already disposed.
130 /// <since_tizen> 3 </since_tizen>
131 protected bool disposed = false;
136 /// <since_tizen> 3 </since_tizen>
139 if (!isDisposeQueued)
141 isDisposeQueued = true;
142 DisposeQueue.Instance.Add(this);
149 /// <since_tizen> 3 </since_tizen>
150 public void Dispose()
152 //Throw excpetion if Dispose() is called in separate thread.
153 if (!Window.IsInstalled())
155 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
160 Dispose(DisposeTypes.Implicit);
164 Dispose(DisposeTypes.Explicit);
165 System.GC.SuppressFinalize(this);
172 /// <param name="type">DisposeTypes</param>
173 /// <since_tizen> 3 </since_tizen>
174 protected virtual void Dispose(DisposeTypes type)
181 if (type == DisposeTypes.Explicit)
184 //Release your own managed resources here.
185 //You should release all of your own disposable objects here.
188 //Release your own unmanaged resources here.
189 //You should not access any managed member here except static instance.
190 //because the execution order of Finalizes is non-deterministic.
192 if (swigCPtr.Handle != global::System.IntPtr.Zero)
197 NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
199 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
207 /// <param name="rowIndex">The row index initialized.</param>
208 /// <param name="columnIndex">The column index initialized.</param>
209 /// <param name="rowSpan">The row span initialized.</param>
210 /// <param name="columnSpan">The column span initialized.</param>
211 /// <since_tizen> 3 </since_tizen>
212 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true)
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
218 /// The constructor to initialize values to defaults for convenience.
220 /// <param name="rowIndex">The row index initialized.</param>
221 /// <param name="columnIndex">The column index initialized.</param>
222 /// <param name="rowSpan">The row span initialized.</param>
223 /// <since_tizen> 3 </since_tizen>
224 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true)
226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
230 /// The constructor to initialize values to defaults for convenience.
232 /// <param name="rowIndex">The row index initialized.</param>
233 /// <param name="columnIndex">The column index initialized.</param>
234 /// <since_tizen> 3 </since_tizen>
235 public CellPosition(uint rowIndex, uint columnIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true)
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241 /// The constructor to initialize values to default for convenience.
243 /// <param name="rowIndex">The row index initialized.</param>
244 /// <since_tizen> 3 </since_tizen>
245 public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true)
247 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251 /// The default constructor.
253 /// <since_tizen> 3 </since_tizen>
254 public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true)
256 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260 /// The index of a row.
262 /// <since_tizen> 3 </since_tizen>
263 [Obsolete("Please do not use! This will be deprecated! Please use RowIndex instead!")]
264 [EditorBrowsable(EditorBrowsableState.Never)]
269 NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281 /// The index of a row.
283 /// <since_tizen> 5 </since_tizen>
284 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
285 [EditorBrowsable(EditorBrowsableState.Never)]
290 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
291 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 /// The index of a column.
300 /// <since_tizen> 3 </since_tizen>
301 [Obsolete("Please do not use! This will be deprecated! Please use ColumnIndex instead!")]
302 [EditorBrowsable(EditorBrowsableState.Never)]
303 public uint columnIndex
307 NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319 /// The index of a column.
321 /// <since_tizen> 5 </since_tizen>
322 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
323 [EditorBrowsable(EditorBrowsableState.Never)]
324 public uint ColumnIndex
328 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
329 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 /// The span of a row.
337 /// <since_tizen> 3 </since_tizen>
338 [Obsolete("Please do not use! This will be deprecated! Please use RowSpan instead!")]
339 [EditorBrowsable(EditorBrowsableState.Never)]
344 NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
350 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356 /// The span of a row.
358 /// <since_tizen> 5 </since_tizen>
359 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
360 [EditorBrowsable(EditorBrowsableState.Never)]
365 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
366 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
372 /// The span of a column.
374 /// <since_tizen> 3 </since_tizen>
375 [Obsolete("Please do not use! This will be deprecated! Please use ColumnSpan instead!")]
376 [EditorBrowsable(EditorBrowsableState.Never)]
377 public uint columnSpan
381 NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
382 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
386 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
387 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
393 /// The span of a column.
395 /// <since_tizen> 5 </since_tizen>
396 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
397 [EditorBrowsable(EditorBrowsableState.Never)]
398 public uint ColumnSpan
402 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
403 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
412 /// Creates the default TableView view.
414 public TableView() : this(NDalicPINVOKE.TableView_New(1, 1), true)
416 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
421 /// Creates the TableView view.
423 /// <param name="initialRows">Initial rows for the table.</param>
424 /// <param name="initialColumns">Initial columns for the table.</param>
425 /// <since_tizen> 3 </since_tizen>
426 public TableView(uint initialRows, uint initialColumns) : this(NDalicPINVOKE.TableView_New(initialRows, initialColumns), true)
428 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
433 /// The Copy constructor. Creates another handle that points to the same real object.
435 /// <param name="handle">Handle to copy from.</param>
436 /// <since_tizen> 3 </since_tizen>
437 public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true)
439 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
443 /// Adds a child to the table.<br />
444 /// If the row or column index is outside the table, the table gets resized bigger.<br />
446 /// <param name="child">The child to add.</param>
447 /// <param name="position">The position for the child.</param>
448 /// <returns>True if the addition succeeded, and false if the cell is already occupied.</returns>
449 /// <since_tizen> 3 </since_tizen>
450 public bool AddChild(View child, TableView.CellPosition position)
452 bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
453 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
458 /// Returns a child from the given layout position.
460 /// <param name="position">The position in the table.</param>
461 /// <returns>Child that was in the cell or an uninitialized handle.</returns>
462 /// <since_tizen> 3 </since_tizen>
463 public View GetChildAt(TableView.CellPosition position)
465 //to fix memory leak issue, match the handle count with native side.
466 IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
467 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
468 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
469 NDalicPINVOKE.delete_BaseHandle(CPtr);
470 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
472 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
477 /// Removes a child from the given layout position.
479 /// <param name="position">The position for the child to remove.</param>
480 /// <returns>Child that was removed or an uninitialized handle.</returns>
481 /// <since_tizen> 3 </since_tizen>
482 public View RemoveChildAt(TableView.CellPosition position)
484 //to fix memory leak issue, match the handle count with native side.
485 IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
486 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
487 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
488 NDalicPINVOKE.delete_BaseHandle(CPtr);
489 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
491 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
496 /// Finds the child's layout position.
498 /// <param name="child">The child to search for.</param>
499 /// <param name="position">The position for the child.</param>
500 /// <returns>True if the child was included in this TableView.</returns>
501 /// <since_tizen> 3 </since_tizen>
502 public bool FindChildPosition(View child, TableView.CellPosition position)
504 bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
505 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
510 /// Inserts a new row to the given index.
512 /// <param name="rowIndex">The rowIndex of the new row.</param>
513 /// <since_tizen> 3 </since_tizen>
514 public void InsertRow(uint rowIndex)
516 NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
517 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
521 /// Deletes a row from the given index.<br />
522 /// Removed elements are deleted.<br />
524 /// <param name="rowIndex">The rowIndex of the row to delete.</param>
525 /// <since_tizen> 3 </since_tizen>
526 public void DeleteRow(uint rowIndex)
528 NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
529 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533 /// Inserts a new column to the given index.
535 /// <param name="columnIndex">The columnIndex of the new column.</param>
536 /// <since_tizen> 3 </since_tizen>
537 public void InsertColumn(uint columnIndex)
539 NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
540 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
544 /// Deletes a column from the given index.<br />
545 /// Removed elements are deleted.<br />
547 /// <param name="columnIndex">The columnIndex of the column to delete.</param>
548 /// <since_tizen> 3 </since_tizen>
549 public void DeleteColumn(uint columnIndex)
551 NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
552 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
556 /// Resizes the TableView.
558 /// <param name="rows">The rows for the table.</param>
559 /// <param name="columns">The columns for the table.</param>
560 /// <since_tizen> 3 </since_tizen>
561 public void Resize(uint rows, uint columns)
563 NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
564 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568 /// Sets the horizontal and the vertical padding between cells.
570 /// <param name="padding">Width and height.</param>
571 /// <since_tizen> 3 </since_tizen>
572 public void SetCellPadding(Size2D padding)
574 NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Size2D.getCPtr(padding));
575 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
579 /// Gets the current padding as width and height.
581 /// <returns>The current padding as width and height.</returns>
582 /// <since_tizen> 3 </since_tizen>
583 public Vector2 GetCellPadding()
585 Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
586 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
591 /// Specifies this row as fitting its height to its children.
593 /// <param name="rowIndex">The row to set.</param>
594 /// <since_tizen> 3 </since_tizen>
595 public void SetFitHeight(uint rowIndex)
597 NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
598 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
602 /// Checks if the row is a fit row.
604 /// <param name="rowIndex">The row to check.</param>
605 /// <returns>True if the row is fit.</returns>
606 /// <since_tizen> 3 </since_tizen>
607 public bool IsFitHeight(uint rowIndex)
609 bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
610 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
615 /// Specifies this column as fitting its width to its children.
617 /// <param name="columnIndex">The column to set.</param>
618 /// <since_tizen> 3 </since_tizen>
619 public void SetFitWidth(uint columnIndex)
621 NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
622 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
626 /// Checks if the column is a fit column.
628 /// <param name="columnIndex">The column to check.</param>
629 /// <returns>True if the column is fit.</returns>
630 /// <since_tizen> 3 </since_tizen>
631 public bool IsFitWidth(uint columnIndex)
633 bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
634 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
639 /// Sets a row to have a fixed height.<br />
640 /// Setting a fixed height of 0 has no effect.<br />
642 /// <param name="rowIndex">The rowIndex for row with a fixed height.</param>
643 /// <param name="height">The height in world coordinate units.</param>
644 /// <since_tizen> 3 </since_tizen>
645 public void SetFixedHeight(uint rowIndex, float height)
647 NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
648 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
652 /// Gets a row's fixed height.
654 /// <param name="rowIndex">The row index with a fixed height.</param>
655 /// <returns>height The height in world coordinate units.</returns>
656 /// <since_tizen> 3 </since_tizen>
657 public float GetFixedHeight(uint rowIndex)
659 float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
660 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
665 /// Sets a row to have a relative height. Relative height means percentage of
666 /// the remainder of the table height after subtracting padding and fixed height rows.<br />
667 /// Setting a relative height of 0 has no effect.<br />
669 /// <param name="rowIndex">The rowIndex for row with a relative height.</param>
670 /// <param name="heightPercentage">The height percentage between 0.0f and 1.0f.</param>
671 /// <since_tizen> 3 </since_tizen>
672 public void SetRelativeHeight(uint rowIndex, float heightPercentage)
674 NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
675 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
679 /// Gets a row's relative height.
681 /// <param name="rowIndex">The row index with a relative height.</param>
682 /// <returns>Height in percentage units, between 0.0f and 1.0f.</returns>
683 /// <since_tizen> 3 </since_tizen>
684 public float GetRelativeHeight(uint rowIndex)
686 float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
687 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
692 /// Sets a column to have a fixed width.<br />
693 /// Setting a fixed width of 0 has no effect.<br />
695 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
696 /// <param name="width">The width in world coordinate units.</param>
697 /// <since_tizen> 3 </since_tizen>
698 public void SetFixedWidth(uint columnIndex, float width)
700 NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
701 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
705 /// Gets a column's fixed width.
707 /// <param name="columnIndex">The column index with a fixed width.</param>
708 /// <returns>Width in world coordinate units.</returns>
709 /// <since_tizen> 3 </since_tizen>
710 public float GetFixedWidth(uint columnIndex)
712 float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
713 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
718 /// Sets a column to have a relative width. Relative width means percentage of
719 /// the remainder of the table width after subtracting padding and fixed width columns.<br />
720 /// Setting a relative width of 0 has no effect.<br />
722 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
723 /// <param name="widthPercentage">The widthPercentage between 0.0f and 1.0f.</param>
724 /// <since_tizen> 3 </since_tizen>
725 public void SetRelativeWidth(uint columnIndex, float widthPercentage)
727 NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
728 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
732 /// Gets a column's relative width.
734 /// <param name="columnIndex">The column index with a relative width.</param>
735 /// <returns>Width in percentage units, between 0.0f and 1.0f.</returns>
736 /// <since_tizen> 3 </since_tizen>
737 public float GetRelativeWidth(uint columnIndex)
739 float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
740 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
745 /// Sets the alignment on a cell.<br />
746 /// Cells without calling this function have the default values of left and top respectively.<br />
748 /// <param name="position">The cell to set alignment on.</param>
749 /// <param name="horizontal">The horizontal alignment.</param>
750 /// <param name="vertical">The vertical alignment.</param>
751 /// <since_tizen> 3 </since_tizen>
752 public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical)
754 NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
755 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
759 /// Enumeration for describing how the size of a row or column has been set.
761 /// <since_tizen> 3 </since_tizen>
762 public enum LayoutPolicy
765 /// Fixed with the given value.
767 /// <since_tizen> 3 </since_tizen>
770 /// Calculated as percentage of the remainder after subtracting Padding and Fixed height/width.
772 /// <since_tizen> 3 </since_tizen>
775 /// Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns.
777 /// <since_tizen> 3 </since_tizen>
780 /// Fit around its children.
782 /// <since_tizen> 3 </since_tizen>
787 /// The amount of rows in the table.
789 /// <since_tizen> 3 </since_tizen>
795 GetProperty(TableView.Property.ROWS).Get(out temp);
800 SetProperty(TableView.Property.ROWS, new Tizen.NUI.PropertyValue(value));
801 NotifyPropertyChanged();
805 /// The amount of columns in the table.
807 /// <since_tizen> 3 </since_tizen>
813 GetProperty(TableView.Property.COLUMNS).Get(out temp);
818 SetProperty(TableView.Property.COLUMNS, new Tizen.NUI.PropertyValue(value));
819 NotifyPropertyChanged();
823 /// Padding between cells.
825 /// <since_tizen> 3 </since_tizen>
826 public Vector2 CellPadding
830 Vector2 temp = new Vector2(0.0f, 0.0f);
831 GetProperty(TableView.Property.CELL_PADDING).Get(temp);
836 SetProperty(TableView.Property.CELL_PADDING, new Tizen.NUI.PropertyValue(value));
837 NotifyPropertyChanged();
842 /// The number of layout rows.
844 /// <since_tizen> 3 </since_tizen>
845 public PropertyMap LayoutRows
849 PropertyMap temp = new PropertyMap();
850 GetProperty(TableView.Property.LAYOUT_ROWS).Get(temp);
855 SetProperty(TableView.Property.LAYOUT_ROWS, new Tizen.NUI.PropertyValue(value));
856 NotifyPropertyChanged();
861 /// The number of layout columns.
863 /// <since_tizen> 3 </since_tizen>
864 public PropertyMap LayoutColumns
868 PropertyMap temp = new PropertyMap();
869 GetProperty(TableView.Property.LAYOUT_COLUMNS).Get(temp);
874 SetProperty(TableView.Property.LAYOUT_COLUMNS, new Tizen.NUI.PropertyValue(value));
875 NotifyPropertyChanged();