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), null, 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), null, 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), null, 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);
121 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
124 /// Creates the default TableView view.
126 public TableView() : this(NDalicPINVOKE.TableView_New(1, 1), true)
128 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 /// Creates the TableView view.
134 /// <param name="initialRows">Initial rows for the table.</param>
135 /// <param name="initialColumns">Initial columns for the table.</param>
136 /// <since_tizen> 3 </since_tizen>
137 public TableView(uint initialRows, uint initialColumns) : this(NDalicPINVOKE.TableView_New(initialRows, initialColumns), true)
139 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
144 /// The Copy constructor. Creates another handle that points to the same real object.
146 /// <param name="handle">Handle to copy from.</param>
147 /// <since_tizen> 3 </since_tizen>
148 public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true)
150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153 internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TableView_SWIGUpcast(cPtr), cMemoryOwn)
155 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
159 /// Enumeration for describing how the size of a row or column has been set.
161 /// <since_tizen> 3 </since_tizen>
162 public enum LayoutPolicy
165 /// Fixed with the given value.
167 /// <since_tizen> 3 </since_tizen>
170 /// Calculated as percentage of the remainder after subtracting Padding and Fixed height/width.
172 /// <since_tizen> 3 </since_tizen>
175 /// Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns.
177 /// <since_tizen> 3 </since_tizen>
180 /// Fit around its children.
182 /// <since_tizen> 3 </since_tizen>
187 /// The amount of rows in the table.
189 /// <since_tizen> 3 </since_tizen>
194 return (int)GetValue(RowsProperty);
198 SetValue(RowsProperty, value);
199 NotifyPropertyChanged();
203 /// The amount of columns in the table.
205 /// <since_tizen> 3 </since_tizen>
210 return (int)GetValue(ColumnsProperty);
214 SetValue(ColumnsProperty, value);
215 NotifyPropertyChanged();
219 /// Padding between cells.
221 /// <since_tizen> 3 </since_tizen>
222 public Vector2 CellPadding
226 return (Vector2)GetValue(CellPaddingProperty);
230 SetValue(CellPaddingProperty, value);
231 NotifyPropertyChanged();
236 /// The number of layout rows.
238 /// <since_tizen> 3 </since_tizen>
239 public PropertyMap LayoutRows
243 return (PropertyMap)GetValue(LayoutRowsProperty);
247 SetValue(LayoutRowsProperty, value);
248 NotifyPropertyChanged();
253 /// The number of layout columns.
255 /// <since_tizen> 3 </since_tizen>
256 public PropertyMap LayoutColumns
260 return (PropertyMap)GetValue(LayoutColumnsProperty);
264 SetValue(LayoutColumnsProperty, value);
265 NotifyPropertyChanged();
271 /// Adds a child to the table.<br />
272 /// If the row or column index is outside the table, the table gets resized bigger.<br />
274 /// <param name="child">The child to add.</param>
275 /// <param name="position">The position for the child.</param>
276 /// <returns>True if the addition succeeded, and false if the cell is already occupied.</returns>
277 /// <since_tizen> 3 </since_tizen>
278 public bool AddChild(View child, TableView.CellPosition position)
280 bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
286 /// Returns a child from the given layout position.
288 /// <param name="position">The position in the table.</param>
289 /// <returns>Child that was in the cell or an uninitialized handle.</returns>
290 /// <since_tizen> 3 </since_tizen>
291 public View GetChildAt(TableView.CellPosition position)
293 //to fix memory leak issue, match the handle count with native side.
294 IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
295 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
296 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
297 NDalicPINVOKE.delete_BaseHandle(CPtr);
298 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
300 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305 /// Removes a child from the given layout position.
307 /// <param name="position">The position for the child to remove.</param>
308 /// <returns>Child that was removed or an uninitialized handle.</returns>
309 /// <since_tizen> 3 </since_tizen>
310 public View RemoveChildAt(TableView.CellPosition position)
312 //to fix memory leak issue, match the handle count with native side.
313 IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
314 HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
315 View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
316 NDalicPINVOKE.delete_BaseHandle(CPtr);
317 CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
324 /// Finds the child's layout position.
326 /// <param name="child">The child to search for.</param>
327 /// <param name="position">The position for the child.</param>
328 /// <returns>True if the child was included in this TableView.</returns>
329 /// <since_tizen> 3 </since_tizen>
330 public bool FindChildPosition(View child, TableView.CellPosition position)
332 bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
333 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338 /// Inserts a new row to the given index.
340 /// <param name="rowIndex">The rowIndex of the new row.</param>
341 /// <since_tizen> 3 </since_tizen>
342 public void InsertRow(uint rowIndex)
344 NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
349 /// Deletes a row from the given index.<br />
350 /// Removed elements are deleted.<br />
352 /// <param name="rowIndex">The rowIndex of the row to delete.</param>
353 /// <since_tizen> 3 </since_tizen>
354 public void DeleteRow(uint rowIndex)
356 NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
357 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
361 /// Inserts a new column to the given index.
363 /// <param name="columnIndex">The columnIndex of the new column.</param>
364 /// <since_tizen> 3 </since_tizen>
365 public void InsertColumn(uint columnIndex)
367 NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
368 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
372 /// Deletes a column from the given index.<br />
373 /// Removed elements are deleted.<br />
375 /// <param name="columnIndex">The columnIndex of the column to delete.</param>
376 /// <since_tizen> 3 </since_tizen>
377 public void DeleteColumn(uint columnIndex)
379 NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
380 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
384 /// Resizes the TableView.
386 /// <param name="rows">The rows for the table.</param>
387 /// <param name="columns">The columns for the table.</param>
388 /// <since_tizen> 3 </since_tizen>
389 public void Resize(uint rows, uint columns)
391 NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
392 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
396 /// Sets the horizontal and the vertical padding between cells.
398 /// <param name="padding">Width and height.</param>
399 /// <since_tizen> 3 </since_tizen>
400 public void SetCellPadding(Size2D padding)
402 NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Size2D.getCPtr(padding));
403 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
407 /// Gets the current padding as width and height.
409 /// <returns>The current padding as width and height.</returns>
410 /// <since_tizen> 3 </since_tizen>
411 public Vector2 GetCellPadding()
413 Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
414 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419 /// Specifies this row as fitting its height to its children.
421 /// <param name="rowIndex">The row to set.</param>
422 /// <since_tizen> 3 </since_tizen>
423 public void SetFitHeight(uint rowIndex)
425 NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
426 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
430 /// Checks if the row is a fit row.
432 /// <param name="rowIndex">The row to check.</param>
433 /// <returns>True if the row is fit.</returns>
434 /// <since_tizen> 3 </since_tizen>
435 public bool IsFitHeight(uint rowIndex)
437 bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
438 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
443 /// Specifies this column as fitting its width to its children.
445 /// <param name="columnIndex">The column to set.</param>
446 /// <since_tizen> 3 </since_tizen>
447 public void SetFitWidth(uint columnIndex)
449 NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
450 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
454 /// Checks if the column is a fit column.
456 /// <param name="columnIndex">The column to check.</param>
457 /// <returns>True if the column is fit.</returns>
458 /// <since_tizen> 3 </since_tizen>
459 public bool IsFitWidth(uint columnIndex)
461 bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
462 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
467 /// Sets a row to have a fixed height.<br />
468 /// Setting a fixed height of 0 has no effect.<br />
470 /// <param name="rowIndex">The rowIndex for row with a fixed height.</param>
471 /// <param name="height">The height in world coordinate units.</param>
472 /// <since_tizen> 3 </since_tizen>
473 public void SetFixedHeight(uint rowIndex, float height)
475 NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
476 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
480 /// Gets a row's fixed height.
482 /// <param name="rowIndex">The row index with a fixed height.</param>
483 /// <returns>height The height in world coordinate units.</returns>
484 /// <since_tizen> 3 </since_tizen>
485 public float GetFixedHeight(uint rowIndex)
487 float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
488 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
493 /// Sets a row to have a relative height. Relative height means percentage of
494 /// the remainder of the table height after subtracting padding and fixed height rows.<br />
495 /// Setting a relative height of 0 has no effect.<br />
497 /// <param name="rowIndex">The rowIndex for row with a relative height.</param>
498 /// <param name="heightPercentage">The height percentage between 0.0f and 1.0f.</param>
499 /// <since_tizen> 3 </since_tizen>
500 public void SetRelativeHeight(uint rowIndex, float heightPercentage)
502 NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
503 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507 /// Gets a row's relative height.
509 /// <param name="rowIndex">The row index with a relative height.</param>
510 /// <returns>Height in percentage units, between 0.0f and 1.0f.</returns>
511 /// <since_tizen> 3 </since_tizen>
512 public float GetRelativeHeight(uint rowIndex)
514 float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
515 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
520 /// Sets a column to have a fixed width.<br />
521 /// Setting a fixed width of 0 has no effect.<br />
523 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
524 /// <param name="width">The width in world coordinate units.</param>
525 /// <since_tizen> 3 </since_tizen>
526 public void SetFixedWidth(uint columnIndex, float width)
528 NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
529 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533 /// Gets a column's fixed width.
535 /// <param name="columnIndex">The column index with a fixed width.</param>
536 /// <returns>Width in world coordinate units.</returns>
537 /// <since_tizen> 3 </since_tizen>
538 public float GetFixedWidth(uint columnIndex)
540 float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
541 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
546 /// Sets a column to have a relative width. Relative width means percentage of
547 /// the remainder of the table width after subtracting padding and fixed width columns.<br />
548 /// Setting a relative width of 0 has no effect.<br />
550 /// <param name="columnIndex">The columnIndex for column with a fixed width.</param>
551 /// <param name="widthPercentage">The widthPercentage between 0.0f and 1.0f.</param>
552 /// <since_tizen> 3 </since_tizen>
553 public void SetRelativeWidth(uint columnIndex, float widthPercentage)
555 NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
556 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
560 /// Gets a column's relative width.
562 /// <param name="columnIndex">The column index with a relative width.</param>
563 /// <returns>Width in percentage units, between 0.0f and 1.0f.</returns>
564 /// <since_tizen> 3 </since_tizen>
565 public float GetRelativeWidth(uint columnIndex)
567 float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
568 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
573 /// Sets the alignment on a cell.<br />
574 /// Cells without calling this function have the default values of left and top respectively.<br />
576 /// <param name="position">The cell to set alignment on.</param>
577 /// <param name="horizontal">The horizontal alignment.</param>
578 /// <param name="vertical">The vertical alignment.</param>
579 /// <since_tizen> 3 </since_tizen>
580 public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical)
582 NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
583 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
586 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TableView obj)
588 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
594 /// <param name="type">The dispose type</param>
595 /// <since_tizen> 3 </since_tizen>
596 protected override void Dispose(DisposeTypes type)
603 if (type == DisposeTypes.Explicit)
606 //Release your own managed resources here.
607 //You should release all of your own disposable objects here.
610 //Release your own unmanaged resources here.
611 //You should not access any managed member here except static instance.
612 //because the execution order of Finalizes is non-deterministic.
614 if (swigCPtr.Handle != global::System.IntPtr.Zero)
619 NDalicPINVOKE.delete_TableView(swigCPtr);
621 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
628 /// Class to specify the layout position for the child view.
630 /// <since_tizen> 3 </since_tizen>
631 public class CellPosition : global::System.IDisposable
636 /// <since_tizen> 3 </since_tizen>
637 protected bool swigCMemOwn;
639 /// A Flat to check if it is already disposed.
641 /// <since_tizen> 3 </since_tizen>
642 protected bool disposed = false;
644 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
645 //A Flag to check who called Dispose(). (By User or DisposeQueue)
646 private bool isDisposeQueued = false;
651 /// <param name="rowIndex">The row index initialized.</param>
652 /// <param name="columnIndex">The column index initialized.</param>
653 /// <param name="rowSpan">The row span initialized.</param>
654 /// <param name="columnSpan">The column span initialized.</param>
655 /// <since_tizen> 3 </since_tizen>
656 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true)
658 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
662 /// The constructor to initialize values to defaults for convenience.
664 /// <param name="rowIndex">The row index initialized.</param>
665 /// <param name="columnIndex">The column index initialized.</param>
666 /// <param name="rowSpan">The row span initialized.</param>
667 /// <since_tizen> 3 </since_tizen>
668 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true)
670 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
674 /// The constructor to initialize values to defaults for convenience.
676 /// <param name="rowIndex">The row index initialized.</param>
677 /// <param name="columnIndex">The column index initialized.</param>
678 /// <since_tizen> 3 </since_tizen>
679 public CellPosition(uint rowIndex, uint columnIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true)
681 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
685 /// The constructor to initialize values to default for convenience.
687 /// <param name="rowIndex">The row index initialized.</param>
688 /// <since_tizen> 3 </since_tizen>
689 public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true)
691 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
695 /// The default constructor.
697 /// <since_tizen> 3 </since_tizen>
698 public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true)
700 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
703 internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn)
705 swigCMemOwn = cMemoryOwn;
706 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
712 /// <since_tizen> 3 </since_tizen>
715 if (!isDisposeQueued)
717 isDisposeQueued = true;
718 DisposeQueue.Instance.Add(this);
723 /// The index of a row.
725 /// <since_tizen> 3 </since_tizen>
726 [Obsolete("Please do not use! This will be deprecated! Please use RowIndex instead!")]
727 [EditorBrowsable(EditorBrowsableState.Never)]
732 NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
733 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
737 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
738 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
744 /// The index or position of a row.
746 /// <since_tizen> 5 </since_tizen>
751 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
752 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
759 /// The index of a column.
761 /// <since_tizen> 3 </since_tizen>
762 [Obsolete("Please do not use! This will be deprecated! Please use ColumnIndex instead!")]
763 [EditorBrowsable(EditorBrowsableState.Never)]
764 public uint columnIndex
768 NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
769 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
773 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
774 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780 /// The index or position of a column.
782 /// <since_tizen> 5 </since_tizen>
783 public uint ColumnIndex
787 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
788 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
794 /// The span of a row.
796 /// <since_tizen> 3 </since_tizen>
797 [Obsolete("Please do not use! This will be deprecated! Please use RowSpan instead!")]
798 [EditorBrowsable(EditorBrowsableState.Never)]
803 NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
804 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
808 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
809 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
815 /// The span of a row.
817 /// <since_tizen> 5 </since_tizen>
822 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
823 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829 /// The span of a column.
831 /// <since_tizen> 3 </since_tizen>
832 [Obsolete("Please do not use! This will be deprecated! Please use ColumnSpan instead!")]
833 [EditorBrowsable(EditorBrowsableState.Never)]
834 public uint columnSpan
838 NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
839 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
843 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
844 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
850 /// The span of a column.
852 /// <since_tizen> 5 </since_tizen>
853 public uint ColumnSpan
857 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
858 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
867 /// <since_tizen> 3 </since_tizen>
868 public void Dispose()
870 //Throw excpetion if Dispose() is called in separate thread.
871 if (!Window.IsInstalled())
873 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
878 Dispose(DisposeTypes.Implicit);
882 Dispose(DisposeTypes.Explicit);
883 System.GC.SuppressFinalize(this);
887 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj)
889 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
895 /// <param name="type">DisposeTypes</param>
896 /// <since_tizen> 3 </since_tizen>
897 protected virtual void Dispose(DisposeTypes type)
904 if (type == DisposeTypes.Explicit)
907 //Release your own managed resources here.
908 //You should release all of your own disposable objects here.
911 //Release your own unmanaged resources here.
912 //You should not access any managed member here except static instance.
913 //because the execution order of Finalizes is non-deterministic.
915 if (swigCPtr.Handle != global::System.IntPtr.Zero)
920 NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
922 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
929 internal new class Property
931 internal static readonly int ROWS = NDalicPINVOKE.TableView_Property_ROWS_get();
932 internal static readonly int COLUMNS = NDalicPINVOKE.TableView_Property_COLUMNS_get();
933 internal static readonly int CELL_PADDING = NDalicPINVOKE.TableView_Property_CELL_PADDING_get();
934 internal static readonly int LAYOUT_ROWS = NDalicPINVOKE.TableView_Property_LAYOUT_ROWS_get();
935 internal static readonly int LAYOUT_COLUMNS = NDalicPINVOKE.TableView_Property_LAYOUT_COLUMNS_get();
938 internal class ChildProperty
940 internal static readonly int CELL_INDEX = NDalicPINVOKE.TableView_ChildProperty_CELL_INDEX_get();
941 internal static readonly int ROW_SPAN = NDalicPINVOKE.TableView_ChildProperty_ROW_SPAN_get();
942 internal static readonly int COLUMN_SPAN = NDalicPINVOKE.TableView_ChildProperty_COLUMN_SPAN_get();
943 internal static readonly int CELL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
944 internal static readonly int CELL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();