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.
20 namespace Tizen.NUI.BaseComponents
24 /// TableView is a layout container for aligning child actors in a grid like layout.<br />
25 /// TableView constraints the X and the Y position and the width and the height of the child actors.<br />
26 /// The Z position and depth are left intact so that the 3D model actors can also be laid out
27 /// in a grid without loosing their depth scaling.<br />
29 public class TableView : View
31 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
33 internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TableView_SWIGUpcast(cPtr), cMemoryOwn)
35 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TableView obj)
40 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
46 /// <param name="type">The dispose type</param>
47 /// <since_tizen> 3 </since_tizen>
48 protected override void Dispose(DisposeTypes type)
55 if(type == DisposeTypes.Explicit)
58 //Release your own managed resources here.
59 //You should release all of your own disposable objects here.
62 //Release your own unmanaged resources here.
63 //You should not access any managed member here except static instance.
64 //because the execution order of Finalizes is non-deterministic.
66 if (swigCPtr.Handle != global::System.IntPtr.Zero)
71 NDalicPINVOKE.delete_TableView(swigCPtr);
73 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
80 internal new class Property
82 internal static readonly int ROWS = NDalicPINVOKE.TableView_Property_ROWS_get();
83 internal static readonly int COLUMNS = NDalicPINVOKE.TableView_Property_COLUMNS_get();
84 internal static readonly int CELL_PADDING = NDalicPINVOKE.TableView_Property_CELL_PADDING_get();
85 internal static readonly int LAYOUT_ROWS = NDalicPINVOKE.TableView_Property_LAYOUT_ROWS_get();
86 internal static readonly int LAYOUT_COLUMNS = NDalicPINVOKE.TableView_Property_LAYOUT_COLUMNS_get();
89 internal class ChildProperty
91 internal static readonly int CELL_INDEX = NDalicPINVOKE.TableView_ChildProperty_CELL_INDEX_get();
92 internal static readonly int ROW_SPAN = NDalicPINVOKE.TableView_ChildProperty_ROW_SPAN_get();
93 internal static readonly int COLUMN_SPAN = NDalicPINVOKE.TableView_ChildProperty_COLUMN_SPAN_get();
94 internal static readonly int CELL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
95 internal static readonly int CELL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();
99 /// Class to specify the layout position for the child view.
101 public class CellPosition : global::System.IDisposable
103 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
107 /// <since_tizen> 3 </since_tizen>
108 protected bool swigCMemOwn;
110 internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn)
112 swigCMemOwn = cMemoryOwn;
113 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
116 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj)
118 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
121 //A Flag to check who called Dispose(). (By User or DisposeQueue)
122 private bool isDisposeQueued = false;
124 /// A Flat to check if it is already disposed.
126 /// <since_tizen> 3 </since_tizen>
127 protected bool disposed = false;
132 /// <since_tizen> 3 </since_tizen>
137 isDisposeQueued = true;
138 DisposeQueue.Instance.Add(this);
145 /// <since_tizen> 3 </since_tizen>
146 public void Dispose()
148 //Throw excpetion if Dispose() is called in separate thread.
149 if (!Window.IsInstalled())
151 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
156 Dispose(DisposeTypes.Implicit);
160 Dispose(DisposeTypes.Explicit);
161 System.GC.SuppressFinalize(this);
168 /// <param name="type">DisposeTypes</param>
169 /// <since_tizen> 3 </since_tizen>
170 protected virtual void Dispose(DisposeTypes type)
177 if(type == DisposeTypes.Explicit)
180 //Release your own managed resources here.
181 //You should release all of your own disposable objects here.
184 //Release your own unmanaged resources here.
185 //You should not access any managed member here except static instance.
186 //because the execution order of Finalizes is non-deterministic.
188 if (swigCPtr.Handle != global::System.IntPtr.Zero)
193 NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
195 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
203 /// <param name="rowIndex">The row index initialized.</param>
204 /// <param name="columnIndex">The column index initialized.</param>
205 /// <param name="rowSpan">The row span initialized.</param>
206 /// <param name="columnSpan">The column span initialized.</param>
207 /// <since_tizen> 3 </since_tizen>
208 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true)
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214 /// The constructor to initialize values to defaults for convenience.
216 /// <param name="rowIndex">The row index initialized.</param>
217 /// <param name="columnIndex">The column index initialized.</param>
218 /// <param name="rowSpan">The row span initialized.</param>
219 /// <since_tizen> 3 </since_tizen>
220 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true)
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 /// The constructor to initialize values to defaults for convenience.
228 /// <param name="rowIndex">The row index initialized.</param>
229 /// <param name="columnIndex">The column index initialized.</param>
230 /// <since_tizen> 3 </since_tizen>
231 public CellPosition(uint rowIndex, uint columnIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true)
233 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 /// The constructor to initialize values to default for convenience.
239 /// <param name="rowIndex">The row index initialized.</param>
240 /// <since_tizen> 3 </since_tizen>
241 public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true)
243 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247 /// The default constructor.
249 /// <since_tizen> 3 </since_tizen>
250 public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true)
252 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256 /// The index of a row.
258 /// <since_tizen> 3 </since_tizen>
263 NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
264 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
269 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
275 /// The index of a column.
277 /// <since_tizen> 3 </since_tizen>
278 public uint columnIndex
282 NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
294 /// The span of a row.
296 /// <since_tizen> 3 </since_tizen>
301 NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313 /// The span of a column.
315 /// <since_tizen> 3 </since_tizen>
316 public uint columnSpan
320 NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
321 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
334 /// Creates the TableView view.
336 /// <param name="initialRows">Initial rows for the table.</param>
337 /// <param name="initialColumns">Initial columns for the table.</param>
338 /// <since_tizen> 3 </since_tizen>
339 public TableView(uint initialRows, uint initialColumns) : this(NDalicPINVOKE.TableView_New(initialRows, initialColumns), true)
341 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
346 /// The Copy constructor. Creates another handle that points to the same real object.
348 /// <param name="handle">Handle to copy from.</param>
349 /// <since_tizen> 3 </since_tizen>
350 public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true)
352 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
355 /// [Obsolete("Please do not use! this will be deprecated")]
357 /// <since_tizen> 3 </since_tizen>
358 [Obsolete("Please do not use! this will be deprecated")]
359 public new static TableView DownCast(BaseHandle handle)
361 TableView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TableView;
362 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
367 /// Adds a child to the table.<br />
368 /// If the row or column index is outside the table, the table gets resized bigger.<br />
370 /// <param name="child">The child to add.</param>
371 /// <param name="position">The position for the child.</param>
372 /// <returns>True if the addition succeeded, and false if the cell is already occupied.</returns>
373 /// <since_tizen> 3 </since_tizen>
374 public bool AddChild(View child, TableView.CellPosition position)
376 bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
377 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
382 /// Returns a child from the given layout position.
384 /// <param name="position">The position in the table.</param>
385 /// <returns>Child that was in the cell or an uninitialized handle.</returns>
386 /// <since_tizen> 3 </since_tizen>
387 public View GetChildAt(TableView.CellPosition position)
389 IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
390 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
392 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
397 /// Removes a child from the given layout position.
399 /// <param name="position">The position for the child to remove.</param>
400 /// <returns>Child that was removed or an uninitialized handle.</returns>
401 /// <since_tizen> 3 </since_tizen>
402 public View RemoveChildAt(TableView.CellPosition position)
404 IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
405 View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
407 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
412 /// Finds the child's layout position.
414 /// <param name="child">The child to search for.</param>
415 /// <param name="position">The position for the child.</param>
416 /// <returns>True if the child was included in this TableView.</returns>
417 /// <since_tizen> 3 </since_tizen>
418 public bool FindChildPosition(View child, TableView.CellPosition position)
420 bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
421 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
426 /// Inserts a new row to the given index.
428 /// <param name="rowIndex">The rowIndex of the new row.</param>
429 /// <since_tizen> 3 </since_tizen>
430 public void InsertRow(uint rowIndex)
432 NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
433 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
437 /// Deletes a row from the given index.<br />
438 /// Removed elements are deleted.<br />
440 /// <param name="rowIndex">The rowIndex of the row to delete.</param>
441 /// <since_tizen> 3 </since_tizen>
442 public void DeleteRow(uint rowIndex)
444 NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
445 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
449 /// Inserts a new column to the given index.
451 /// <param name="columnIndex">The columnIndex of the new column.</param>
452 /// <since_tizen> 3 </since_tizen>
453 public void InsertColumn(uint columnIndex)
455 NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
456 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
460 /// Deletes a column from the given index.<br />
461 /// Removed elements are deleted.<br />
463 /// <param name="columnIndex">The columnIndex of the column to delete.</param>
464 /// <since_tizen> 3 </since_tizen>
465 public void DeleteColumn(uint columnIndex)
467 NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
468 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
472 /// Resizes the TableView.
474 /// <param name="rows">The rows for the table.</param>
475 /// <param name="columns">The columns for the table.</param>
476 /// <since_tizen> 3 </since_tizen>
477 public void Resize(uint rows, uint columns)
479 NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
480 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
484 /// Sets the horizontal and the vertical padding between cells.
486 /// <param name="padding">Width and height.</param>
487 /// <since_tizen> 3 </since_tizen>
488 public void SetCellPadding(Size2D padding)
490 NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Size2D.getCPtr(padding));
491 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
495 /// Gets the current padding as width and height.
497 /// <returns>The current padding as width and height.</returns>
498 /// <since_tizen> 3 </since_tizen>
499 public Vector2 GetCellPadding()
501 Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
502 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507 /// Specifies this row as fitting its height to its children.
509 /// <param name="rowIndex">The row to set.</param>
510 /// <since_tizen> 3 </since_tizen>
511 public void SetFitHeight(uint rowIndex)
513 NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
514 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
518 /// Checks if the row is a fit row.
520 /// <param name="rowIndex">The row to check.</param>
521 /// <returns>True if the row is fit.</returns>
522 /// <since_tizen> 3 </since_tizen>
523 public bool IsFitHeight(uint rowIndex)
525 bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
526 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
531 /// Specifies this column as fitting its width to its children.
533 /// <param name="columnIndex">The column to set.</param>
534 /// <since_tizen> 3 </since_tizen>
535 public void SetFitWidth(uint columnIndex)
537 NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
538 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
542 /// Checks if the column is a fit column.
544 /// <param name="columnIndex">The column to check.</param>
545 /// <returns>True if the column is fit.</returns>
546 /// <since_tizen> 3 </since_tizen>
547 public bool IsFitWidth(uint columnIndex)
549 bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
550 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
555 /// Sets a row to have a fixed height.<br />
556 /// Setting a fixed height of 0 has no effect.<br />
558 /// <param name="rowIndex">The rowIndex for row with a fixed height.</param>
559 /// <param name="height">The height in world coordinate units.</param>
560 /// <since_tizen> 3 </since_tizen>
561 public void SetFixedHeight(uint rowIndex, float height)
563 NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
564 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
568 /// Gets a row's fixed height.
570 /// <param name="rowIndex">The row index with a fixed height.</param>
571 /// <returns>height The height in world coordinate units.</returns>
572 /// <since_tizen> 3 </since_tizen>
573 public float GetFixedHeight(uint rowIndex)
575 float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
576 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
581 /// Sets a row to have a relative height. Relative height means percentage of
582 /// the remainder of the table height after subtracting padding and fixed height rows.<br />
583 /// Setting a relative height of 0 has no effect.<br />
585 /// <param name="rowIndex">The rowIndex for row with a relative height.</param>
586 /// <param name="heightPercentage">The height percentage between 0.0f and 1.0f.</param>
587 /// <since_tizen> 3 </since_tizen>
588 public void SetRelativeHeight(uint rowIndex, float heightPercentage)
590 NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
591 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
595 /// Gets a row's relative height.
597 /// <param name="rowIndex">The row index with a relative height.</param>
598 /// <returns>Height in percentage units, between 0.0f and 1.0f.</returns>
599 /// <since_tizen> 3 </since_tizen>
600 public float GetRelativeHeight(uint rowIndex)
602 float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
603 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
608 /// Sets a column to have a fixed width.<br />
609 /// Setting a fixed width of 0 has no effect.<br />
611 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
612 /// <param name="width">The width in world coordinate units.</param>
613 /// <since_tizen> 3 </since_tizen>
614 public void SetFixedWidth(uint columnIndex, float width)
616 NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
617 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
621 /// Gets a column's fixed width.
623 /// <param name="columnIndex">The column index with a fixed width.</param>
624 /// <returns>Width in world coordinate units.</returns>
625 /// <since_tizen> 3 </since_tizen>
626 public float GetFixedWidth(uint columnIndex)
628 float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
629 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
634 /// Sets a column to have a relative width. Relative width means percentage of
635 /// the remainder of the table width after subtracting padding and fixed width columns.<br />
636 /// Setting a relative width of 0 has no effect.<br />
638 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
639 /// <param name="widthPercentage">The widthPercentage between 0.0f and 1.0f.</param>
640 /// <since_tizen> 3 </since_tizen>
641 public void SetRelativeWidth(uint columnIndex, float widthPercentage)
643 NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
644 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
648 /// Gets a column's relative width.
650 /// <param name="columnIndex">The column index with a relative width.</param>
651 /// <returns>Width in percentage units, between 0.0f and 1.0f.</returns>
652 /// <since_tizen> 3 </since_tizen>
653 public float GetRelativeWidth(uint columnIndex)
655 float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
656 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
661 /// Sets the alignment on a cell.<br />
662 /// Cells without calling this function have the default values of left and top respectively.<br />
664 /// <param name="position">The cell to set alignment on.</param>
665 /// <param name="horizontal">The horizontal alignment.</param>
666 /// <param name="vertical">The vertical alignment.</param>
667 /// <since_tizen> 3 </since_tizen>
668 public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical)
670 NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
671 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
675 /// Enumeration for describing how the size of a row or column has been set.
677 /// <since_tizen> 3 </since_tizen>
678 public enum LayoutPolicy
681 /// Fixed with the given value.
683 /// <since_tizen> 3 </since_tizen>
686 /// Calculated as percentage of the remainder after subtracting Padding and Fixed height/width.
688 /// <since_tizen> 3 </since_tizen>
691 /// Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns.
693 /// <since_tizen> 3 </since_tizen>
696 /// Fit around its children.
698 /// <since_tizen> 3 </since_tizen>
703 /// The amount of rows in the table.
705 /// <since_tizen> 3 </since_tizen>
711 GetProperty(TableView.Property.ROWS).Get(out temp);
716 SetProperty(TableView.Property.ROWS, new Tizen.NUI.PropertyValue(value));
720 /// The amount of columns in the table.
722 /// <since_tizen> 3 </since_tizen>
728 GetProperty(TableView.Property.COLUMNS).Get(out temp);
733 SetProperty(TableView.Property.COLUMNS, new Tizen.NUI.PropertyValue(value));
737 /// Padding between cells.
739 /// <since_tizen> 3 </since_tizen>
740 public Vector2 CellPadding
744 Vector2 temp = new Vector2(0.0f, 0.0f);
745 GetProperty(TableView.Property.CELL_PADDING).Get(temp);
750 SetProperty(TableView.Property.CELL_PADDING, new Tizen.NUI.PropertyValue(value));
755 /// The number of layout rows.
757 /// <since_tizen> 3 </since_tizen>
758 public PropertyMap LayoutRows
762 PropertyMap temp = new PropertyMap();
763 GetProperty(TableView.Property.LAYOUT_ROWS).Get(temp);
768 SetProperty(TableView.Property.LAYOUT_ROWS, new Tizen.NUI.PropertyValue(value));
773 /// The number of layout columns.
775 /// <since_tizen> 3 </since_tizen>
776 public PropertyMap LayoutColumns
780 PropertyMap temp = new PropertyMap();
781 GetProperty(TableView.Property.LAYOUT_COLUMNS).Get(temp);
786 SetProperty(TableView.Property.LAYOUT_COLUMNS, new Tizen.NUI.PropertyValue(value));