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;
21 using Tizen.NUI.Binding;
23 namespace Tizen.NUI.BaseComponents
27 /// TableView is a layout container for aligning child actors in a grid like layout.<br />
28 /// TableView constraints the X and the Y position and the width and the height of the child actors.<br />
29 /// The Z position and depth are left intact so that the 3D model actors can also be laid out
30 /// in a grid without loosing their depth scaling.<br />
32 /// <since_tizen> 3 </since_tizen>
33 public class TableView : View
35 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 public static readonly BindableProperty RowsProperty = BindableProperty.Create("Rows", typeof(int), typeof(TableView), default(int), propertyChanged: (bindable, oldValue, newValue) =>
39 var tableView = (TableView)bindable;
42 Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.ROWS, new Tizen.NUI.PropertyValue((int)newValue));
45 defaultValueCreator:(bindable) =>
47 var tableView = (TableView)bindable;
49 Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.ROWS).Get(out temp);
52 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
53 [EditorBrowsable(EditorBrowsableState.Never)]
54 public static readonly BindableProperty ColumnsProperty = BindableProperty.Create("Columns", typeof(int), typeof(TableView), default(int), propertyChanged: (bindable, oldValue, newValue) =>
56 var tableView = (TableView)bindable;
59 Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.COLUMNS, new Tizen.NUI.PropertyValue((int)newValue));
62 defaultValueCreator:(bindable) =>
64 var tableView = (TableView)bindable;
66 Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.COLUMNS).Get(out temp);
69 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
70 [EditorBrowsable(EditorBrowsableState.Never)]
71 public static readonly BindableProperty CellPaddingProperty = BindableProperty.Create("CellPadding", typeof(Vector2), typeof(TableView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
73 var tableView = (TableView)bindable;
76 Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.CELL_PADDING, new Tizen.NUI.PropertyValue((Vector2)newValue));
79 defaultValueCreator:(bindable) =>
81 var tableView = (TableView)bindable;
82 Vector2 temp = new Vector2(0.0f, 0.0f);
83 Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.CELL_PADDING).Get(temp);
86 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
87 [EditorBrowsable(EditorBrowsableState.Never)]
88 public static readonly BindableProperty LayoutRowsProperty = BindableProperty.Create("LayoutRows", typeof(PropertyMap), typeof(TableView), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
90 var tableView = (TableView)bindable;
93 Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_ROWS, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
96 defaultValueCreator:(bindable) =>
98 var tableView = (TableView)bindable;
99 PropertyMap temp = new PropertyMap();
100 Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_ROWS).Get(temp);
103 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
104 [EditorBrowsable(EditorBrowsableState.Never)]
105 public static readonly BindableProperty LayoutColumnsProperty = BindableProperty.Create("LayoutColumns", typeof(PropertyMap), typeof(TableView), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
107 var tableView = (TableView)bindable;
108 if (newValue != null)
110 Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_COLUMNS, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
113 defaultValueCreator:(bindable) =>
115 var tableView = (TableView)bindable;
116 PropertyMap temp = new PropertyMap();
117 Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_COLUMNS).Get(temp);
122 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
124 internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TableView_SWIGUpcast(cPtr), cMemoryOwn)
126 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
129 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TableView obj)
131 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
137 /// <param name="type">The dispose type</param>
138 /// <since_tizen> 3 </since_tizen>
139 protected override void Dispose(DisposeTypes type)
146 if (type == DisposeTypes.Explicit)
149 //Release your own managed resources here.
150 //You should release all of your own disposable objects here.
153 //Release your own unmanaged resources here.
154 //You should not access any managed member here except static instance.
155 //because the execution order of Finalizes is non-deterministic.
157 if (swigCPtr.Handle != global::System.IntPtr.Zero)
162 NDalicPINVOKE.delete_TableView(swigCPtr);
164 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
171 internal new class Property
173 internal static readonly int ROWS = NDalicPINVOKE.TableView_Property_ROWS_get();
174 internal static readonly int COLUMNS = NDalicPINVOKE.TableView_Property_COLUMNS_get();
175 internal static readonly int CELL_PADDING = NDalicPINVOKE.TableView_Property_CELL_PADDING_get();
176 internal static readonly int LAYOUT_ROWS = NDalicPINVOKE.TableView_Property_LAYOUT_ROWS_get();
177 internal static readonly int LAYOUT_COLUMNS = NDalicPINVOKE.TableView_Property_LAYOUT_COLUMNS_get();
180 internal class ChildProperty
182 internal static readonly int CELL_INDEX = NDalicPINVOKE.TableView_ChildProperty_CELL_INDEX_get();
183 internal static readonly int ROW_SPAN = NDalicPINVOKE.TableView_ChildProperty_ROW_SPAN_get();
184 internal static readonly int COLUMN_SPAN = NDalicPINVOKE.TableView_ChildProperty_COLUMN_SPAN_get();
185 internal static readonly int CELL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
186 internal static readonly int CELL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();
190 /// Class to specify the layout position for the child view.
192 /// <since_tizen> 3 </since_tizen>
193 public class CellPosition : global::System.IDisposable
195 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
199 /// <since_tizen> 3 </since_tizen>
200 protected bool swigCMemOwn;
202 internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn)
204 swigCMemOwn = cMemoryOwn;
205 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
208 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj)
210 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
213 //A Flag to check who called Dispose(). (By User or DisposeQueue)
214 private bool isDisposeQueued = false;
216 /// A Flat to check if it is already disposed.
218 /// <since_tizen> 3 </since_tizen>
219 protected bool disposed = false;
224 /// <since_tizen> 3 </since_tizen>
227 if (!isDisposeQueued)
229 isDisposeQueued = true;
230 DisposeQueue.Instance.Add(this);
237 /// <since_tizen> 3 </since_tizen>
238 public void Dispose()
240 //Throw excpetion if Dispose() is called in separate thread.
241 if (!Window.IsInstalled())
243 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
248 Dispose(DisposeTypes.Implicit);
252 Dispose(DisposeTypes.Explicit);
253 System.GC.SuppressFinalize(this);
260 /// <param name="type">DisposeTypes</param>
261 /// <since_tizen> 3 </since_tizen>
262 protected virtual void Dispose(DisposeTypes type)
269 if (type == DisposeTypes.Explicit)
272 //Release your own managed resources here.
273 //You should release all of your own disposable objects here.
276 //Release your own unmanaged resources here.
277 //You should not access any managed member here except static instance.
278 //because the execution order of Finalizes is non-deterministic.
280 if (swigCPtr.Handle != global::System.IntPtr.Zero)
285 NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
287 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
295 /// <param name="rowIndex">The row index initialized.</param>
296 /// <param name="columnIndex">The column index initialized.</param>
297 /// <param name="rowSpan">The row span initialized.</param>
298 /// <param name="columnSpan">The column span initialized.</param>
299 /// <since_tizen> 3 </since_tizen>
300 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true)
302 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306 /// The constructor to initialize values to defaults for convenience.
308 /// <param name="rowIndex">The row index initialized.</param>
309 /// <param name="columnIndex">The column index initialized.</param>
310 /// <param name="rowSpan">The row span initialized.</param>
311 /// <since_tizen> 3 </since_tizen>
312 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true)
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318 /// The constructor to initialize values to defaults for convenience.
320 /// <param name="rowIndex">The row index initialized.</param>
321 /// <param name="columnIndex">The column index initialized.</param>
322 /// <since_tizen> 3 </since_tizen>
323 public CellPosition(uint rowIndex, uint columnIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true)
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 /// The constructor to initialize values to default for convenience.
331 /// <param name="rowIndex">The row index initialized.</param>
332 /// <since_tizen> 3 </since_tizen>
333 public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true)
335 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 /// The default constructor.
341 /// <since_tizen> 3 </since_tizen>
342 public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true)
344 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348 /// The index of a row.
350 /// <since_tizen> 3 </since_tizen>
351 [Obsolete("Please do not use! This will be deprecated! Please use RowIndex instead!")]
352 [EditorBrowsable(EditorBrowsableState.Never)]
357 NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
358 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
363 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
369 /// The index or position of a row.
371 /// <since_tizen> 5 </since_tizen>
376 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
377 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
384 /// The index of a column.
386 /// <since_tizen> 3 </since_tizen>
387 [Obsolete("Please do not use! This will be deprecated! Please use ColumnIndex instead!")]
388 [EditorBrowsable(EditorBrowsableState.Never)]
389 public uint columnIndex
393 NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
394 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
398 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
399 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
405 /// The index or position of a column.
407 /// <since_tizen> 5 </since_tizen>
408 public uint ColumnIndex
412 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
413 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419 /// The span of a row.
421 /// <since_tizen> 3 </since_tizen>
422 [Obsolete("Please do not use! This will be deprecated! Please use RowSpan instead!")]
423 [EditorBrowsable(EditorBrowsableState.Never)]
428 NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
429 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
433 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
434 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
440 /// The span of a row.
442 /// <since_tizen> 5 </since_tizen>
447 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
448 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
454 /// The span of a column.
456 /// <since_tizen> 3 </since_tizen>
457 [Obsolete("Please do not use! This will be deprecated! Please use ColumnSpan instead!")]
458 [EditorBrowsable(EditorBrowsableState.Never)]
459 public uint columnSpan
463 NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
464 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
468 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
469 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
475 /// The span of a column.
477 /// <since_tizen> 5 </since_tizen>
478 public uint ColumnSpan
482 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
483 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
492 /// Creates the default TableView view.
494 /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
495 [EditorBrowsable(EditorBrowsableState.Never)]
496 public TableView() : this(NDalicPINVOKE.TableView_New(1, 1), true)
498 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
502 /// Creates the TableView view.
504 /// <param name="initialRows">Initial rows for the table.</param>
505 /// <param name="initialColumns">Initial columns for the table.</param>
506 /// <since_tizen> 3 </since_tizen>
507 public TableView(uint initialRows, uint initialColumns) : this(NDalicPINVOKE.TableView_New(initialRows, initialColumns), true)
509 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
514 /// The Copy constructor. Creates another handle that points to the same real object.
516 /// <param name="handle">Handle to copy from.</param>
517 /// <since_tizen> 3 </since_tizen>
518 public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true)
520 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
524 /// Adds a child to the table.<br />
525 /// If the row or column index is outside the table, the table gets resized bigger.<br />
527 /// <param name="child">The child to add.</param>
528 /// <param name="position">The position for the child.</param>
529 /// <returns>True if the addition succeeded, and false if the cell is already occupied.</returns>
530 /// <since_tizen> 3 </since_tizen>
531 public bool AddChild(View child, TableView.CellPosition position)
533 bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
534 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
539 /// Returns a child from the given layout position.
541 /// <param name="position">The position in the table.</param>
542 /// <returns>Child that was in the cell or an uninitialized handle.</returns>
543 /// <since_tizen> 3 </since_tizen>
544 public View GetChildAt(TableView.CellPosition position)
546 //to fix memory leak issue, match the handle count with native side.
547 IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
548 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
549 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
550 NDalicPINVOKE.delete_BaseHandle(CPtr);
551 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
553 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558 /// Removes a child from the given layout position.
560 /// <param name="position">The position for the child to remove.</param>
561 /// <returns>Child that was removed or an uninitialized handle.</returns>
562 /// <since_tizen> 3 </since_tizen>
563 public View RemoveChildAt(TableView.CellPosition position)
565 //to fix memory leak issue, match the handle count with native side.
566 IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
567 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
568 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
569 NDalicPINVOKE.delete_BaseHandle(CPtr);
570 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
572 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
577 /// Finds the child's layout position.
579 /// <param name="child">The child to search for.</param>
580 /// <param name="position">The position for the child.</param>
581 /// <returns>True if the child was included in this TableView.</returns>
582 /// <since_tizen> 3 </since_tizen>
583 public bool FindChildPosition(View child, TableView.CellPosition position)
585 bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
586 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
591 /// Inserts a new row to the given index.
593 /// <param name="rowIndex">The rowIndex of the new row.</param>
594 /// <since_tizen> 3 </since_tizen>
595 public void InsertRow(uint rowIndex)
597 NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
598 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
602 /// Deletes a row from the given index.<br />
603 /// Removed elements are deleted.<br />
605 /// <param name="rowIndex">The rowIndex of the row to delete.</param>
606 /// <since_tizen> 3 </since_tizen>
607 public void DeleteRow(uint rowIndex)
609 NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
610 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
614 /// Inserts a new column to the given index.
616 /// <param name="columnIndex">The columnIndex of the new column.</param>
617 /// <since_tizen> 3 </since_tizen>
618 public void InsertColumn(uint columnIndex)
620 NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
621 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
625 /// Deletes a column from the given index.<br />
626 /// Removed elements are deleted.<br />
628 /// <param name="columnIndex">The columnIndex of the column to delete.</param>
629 /// <since_tizen> 3 </since_tizen>
630 public void DeleteColumn(uint columnIndex)
632 NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
633 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
637 /// Resizes the TableView.
639 /// <param name="rows">The rows for the table.</param>
640 /// <param name="columns">The columns for the table.</param>
641 /// <since_tizen> 3 </since_tizen>
642 public void Resize(uint rows, uint columns)
644 NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
645 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
649 /// Sets the horizontal and the vertical padding between cells.
651 /// <param name="padding">Width and height.</param>
652 /// <since_tizen> 3 </since_tizen>
653 public void SetCellPadding(Size2D padding)
655 NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Size2D.getCPtr(padding));
656 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
660 /// Gets the current padding as width and height.
662 /// <returns>The current padding as width and height.</returns>
663 /// <since_tizen> 3 </since_tizen>
664 public Vector2 GetCellPadding()
666 Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
667 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
672 /// Specifies this row as fitting its height to its children.
674 /// <param name="rowIndex">The row to set.</param>
675 /// <since_tizen> 3 </since_tizen>
676 public void SetFitHeight(uint rowIndex)
678 NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
679 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
683 /// Checks if the row is a fit row.
685 /// <param name="rowIndex">The row to check.</param>
686 /// <returns>True if the row is fit.</returns>
687 /// <since_tizen> 3 </since_tizen>
688 public bool IsFitHeight(uint rowIndex)
690 bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
691 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
696 /// Specifies this column as fitting its width to its children.
698 /// <param name="columnIndex">The column to set.</param>
699 /// <since_tizen> 3 </since_tizen>
700 public void SetFitWidth(uint columnIndex)
702 NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
703 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
707 /// Checks if the column is a fit column.
709 /// <param name="columnIndex">The column to check.</param>
710 /// <returns>True if the column is fit.</returns>
711 /// <since_tizen> 3 </since_tizen>
712 public bool IsFitWidth(uint columnIndex)
714 bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
715 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
720 /// Sets a row to have a fixed height.<br />
721 /// Setting a fixed height of 0 has no effect.<br />
723 /// <param name="rowIndex">The rowIndex for row with a fixed height.</param>
724 /// <param name="height">The height in world coordinate units.</param>
725 /// <since_tizen> 3 </since_tizen>
726 public void SetFixedHeight(uint rowIndex, float height)
728 NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
729 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
733 /// Gets a row's fixed height.
735 /// <param name="rowIndex">The row index with a fixed height.</param>
736 /// <returns>height The height in world coordinate units.</returns>
737 /// <since_tizen> 3 </since_tizen>
738 public float GetFixedHeight(uint rowIndex)
740 float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
741 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
746 /// Sets a row to have a relative height. Relative height means percentage of
747 /// the remainder of the table height after subtracting padding and fixed height rows.<br />
748 /// Setting a relative height of 0 has no effect.<br />
750 /// <param name="rowIndex">The rowIndex for row with a relative height.</param>
751 /// <param name="heightPercentage">The height percentage between 0.0f and 1.0f.</param>
752 /// <since_tizen> 3 </since_tizen>
753 public void SetRelativeHeight(uint rowIndex, float heightPercentage)
755 NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
756 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
760 /// Gets a row's relative height.
762 /// <param name="rowIndex">The row index with a relative height.</param>
763 /// <returns>Height in percentage units, between 0.0f and 1.0f.</returns>
764 /// <since_tizen> 3 </since_tizen>
765 public float GetRelativeHeight(uint rowIndex)
767 float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
768 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773 /// Sets a column to have a fixed width.<br />
774 /// Setting a fixed width of 0 has no effect.<br />
776 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
777 /// <param name="width">The width in world coordinate units.</param>
778 /// <since_tizen> 3 </since_tizen>
779 public void SetFixedWidth(uint columnIndex, float width)
781 NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
782 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
786 /// Gets a column's fixed width.
788 /// <param name="columnIndex">The column index with a fixed width.</param>
789 /// <returns>Width in world coordinate units.</returns>
790 /// <since_tizen> 3 </since_tizen>
791 public float GetFixedWidth(uint columnIndex)
793 float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
794 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
799 /// Sets a column to have a relative width. Relative width means percentage of
800 /// the remainder of the table width after subtracting padding and fixed width columns.<br />
801 /// Setting a relative width of 0 has no effect.<br />
803 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
804 /// <param name="widthPercentage">The widthPercentage between 0.0f and 1.0f.</param>
805 /// <since_tizen> 3 </since_tizen>
806 public void SetRelativeWidth(uint columnIndex, float widthPercentage)
808 NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
809 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
813 /// Gets a column's relative width.
815 /// <param name="columnIndex">The column index with a relative width.</param>
816 /// <returns>Width in percentage units, between 0.0f and 1.0f.</returns>
817 /// <since_tizen> 3 </since_tizen>
818 public float GetRelativeWidth(uint columnIndex)
820 float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
821 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
826 /// Sets the alignment on a cell.<br />
827 /// Cells without calling this function have the default values of left and top respectively.<br />
829 /// <param name="position">The cell to set alignment on.</param>
830 /// <param name="horizontal">The horizontal alignment.</param>
831 /// <param name="vertical">The vertical alignment.</param>
832 /// <since_tizen> 3 </since_tizen>
833 public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical)
835 NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
836 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
840 /// Enumeration for describing how the size of a row or column has been set.
842 /// <since_tizen> 3 </since_tizen>
843 public enum LayoutPolicy
846 /// Fixed with the given value.
848 /// <since_tizen> 3 </since_tizen>
851 /// Calculated as percentage of the remainder after subtracting Padding and Fixed height/width.
853 /// <since_tizen> 3 </since_tizen>
856 /// Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns.
858 /// <since_tizen> 3 </since_tizen>
861 /// Fit around its children.
863 /// <since_tizen> 3 </since_tizen>
868 /// The amount of rows in the table.
870 /// <since_tizen> 3 </since_tizen>
875 return (int)GetValue(RowsProperty);
879 SetValue(RowsProperty, value);
880 NotifyPropertyChanged();
884 /// The amount of columns in the table.
886 /// <since_tizen> 3 </since_tizen>
891 return (int)GetValue(ColumnsProperty);
895 SetValue(ColumnsProperty, value);
896 NotifyPropertyChanged();
900 /// Padding between cells.
902 /// <since_tizen> 3 </since_tizen>
903 public Vector2 CellPadding
907 return (Vector2)GetValue(CellPaddingProperty);
911 SetValue(CellPaddingProperty, value);
912 NotifyPropertyChanged();
917 /// The number of layout rows.
919 /// <since_tizen> 3 </since_tizen>
920 public PropertyMap LayoutRows
924 return (PropertyMap)GetValue(LayoutRowsProperty);
928 SetValue(LayoutRowsProperty, value);
929 NotifyPropertyChanged();
934 /// The number of layout columns.
936 /// <since_tizen> 3 </since_tizen>
937 public PropertyMap LayoutColumns
941 return (PropertyMap)GetValue(LayoutColumnsProperty);
945 SetValue(LayoutColumnsProperty, value);
946 NotifyPropertyChanged();