/*
* Copyright(c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Tizen.NUI.Binding;
namespace Tizen.NUI.BaseComponents
{
///
/// TableView is a layout container for aligning child actors in a grid like layout.
/// TableView constraints the X and the Y position and the width and the height of the child actors.
/// The Z position and depth are left intact so that the 3D model actors can also be laid out
/// in a grid without loosing their depth scaling.
///
/// 3
public class TableView : View
{
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty RowsProperty = BindableProperty.Create("Rows", typeof(int), typeof(TableView), default(int), propertyChanged: (bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.ROWS, new Tizen.NUI.PropertyValue((int)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var tableView = (TableView)bindable;
int temp = 0;
Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.ROWS).Get(out temp);
return temp;
});
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty ColumnsProperty = BindableProperty.Create("Columns", typeof(int), typeof(TableView), default(int), propertyChanged: (bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.COLUMNS, new Tizen.NUI.PropertyValue((int)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var tableView = (TableView)bindable;
int temp = 0;
Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.COLUMNS).Get(out temp);
return temp;
});
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty CellPaddingProperty = BindableProperty.Create("CellPadding", typeof(Vector2), typeof(TableView), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.CELL_PADDING, new Tizen.NUI.PropertyValue((Vector2)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var tableView = (TableView)bindable;
Vector2 temp = new Vector2(0.0f, 0.0f);
Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.CELL_PADDING).Get(temp);
return temp;
});
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty LayoutRowsProperty = BindableProperty.Create("LayoutRows", typeof(PropertyMap), typeof(TableView), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_ROWS, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var tableView = (TableView)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_ROWS).Get(temp);
return temp;
});
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty LayoutColumnsProperty = BindableProperty.Create("LayoutColumns", typeof(PropertyMap), typeof(TableView), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_COLUMNS, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var tableView = (TableView)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty(tableView.swigCPtr, TableView.Property.LAYOUT_COLUMNS).Get(temp);
return temp;
});
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
///
/// Creates the default TableView view.
///
public TableView() : this(Interop.TableView.TableView_New(1, 1), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Creates the TableView view.
///
/// Initial rows for the table.
/// Initial columns for the table.
/// 3
public TableView(uint initialRows, uint initialColumns) : this(Interop.TableView.TableView_New(initialRows, initialColumns), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The Copy constructor. Creates another handle that points to the same real object.
///
/// Handle to copy from.
/// 3
public TableView(TableView handle) : this(Interop.TableView.new_TableView__SWIG_1(TableView.getCPtr(handle)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TableView.TableView_SWIGUpcast(cPtr), cMemoryOwn)
{
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
///
/// Enumeration for describing how the size of a row or column has been set.
///
/// 3
public enum LayoutPolicy
{
///
/// Fixed with the given value.
///
/// 3
Fixed,
///
/// Calculated as percentage of the remainder after subtracting Padding and Fixed height/width.
///
/// 3
Relative,
///
/// Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns.
///
/// 3
Fill,
///
/// Fit around its children.
///
/// 3
Fit
}
///
/// The amount of rows in the table.
///
/// 3
public int Rows
{
get
{
return (int)GetValue(RowsProperty);
}
set
{
SetValue(RowsProperty, value);
NotifyPropertyChanged();
}
}
///
/// The amount of columns in the table.
///
/// 3
public int Columns
{
get
{
return (int)GetValue(ColumnsProperty);
}
set
{
SetValue(ColumnsProperty, value);
NotifyPropertyChanged();
}
}
///
/// Padding between cells.
///
/// 3
public Vector2 CellPadding
{
get
{
return (Vector2)GetValue(CellPaddingProperty);
}
set
{
SetValue(CellPaddingProperty, value);
NotifyPropertyChanged();
}
}
///
/// The number of layout rows.
///
/// 3
public PropertyMap LayoutRows
{
get
{
return (PropertyMap)GetValue(LayoutRowsProperty);
}
set
{
SetValue(LayoutRowsProperty, value);
NotifyPropertyChanged();
}
}
///
/// The number of layout columns.
///
/// 3
public PropertyMap LayoutColumns
{
get
{
return (PropertyMap)GetValue(LayoutColumnsProperty);
}
set
{
SetValue(LayoutColumnsProperty, value);
NotifyPropertyChanged();
}
}
///
/// Adds a child to the table.
/// If the row or column index is outside the table, the table gets resized bigger.
///
/// The child to add.
/// The position for the child.
/// True if the addition succeeded, and false if the cell is already occupied.
/// 3
public bool AddChild(View child, TableView.CellPosition position)
{
bool ret = Interop.TableView.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
Children.Add(child);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Returns a child from the given layout position.
///
/// The position in the table.
/// Child that was in the cell or an uninitialized handle.
/// 3
public View GetChildAt(TableView.CellPosition position)
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.TableView.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
Interop.BaseHandle.delete_BaseHandle(CPtr);
CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Removes a child from the given layout position.
///
/// The position for the child to remove.
/// Child that was removed or an uninitialized handle.
/// 3
public View RemoveChildAt(TableView.CellPosition position)
{
//to fix memory leak issue, match the handle count with native side.
IntPtr cPtr = Interop.TableView.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
Interop.BaseHandle.delete_BaseHandle(CPtr);
CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Children.Remove(ret);
return ret;
}
///
/// Finds the child's layout position.
///
/// The child to search for.
/// The position for the child.
/// True if the child was included in this TableView.
/// 3
public bool FindChildPosition(View child, TableView.CellPosition position)
{
bool ret = Interop.TableView.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Inserts a new row to the given index.
///
/// The rowIndex of the new row.
/// 3
public void InsertRow(uint rowIndex)
{
Interop.TableView.TableView_InsertRow(swigCPtr, rowIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Deletes a row from the given index.
/// Removed elements are deleted.
///
/// The rowIndex of the row to delete.
/// 3
public void DeleteRow(uint rowIndex)
{
Interop.TableView.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Inserts a new column to the given index.
///
/// The columnIndex of the new column.
/// 3
public void InsertColumn(uint columnIndex)
{
Interop.TableView.TableView_InsertColumn(swigCPtr, columnIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Deletes a column from the given index.
/// Removed elements are deleted.
///
/// The columnIndex of the column to delete.
/// 3
public void DeleteColumn(uint columnIndex)
{
Interop.TableView.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Resizes the TableView.
///
/// The rows for the table.
/// The columns for the table.
/// 3
public void Resize(uint rows, uint columns)
{
Interop.TableView.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Sets the horizontal and the vertical padding between cells.
///
/// Width and height.
/// 3
public void SetCellPadding(Size2D padding)
{
Interop.TableView.TableView_SetCellPadding(swigCPtr, Size2D.getCPtr(padding));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Gets the current padding as width and height.
///
/// The current padding as width and height.
/// 3
public Vector2 GetCellPadding()
{
Vector2 ret = new Vector2(Interop.TableView.TableView_GetCellPadding(swigCPtr), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Specifies this row as fitting its height to its children.
///
/// The row to set.
/// 3
public void SetFitHeight(uint rowIndex)
{
Interop.TableView.TableView_SetFitHeight(swigCPtr, rowIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Checks if the row is a fit row.
///
/// The row to check.
/// True if the row is fit.
/// 3
public bool IsFitHeight(uint rowIndex)
{
bool ret = Interop.TableView.TableView_IsFitHeight(swigCPtr, rowIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Specifies this column as fitting its width to its children.
///
/// The column to set.
/// 3
public void SetFitWidth(uint columnIndex)
{
Interop.TableView.TableView_SetFitWidth(swigCPtr, columnIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Checks if the column is a fit column.
///
/// The column to check.
/// True if the column is fit.
/// 3
public bool IsFitWidth(uint columnIndex)
{
bool ret = Interop.TableView.TableView_IsFitWidth(swigCPtr, columnIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Sets a row to have a fixed height.
/// Setting a fixed height of 0 has no effect.
///
/// The rowIndex for row with a fixed height.
/// The height in world coordinate units.
/// 3
public void SetFixedHeight(uint rowIndex, float height)
{
Interop.TableView.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Gets a row's fixed height.
///
/// The row index with a fixed height.
/// height The height in world coordinate units.
/// 3
public float GetFixedHeight(uint rowIndex)
{
float ret = Interop.TableView.TableView_GetFixedHeight(swigCPtr, rowIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Sets a row to have a relative height. Relative height means percentage of
/// the remainder of the table height after subtracting padding and fixed height rows.
/// Setting a relative height of 0 has no effect.
///
/// The rowIndex for row with a relative height.
/// The height percentage between 0.0f and 1.0f.
/// 3
public void SetRelativeHeight(uint rowIndex, float heightPercentage)
{
Interop.TableView.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Gets a row's relative height.
///
/// The row index with a relative height.
/// Height in percentage units, between 0.0f and 1.0f.
/// 3
public float GetRelativeHeight(uint rowIndex)
{
float ret = Interop.TableView.TableView_GetRelativeHeight(swigCPtr, rowIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Sets a column to have a fixed width.
/// Setting a fixed width of 0 has no effect.
///
/// The columnIndex for column with a fixed width.
/// The width in world coordinate units.
/// 3
public void SetFixedWidth(uint columnIndex, float width)
{
Interop.TableView.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Gets a column's fixed width.
///
/// The column index with a fixed width.
/// Width in world coordinate units.
/// 3
public float GetFixedWidth(uint columnIndex)
{
float ret = Interop.TableView.TableView_GetFixedWidth(swigCPtr, columnIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Sets a column to have a relative width. Relative width means percentage of
/// the remainder of the table width after subtracting padding and fixed width columns.
/// Setting a relative width of 0 has no effect.
///
/// The columnIndex for column with a fixed width.
/// The widthPercentage between 0.0f and 1.0f.
/// 3
public void SetRelativeWidth(uint columnIndex, float widthPercentage)
{
Interop.TableView.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Gets a column's relative width.
///
/// The column index with a relative width.
/// Width in percentage units, between 0.0f and 1.0f.
/// 3
public float GetRelativeWidth(uint columnIndex)
{
float ret = Interop.TableView.TableView_GetRelativeWidth(swigCPtr, columnIndex);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
///
/// Sets the alignment on a cell.
/// Cells without calling this function have the default values of left and top respectively.
///
/// The cell to set alignment on.
/// The horizontal alignment.
/// The vertical alignment.
/// 3
public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical)
{
Interop.TableView.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TableView obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
///
/// Dispose
///
/// The dispose type
/// 3
protected override void Dispose(DisposeTypes type)
{
if (disposed)
{
return;
}
if (type == DisposeTypes.Explicit)
{
//Called by User
//Release your own managed resources here.
//You should release all of your own disposable objects here.
}
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
if (swigCPtr.Handle != global::System.IntPtr.Zero)
{
if (swigCMemOwn)
{
swigCMemOwn = false;
Interop.TableView.delete_TableView(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
base.Dispose(type);
}
///
/// Class to specify the layout position for the child view.
///
/// 3
public class CellPosition : global::System.IDisposable
{
///
/// swigCMemOwn
///
/// 3
protected bool swigCMemOwn;
///
/// A Flat to check if it is already disposed.
///
/// 3
protected bool disposed = false;
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
//A Flag to check who called Dispose(). (By User or DisposeQueue)
private bool isDisposeQueued = false;
///
/// The constructor.
///
/// The row index initialized.
/// The column index initialized.
/// The row span initialized.
/// The column span initialized.
/// 3
public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(Interop.TableView.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The constructor to initialize values to defaults for convenience.
///
/// The row index initialized.
/// The column index initialized.
/// The row span initialized.
/// 3
public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(Interop.TableView.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The constructor to initialize values to defaults for convenience.
///
/// The row index initialized.
/// The column index initialized.
/// 3
public CellPosition(uint rowIndex, uint columnIndex) : this(Interop.TableView.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The constructor to initialize values to default for convenience.
///
/// The row index initialized.
/// 3
public CellPosition(uint rowIndex) : this(Interop.TableView.new_TableView_CellPosition__SWIG_3(rowIndex), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The default constructor.
///
/// 3
public CellPosition() : this(Interop.TableView.new_TableView_CellPosition__SWIG_4(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn)
{
swigCMemOwn = cMemoryOwn;
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
}
///
/// Dispose.
///
/// 3
~CellPosition()
{
if (!isDisposeQueued)
{
isDisposeQueued = true;
DisposeQueue.Instance.Add(this);
}
}
///
/// The index of a row.
///
/// 3
[Obsolete("Please do not use! This will be deprecated! Please use RowIndex instead!")]
[EditorBrowsable(EditorBrowsableState.Never)]
public uint rowIndex
{
set
{
Interop.TableView.TableView_CellPosition_rowIndex_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.TableView_CellPosition_rowIndex_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// The index or position of a row.
///
/// 5
public uint RowIndex
{
get
{
uint ret = Interop.TableView.TableView_CellPosition_rowIndex_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// The index of a column.
///
/// 3
[Obsolete("Please do not use! This will be deprecated! Please use ColumnIndex instead!")]
[EditorBrowsable(EditorBrowsableState.Never)]
public uint columnIndex
{
set
{
Interop.TableView.TableView_CellPosition_columnIndex_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.TableView_CellPosition_columnIndex_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// The index or position of a column.
///
/// 5
public uint ColumnIndex
{
get
{
uint ret = Interop.TableView.TableView_CellPosition_columnIndex_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// The span of a row.
///
/// 3
[Obsolete("Please do not use! This will be deprecated! Please use RowSpan instead!")]
[EditorBrowsable(EditorBrowsableState.Never)]
public uint rowSpan
{
set
{
Interop.TableView.TableView_CellPosition_rowSpan_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.TableView_CellPosition_rowSpan_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// The span of a row.
///
/// 5
public uint RowSpan
{
get
{
uint ret = Interop.TableView.TableView_CellPosition_rowSpan_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// The span of a column.
///
/// 3
[Obsolete("Please do not use! This will be deprecated! Please use ColumnSpan instead!")]
[EditorBrowsable(EditorBrowsableState.Never)]
public uint columnSpan
{
set
{
Interop.TableView.TableView_CellPosition_columnSpan_set(swigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.TableView_CellPosition_columnSpan_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// The span of a column.
///
/// 5
public uint ColumnSpan
{
get
{
uint ret = Interop.TableView.TableView_CellPosition_columnSpan_get(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
///
/// Dispose.
///
/// 3
public void Dispose()
{
//Throw excpetion if Dispose() is called in separate thread.
if (!Window.IsInstalled())
{
throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
}
if (isDisposeQueued)
{
Dispose(DisposeTypes.Implicit);
}
else
{
Dispose(DisposeTypes.Explicit);
System.GC.SuppressFinalize(this);
}
}
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
///
/// Dispose.
///
/// DisposeTypes
/// 3
protected virtual void Dispose(DisposeTypes type)
{
if (disposed)
{
return;
}
if (type == DisposeTypes.Explicit)
{
//Called by User
//Release your own managed resources here.
//You should release all of your own disposable objects here.
}
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
if (swigCPtr.Handle != global::System.IntPtr.Zero)
{
if (swigCMemOwn)
{
swigCMemOwn = false;
Interop.TableView.delete_TableView_CellPosition(swigCPtr);
}
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
disposed = true;
}
}
internal new class Property
{
internal static readonly int ROWS = Interop.TableView.TableView_Property_ROWS_get();
internal static readonly int COLUMNS = Interop.TableView.TableView_Property_COLUMNS_get();
internal static readonly int CELL_PADDING = Interop.TableView.TableView_Property_CELL_PADDING_get();
internal static readonly int LAYOUT_ROWS = Interop.TableView.TableView_Property_LAYOUT_ROWS_get();
internal static readonly int LAYOUT_COLUMNS = Interop.TableView.TableView_Property_LAYOUT_COLUMNS_get();
}
internal class ChildProperty
{
internal static readonly int CELL_INDEX = Interop.TableView.TableView_ChildProperty_CELL_INDEX_get();
internal static readonly int ROW_SPAN = Interop.TableView.TableView_ChildProperty_ROW_SPAN_get();
internal static readonly int COLUMN_SPAN = Interop.TableView.TableView_ChildProperty_COLUMN_SPAN_get();
internal static readonly int CELL_HORIZONTAL_ALIGNMENT = Interop.TableView.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
internal static readonly int CELL_VERTICAL_ALIGNMENT = Interop.TableView.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();
}
}
}