1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
29 public class TableView : View {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal TableView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TableView_SWIGUpcast(cPtr), cMemoryOwn) {
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TableView obj) {
37 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 DisposeQueue.Instance.Add(this);
44 public override void Dispose() {
45 if (!Window.IsInstalled()) {
46 DisposeQueue.Instance.Add(this);
51 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
54 NDalicPINVOKE.delete_TableView(swigCPtr);
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58 global::System.GC.SuppressFinalize(this);
66 public static readonly int ROWS = NDalicPINVOKE.TableView_Property_ROWS_get();
67 public static readonly int COLUMNS = NDalicPINVOKE.TableView_Property_COLUMNS_get();
68 public static readonly int CELL_PADDING = NDalicPINVOKE.TableView_Property_CELL_PADDING_get();
69 public static readonly int LAYOUT_ROWS = NDalicPINVOKE.TableView_Property_LAYOUT_ROWS_get();
70 public static readonly int LAYOUT_COLUMNS = NDalicPINVOKE.TableView_Property_LAYOUT_COLUMNS_get();
73 public class ChildProperty
75 public static readonly int CELL_INDEX = NDalicPINVOKE.TableView_ChildProperty_CELL_INDEX_get();
76 public static readonly int ROW_SPAN = NDalicPINVOKE.TableView_ChildProperty_ROW_SPAN_get();
77 public static readonly int COLUMN_SPAN = NDalicPINVOKE.TableView_ChildProperty_COLUMN_SPAN_get();
78 public static readonly int CELL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
79 public static readonly int CELL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();
83 public class CellPosition : global::System.IDisposable {
84 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
85 protected bool swigCMemOwn;
87 internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn) {
88 swigCMemOwn = cMemoryOwn;
89 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
92 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj) {
93 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
100 public virtual void Dispose() {
102 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
105 NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
107 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
109 global::System.GC.SuppressFinalize(this);
113 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true) {
114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true) {
118 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121 public CellPosition(uint rowIndex, uint columnIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true) {
122 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
125 public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true) {
126 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
129 public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true) {
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
133 public uint rowIndex {
135 NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
139 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
140 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 public uint columnIndex {
147 NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
148 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
157 public uint rowSpan {
159 NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
160 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
163 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
164 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
169 public uint columnSpan {
171 NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
172 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
175 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
176 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183 public TableView (uint initialRows, uint initialColumns) : this (NDalicPINVOKE.TableView_New(initialRows, initialColumns), true) {
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187 public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true) {
188 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
191 internal new static TableView DownCast(BaseHandle handle) {
192 TableView ret = new TableView(NDalicPINVOKE.TableView_DownCast(BaseHandle.getCPtr(handle)), true);
193 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 public bool AddChild(View child, TableView.CellPosition position) {
198 bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
199 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
203 public View GetChildAt(TableView.CellPosition position) {
204 View ret = new View(NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209 public View RemoveChildAt(TableView.CellPosition position) {
210 View ret = new View(NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true);
211 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215 public bool FindChildPosition(View child, TableView.CellPosition position) {
216 bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, View.getCPtr(child), TableView.CellPosition.getCPtr(position));
217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 public void InsertRow(uint rowIndex) {
222 NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
223 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
226 public void DeleteRow(uint rowIndex) {
227 NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
228 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231 public void InsertColumn(uint columnIndex) {
232 NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
233 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
236 public void DeleteColumn(uint columnIndex) {
237 NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241 public void Resize(uint rows, uint columns) {
242 NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
243 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
246 public void SetCellPadding(Vector2 padding) {
247 NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Vector2.getCPtr(padding));
248 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
251 public Vector2 GetCellPadding() {
252 Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
253 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257 public void SetFitHeight(uint rowIndex) {
258 NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
259 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262 public bool IsFitHeight(uint rowIndex) {
263 bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
264 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268 public void SetFitWidth(uint columnIndex) {
269 NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273 public bool IsFitWidth(uint columnIndex) {
274 bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
275 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
279 public void SetFixedHeight(uint rowIndex, float height) {
280 NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284 public float GetFixedHeight(uint rowIndex) {
285 float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290 public void SetRelativeHeight(uint rowIndex, float heightPercentage) {
291 NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295 public float GetRelativeHeight(uint rowIndex) {
296 float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
297 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301 public void SetFixedWidth(uint columnIndex, float width) {
302 NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
303 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306 public float GetFixedWidth(uint columnIndex) {
307 float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 public void SetRelativeWidth(uint columnIndex, float widthPercentage) {
313 NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 public float GetRelativeWidth(uint columnIndex) {
318 float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical) {
324 NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
328 public enum LayoutPolicy {
340 GetProperty( TableView.Property.ROWS).Get( out temp );
345 SetProperty( TableView.Property.ROWS, new Dali.Property.Value( value ) );
353 GetProperty( TableView.Property.COLUMNS).Get( out temp );
358 SetProperty( TableView.Property.COLUMNS, new Dali.Property.Value( value ) );
361 public Vector2 CellPadding
365 Vector2 temp = new Vector2(0.0f,0.0f);
366 GetProperty( TableView.Property.CELL_PADDING).Get( temp );
371 SetProperty( TableView.Property.CELL_PADDING, new Dali.Property.Value( value ) );
374 public Dali.Property.Map LayoutRows
378 Dali.Property.Map temp = new Dali.Property.Map();
379 GetProperty( TableView.Property.LAYOUT_ROWS).Get( temp );
384 SetProperty( TableView.Property.LAYOUT_ROWS, new Dali.Property.Value( value ) );
387 public Dali.Property.Map LayoutColumns
391 Dali.Property.Map temp = new Dali.Property.Map();
392 GetProperty( TableView.Property.LAYOUT_COLUMNS).Get( temp );
397 SetProperty( TableView.Property.LAYOUT_COLUMNS, new Dali.Property.Value( value ) );