/*
* Copyright(c) 2021 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(nameof(Rows), typeof(int), typeof(TableView), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.ROWS, new Tizen.NUI.PropertyValue((int)newValue));
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var tableView = (TableView)bindable;
int temp = 0;
Tizen.NUI.Object.GetProperty((HandleRef)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(nameof(Columns), typeof(int), typeof(TableView), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.COLUMNS, new Tizen.NUI.PropertyValue((int)newValue));
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var tableView = (TableView)bindable;
int temp = 0;
Tizen.NUI.Object.GetProperty((HandleRef)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(nameof(CellPadding), typeof(Vector2), typeof(TableView), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.CellPadding, new Tizen.NUI.PropertyValue((Vector2)newValue));
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var tableView = (TableView)bindable;
Vector2 temp = new Vector2(0.0f, 0.0f);
Tizen.NUI.Object.GetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.CellPadding).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(nameof(LayoutRows), typeof(PropertyMap), typeof(TableView), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.LayoutRows, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var tableView = (TableView)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.LayoutRows).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(nameof(LayoutColumns), typeof(PropertyMap), typeof(TableView), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var tableView = (TableView)bindable;
if (newValue != null)
{
Tizen.NUI.Object.SetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.LayoutColumns, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var tableView = (TableView)bindable;
PropertyMap temp = new PropertyMap();
Tizen.NUI.Object.GetProperty((HandleRef)tableView.SwigCPtr, TableView.Property.LayoutColumns).Get(temp);
return temp;
}));
///
/// Creates the default TableView view.
///
public TableView() : this(Interop.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.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.NewTableView(TableView.getCPtr(handle)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
///
/// 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.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.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.DeleteBaseHandle(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.RemoveChildAt(SwigCPtr, TableView.CellPosition.getCPtr(position));
View ret = this.GetInstanceSafely(cPtr);
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.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.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.DeleteRow(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.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.DeleteColumn(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.Resize(SwigCPtr, rows, columns);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// Sets the horizontal and the vertical padding between cells.
///
/// Width and height.
/// 3
[Obsolete("Deprecated in API9, will be removed in API11. Please use CellPadding property instead!")]
public void SetCellPadding(Size2D padding)
{
Interop.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
[Obsolete("Deprecated in API9, will be removed in API11. Please use CellPadding property instead!")]
public Vector2 GetCellPadding()
{
Vector2 ret = new Vector2(Interop.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.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.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.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.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.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.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.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.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.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.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.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.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.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;
}
/// This will not be public opened.
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.TableView.DeleteTableView(swigCPtr);
}
///
/// Class to specify the layout position for the child view.
///
/// 3
public class CellPosition : Disposable
{
///
/// 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.NewTableViewCellPosition(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.NewTableViewCellPosition(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.NewTableViewCellPosition(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.NewTableViewCellPosition(rowIndex), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
///
/// The default constructor.
///
/// 3
public CellPosition() : this(Interop.TableView.NewTableViewCellPosition(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
///
/// 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.CellPositionRowIndexSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.CellPositionRowIndexGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The index or position of a row.
///
/// 5
public uint RowIndex
{
get
{
uint ret = Interop.TableView.CellPositionRowIndexGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", 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.CellPositionColumnIndexSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.CellPositionColumnIndexGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The index or position of a column.
///
/// 5
public uint ColumnIndex
{
get
{
uint ret = Interop.TableView.CellPositionColumnIndexGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", 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.CellPositionRowSpanSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.CellPositionRowSpanGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The span of a row.
///
/// 5
public uint RowSpan
{
get
{
uint ret = Interop.TableView.CellPositionRowSpanGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", 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.CellPositionColumnSpanSet(SwigCPtr, value);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
get
{
uint ret = Interop.TableView.CellPositionColumnSpanGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
///
/// The span of a column.
///
/// 5
public uint ColumnSpan
{
get
{
uint ret = Interop.TableView.CellPositionColumnSpanGet(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
return ret;
}
}
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;
}
/// This will not be public opened.
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
{
Interop.TableView.DeleteTableViewCellPosition(swigCPtr);
}
}
internal new class Property
{
internal static readonly int ROWS = Interop.TableView.RowsGet();
internal static readonly int COLUMNS = Interop.TableView.ColumnsGet();
internal static readonly int CellPadding = Interop.TableView.CellPaddingGet();
internal static readonly int LayoutRows = Interop.TableView.LayoutRowsGet();
internal static readonly int LayoutColumns = Interop.TableView.LayoutColumnsGet();
}
internal class ChildProperty
{
internal static readonly int CellIndex = Interop.TableView.ChildPropertyCellIndexGet();
internal static readonly int RowSpan = Interop.TableView.ChildPropertyRowSpanGet();
internal static readonly int ColumnSpan = Interop.TableView.ChildPropertyColumnSpanGet();
internal static readonly int CellHorizontalAlignment = Interop.TableView.ChildPropertyCellHorizontalAlignmentGet();
internal static readonly int CellVerticalAlignment = Interop.TableView.ChildPropertyCellVerticalAlignmentGet();
}
}
}