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>
267 NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
268 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
273 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 /// The index of a column.
281 /// <since_tizen> 3 </since_tizen>
282 public uint columnIndex
286 NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
287 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
291 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298 /// The span of a row.
300 /// <since_tizen> 3 </since_tizen>
305 NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
306 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
310 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 /// The span of a column.
319 /// <since_tizen> 3 </since_tizen>
320 public uint columnSpan
324 NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
330 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338 /// Creates the TableView view.
340 /// <param name="initialRows">Initial rows for the table.</param>
341 /// <param name="initialColumns">Initial columns for the table.</param>
342 /// <since_tizen> 3 </since_tizen>
343 public TableView(uint initialRows, uint initialColumns) : this(NDalicPINVOKE.TableView_New(initialRows, initialColumns), true)
345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 /// The Copy constructor. Creates another handle that points to the same real object.
352 /// <param name="handle">Handle to copy from.</param>
353 /// <since_tizen> 3 </since_tizen>
354 public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true)
356 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
360 /// Adds a child to the table.<br />
361 /// If the row or column index is outside the table, the table gets resized bigger.<br />
363 /// <param name="child">The child to add.</param>
364 /// <param name="position">The position for the child.</param>
365 /// <returns>True if the addition succeeded, and false if the cell is already occupied.</returns>
366 /// <since_tizen> 3 </since_tizen>
367 public bool AddChild(View child, TableView.CellPosition position)
369 bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
370 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
375 /// Returns a child from the given layout position.
377 /// <param name="position">The position in the table.</param>
378 /// <returns>Child that was in the cell or an uninitialized handle.</returns>
379 /// <since_tizen> 3 </since_tizen>
380 public View GetChildAt(TableView.CellPosition position)
382 //to fix memory leak issue, match the handle count with native side.
383 IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
384 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
385 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
386 NDalicPINVOKE.delete_BaseHandle(CPtr);
387 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
389 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
394 /// Removes a child from the given layout position.
396 /// <param name="position">The position for the child to remove.</param>
397 /// <returns>Child that was removed or an uninitialized handle.</returns>
398 /// <since_tizen> 3 </since_tizen>
399 public View RemoveChildAt(TableView.CellPosition position)
401 //to fix memory leak issue, match the handle count with native side.
402 IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
403 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
404 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
405 NDalicPINVOKE.delete_BaseHandle(CPtr);
406 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
408 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
413 /// Finds the child's layout position.
415 /// <param name="child">The child to search for.</param>
416 /// <param name="position">The position for the child.</param>
417 /// <returns>True if the child was included in this TableView.</returns>
418 /// <since_tizen> 3 </since_tizen>
419 public bool FindChildPosition(View child, TableView.CellPosition position)
421 bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
422 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
427 /// Inserts a new row to the given index.
429 /// <param name="rowIndex">The rowIndex of the new row.</param>
430 /// <since_tizen> 3 </since_tizen>
431 public void InsertRow(uint rowIndex)
433 NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
434 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438 /// Deletes a row from the given index.<br />
439 /// Removed elements are deleted.<br />
441 /// <param name="rowIndex">The rowIndex of the row to delete.</param>
442 /// <since_tizen> 3 </since_tizen>
443 public void DeleteRow(uint rowIndex)
445 NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
446 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
450 /// Inserts a new column to the given index.
452 /// <param name="columnIndex">The columnIndex of the new column.</param>
453 /// <since_tizen> 3 </since_tizen>
454 public void InsertColumn(uint columnIndex)
456 NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
457 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
461 /// Deletes a column from the given index.<br />
462 /// Removed elements are deleted.<br />
464 /// <param name="columnIndex">The columnIndex of the column to delete.</param>
465 /// <since_tizen> 3 </since_tizen>
466 public void DeleteColumn(uint columnIndex)
468 NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
469 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
473 /// Resizes the TableView.
475 /// <param name="rows">The rows for the table.</param>
476 /// <param name="columns">The columns for the table.</param>
477 /// <since_tizen> 3 </since_tizen>
478 public void Resize(uint rows, uint columns)
480 NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
481 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
485 /// Sets the horizontal and the vertical padding between cells.
487 /// <param name="padding">Width and height.</param>
488 /// <since_tizen> 3 </since_tizen>
489 public void SetCellPadding(Size2D padding)
491 NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Size2D.getCPtr(padding));
492 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
496 /// Gets the current padding as width and height.
498 /// <returns>The current padding as width and height.</returns>
499 /// <since_tizen> 3 </since_tizen>
500 public Vector2 GetCellPadding()
502 Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
503 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
508 /// Specifies this row as fitting its height to its children.
510 /// <param name="rowIndex">The row to set.</param>
511 /// <since_tizen> 3 </since_tizen>
512 public void SetFitHeight(uint rowIndex)
514 NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
519 /// Checks if the row is a fit row.
521 /// <param name="rowIndex">The row to check.</param>
522 /// <returns>True if the row is fit.</returns>
523 /// <since_tizen> 3 </since_tizen>
524 public bool IsFitHeight(uint rowIndex)
526 bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
527 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
532 /// Specifies this column as fitting its width to its children.
534 /// <param name="columnIndex">The column to set.</param>
535 /// <since_tizen> 3 </since_tizen>
536 public void SetFitWidth(uint columnIndex)
538 NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
539 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
543 /// Checks if the column is a fit column.
545 /// <param name="columnIndex">The column to check.</param>
546 /// <returns>True if the column is fit.</returns>
547 /// <since_tizen> 3 </since_tizen>
548 public bool IsFitWidth(uint columnIndex)
550 bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
551 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
556 /// Sets a row to have a fixed height.<br />
557 /// Setting a fixed height of 0 has no effect.<br />
559 /// <param name="rowIndex">The rowIndex for row with a fixed height.</param>
560 /// <param name="height">The height in world coordinate units.</param>
561 /// <since_tizen> 3 </since_tizen>
562 public void SetFixedHeight(uint rowIndex, float height)
564 NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
565 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
569 /// Gets a row's fixed height.
571 /// <param name="rowIndex">The row index with a fixed height.</param>
572 /// <returns>height The height in world coordinate units.</returns>
573 /// <since_tizen> 3 </since_tizen>
574 public float GetFixedHeight(uint rowIndex)
576 float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
577 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
582 /// Sets a row to have a relative height. Relative height means percentage of
583 /// the remainder of the table height after subtracting padding and fixed height rows.<br />
584 /// Setting a relative height of 0 has no effect.<br />
586 /// <param name="rowIndex">The rowIndex for row with a relative height.</param>
587 /// <param name="heightPercentage">The height percentage between 0.0f and 1.0f.</param>
588 /// <since_tizen> 3 </since_tizen>
589 public void SetRelativeHeight(uint rowIndex, float heightPercentage)
591 NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
592 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
596 /// Gets a row's relative height.
598 /// <param name="rowIndex">The row index with a relative height.</param>
599 /// <returns>Height in percentage units, between 0.0f and 1.0f.</returns>
600 /// <since_tizen> 3 </since_tizen>
601 public float GetRelativeHeight(uint rowIndex)
603 float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
604 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
609 /// Sets a column to have a fixed width.<br />
610 /// Setting a fixed width of 0 has no effect.<br />
612 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
613 /// <param name="width">The width in world coordinate units.</param>
614 /// <since_tizen> 3 </since_tizen>
615 public void SetFixedWidth(uint columnIndex, float width)
617 NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
618 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
622 /// Gets a column's fixed width.
624 /// <param name="columnIndex">The column index with a fixed width.</param>
625 /// <returns>Width in world coordinate units.</returns>
626 /// <since_tizen> 3 </since_tizen>
627 public float GetFixedWidth(uint columnIndex)
629 float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
630 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
635 /// Sets a column to have a relative width. Relative width means percentage of
636 /// the remainder of the table width after subtracting padding and fixed width columns.<br />
637 /// Setting a relative width of 0 has no effect.<br />
639 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
640 /// <param name="widthPercentage">The widthPercentage between 0.0f and 1.0f.</param>
641 /// <since_tizen> 3 </since_tizen>
642 public void SetRelativeWidth(uint columnIndex, float widthPercentage)
644 NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
645 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
649 /// Gets a column's relative width.
651 /// <param name="columnIndex">The column index with a relative width.</param>
652 /// <returns>Width in percentage units, between 0.0f and 1.0f.</returns>
653 /// <since_tizen> 3 </since_tizen>
654 public float GetRelativeWidth(uint columnIndex)
656 float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
657 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
662 /// Sets the alignment on a cell.<br />
663 /// Cells without calling this function have the default values of left and top respectively.<br />
665 /// <param name="position">The cell to set alignment on.</param>
666 /// <param name="horizontal">The horizontal alignment.</param>
667 /// <param name="vertical">The vertical alignment.</param>
668 /// <since_tizen> 3 </since_tizen>
669 public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical)
671 NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
672 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
676 /// Enumeration for describing how the size of a row or column has been set.
678 /// <since_tizen> 3 </since_tizen>
679 public enum LayoutPolicy
682 /// Fixed with the given value.
684 /// <since_tizen> 3 </since_tizen>
687 /// Calculated as percentage of the remainder after subtracting Padding and Fixed height/width.
689 /// <since_tizen> 3 </since_tizen>
692 /// Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns.
694 /// <since_tizen> 3 </since_tizen>
697 /// Fit around its children.
699 /// <since_tizen> 3 </since_tizen>
704 /// The amount of rows in the table.
706 /// <since_tizen> 3 </since_tizen>
712 GetProperty(TableView.Property.ROWS).Get(out temp);
717 SetProperty(TableView.Property.ROWS, new Tizen.NUI.PropertyValue(value));
721 /// The amount of columns in the table.
723 /// <since_tizen> 3 </since_tizen>
729 GetProperty(TableView.Property.COLUMNS).Get(out temp);
734 SetProperty(TableView.Property.COLUMNS, new Tizen.NUI.PropertyValue(value));
738 /// Padding between cells.
740 /// <since_tizen> 3 </since_tizen>
741 public Vector2 CellPadding
745 Vector2 temp = new Vector2(0.0f, 0.0f);
746 GetProperty(TableView.Property.CELL_PADDING).Get(temp);
751 SetProperty(TableView.Property.CELL_PADDING, new Tizen.NUI.PropertyValue(value));
756 /// The number of layout rows.
758 /// <since_tizen> 3 </since_tizen>
759 public PropertyMap LayoutRows
763 PropertyMap temp = new PropertyMap();
764 GetProperty(TableView.Property.LAYOUT_ROWS).Get(temp);
769 SetProperty(TableView.Property.LAYOUT_ROWS, new Tizen.NUI.PropertyValue(value));
774 /// The number of layout columns.
776 /// <since_tizen> 3 </since_tizen>
777 public PropertyMap LayoutColumns
781 PropertyMap temp = new PropertyMap();
782 GetProperty(TableView.Property.LAYOUT_COLUMNS).Get(temp);
787 SetProperty(TableView.Property.LAYOUT_COLUMNS, new Tizen.NUI.PropertyValue(value));