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 (!Stage.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);
64 public class Property : global::System.IDisposable {
65 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
66 protected bool swigCMemOwn;
68 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
69 swigCMemOwn = cMemoryOwn;
70 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
73 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
74 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
81 public virtual void Dispose() {
83 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
86 NDalicPINVOKE.delete_TableView_Property(swigCPtr);
88 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
90 global::System.GC.SuppressFinalize(this);
94 public Property() : this(NDalicPINVOKE.new_TableView_Property(), true) {
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
98 public static readonly int ROWS = NDalicPINVOKE.TableView_Property_ROWS_get();
99 public static readonly int COLUMNS = NDalicPINVOKE.TableView_Property_COLUMNS_get();
100 public static readonly int CELL_PADDING = NDalicPINVOKE.TableView_Property_CELL_PADDING_get();
101 public static readonly int LAYOUT_ROWS = NDalicPINVOKE.TableView_Property_LAYOUT_ROWS_get();
102 public static readonly int LAYOUT_COLUMNS = NDalicPINVOKE.TableView_Property_LAYOUT_COLUMNS_get();
106 public class ChildProperty : global::System.IDisposable {
107 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
108 protected bool swigCMemOwn;
110 internal ChildProperty(global::System.IntPtr cPtr, bool cMemoryOwn) {
111 swigCMemOwn = cMemoryOwn;
112 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
115 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ChildProperty obj) {
116 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
123 public virtual void Dispose() {
125 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
128 NDalicPINVOKE.delete_TableView_ChildProperty(swigCPtr);
130 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
132 global::System.GC.SuppressFinalize(this);
136 public ChildProperty() : this(NDalicPINVOKE.new_TableView_ChildProperty(), true) {
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 public static readonly int CELL_INDEX = NDalicPINVOKE.TableView_ChildProperty_CELL_INDEX_get();
141 public static readonly int ROW_SPAN = NDalicPINVOKE.TableView_ChildProperty_ROW_SPAN_get();
142 public static readonly int COLUMN_SPAN = NDalicPINVOKE.TableView_ChildProperty_COLUMN_SPAN_get();
143 public static readonly int CELL_HORIZONTAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_HORIZONTAL_ALIGNMENT_get();
144 public static readonly int CELL_VERTICAL_ALIGNMENT = NDalicPINVOKE.TableView_ChildProperty_CELL_VERTICAL_ALIGNMENT_get();
148 public class CellPosition : global::System.IDisposable {
149 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
150 protected bool swigCMemOwn;
152 internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn) {
153 swigCMemOwn = cMemoryOwn;
154 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
157 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CellPosition obj) {
158 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
165 public virtual void Dispose() {
167 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
170 NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
172 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
174 global::System.GC.SuppressFinalize(this);
178 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan, uint columnSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_0(rowIndex, columnIndex, rowSpan, columnSpan), true) {
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 public CellPosition(uint rowIndex, uint columnIndex, uint rowSpan) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_1(rowIndex, columnIndex, rowSpan), true) {
183 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
186 public CellPosition(uint rowIndex, uint columnIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_2(rowIndex, columnIndex), true) {
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true) {
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true) {
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 public uint rowIndex {
200 NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
201 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
204 uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
205 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
210 public uint columnIndex {
212 NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
213 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
216 uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
217 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222 public uint rowSpan {
224 NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
225 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
228 uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
229 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234 public uint columnSpan {
236 NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
237 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
240 uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
241 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
248 public TableView (uint initialRows, uint initialColumns) : this (NDalicPINVOKE.TableView_New(initialRows, initialColumns), true) {
249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252 public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true) {
253 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256 public TableView Assign(TableView handle) {
257 TableView ret = new TableView(NDalicPINVOKE.TableView_Assign(swigCPtr, TableView.getCPtr(handle)), false);
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
262 public new static TableView DownCast(BaseHandle handle) {
263 TableView ret = new TableView(NDalicPINVOKE.TableView_DownCast(BaseHandle.getCPtr(handle)), true);
264 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
268 public bool AddChild(Actor child, TableView.CellPosition position) {
269 bool ret = NDalicPINVOKE.TableView_AddChild(swigCPtr, Actor.getCPtr(child), TableView.CellPosition.getCPtr(position));
270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274 public Actor GetChildAt(TableView.CellPosition position) {
275 Actor ret = new Actor(NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true);
276 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280 public Actor RemoveChildAt(TableView.CellPosition position) {
281 Actor ret = new Actor(NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true);
282 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
286 public bool FindChildPosition(Actor child, TableView.CellPosition position) {
287 bool ret = NDalicPINVOKE.TableView_FindChildPosition(swigCPtr, Actor.getCPtr(child), TableView.CellPosition.getCPtr(position));
288 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292 public void InsertRow(uint rowIndex) {
293 NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 public void DeleteRow(uint rowIndex) {
298 NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
299 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 public void DeleteRow(uint rowIndex, ActorContainer removed) {
303 NDalicPINVOKE.TableView_DeleteRow__SWIG_1(swigCPtr, rowIndex, ActorContainer.getCPtr(removed));
304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307 public void InsertColumn(uint columnIndex) {
308 NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
309 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 public void DeleteColumn(uint columnIndex) {
313 NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 public void DeleteColumn(uint columnIndex, ActorContainer removed) {
318 NDalicPINVOKE.TableView_DeleteColumn__SWIG_1(swigCPtr, columnIndex, ActorContainer.getCPtr(removed));
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
322 public void Resize(uint rows, uint columns) {
323 NDalicPINVOKE.TableView_Resize__SWIG_0(swigCPtr, rows, columns);
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327 public void Resize(uint rows, uint columns, ActorContainer removed) {
328 NDalicPINVOKE.TableView_Resize__SWIG_1(swigCPtr, rows, columns, ActorContainer.getCPtr(removed));
329 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332 public void SetCellPadding(Vector2 padding) {
333 NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Vector2.getCPtr(padding));
334 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337 public Vector2 GetCellPadding() {
338 Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
339 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343 public void SetFitHeight(uint rowIndex) {
344 NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
345 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348 public bool IsFitHeight(uint rowIndex) {
349 bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
350 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354 public void SetFitWidth(uint columnIndex) {
355 NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
356 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
359 public bool IsFitWidth(uint columnIndex) {
360 bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
361 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
365 public void SetFixedHeight(uint rowIndex, float height) {
366 NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
367 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
370 public float GetFixedHeight(uint rowIndex) {
371 float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
372 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
376 public void SetRelativeHeight(uint rowIndex, float heightPercentage) {
377 NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
378 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
381 public float GetRelativeHeight(uint rowIndex) {
382 float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
383 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
387 public void SetFixedWidth(uint columnIndex, float width) {
388 NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
389 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
392 public float GetFixedWidth(uint columnIndex) {
393 float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
394 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
398 public void SetRelativeWidth(uint columnIndex, float widthPercentage) {
399 NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
400 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
403 public float GetRelativeWidth(uint columnIndex) {
404 float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
405 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409 public uint GetRows() {
410 uint ret = NDalicPINVOKE.TableView_GetRows(swigCPtr);
411 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415 public uint GetColumns() {
416 uint ret = NDalicPINVOKE.TableView_GetColumns(swigCPtr);
417 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
421 public void SetCellAlignment(TableView.CellPosition position, HorizontalAlignmentType horizontal, VerticalAlignmentType vertical) {
422 NDalicPINVOKE.TableView_SetCellAlignment(swigCPtr, TableView.CellPosition.getCPtr(position), (int)horizontal, (int)vertical);
423 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
426 public enum PropertyRange {
427 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
428 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000,
429 CHILD_PROPERTY_START_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX,
430 CHILD_PROPERTY_END_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX+1000
433 public enum LayoutPolicy {
445 GetProperty( TableView.Property.ROWS).Get( ref temp );
450 SetProperty( TableView.Property.ROWS, new NUI.Property.Value( value ) );
458 GetProperty( TableView.Property.COLUMNS).Get( ref temp );
463 SetProperty( TableView.Property.COLUMNS, new NUI.Property.Value( value ) );
466 public Vector2 CellPadding
470 Vector2 temp = new Vector2(0.0f,0.0f);
471 GetProperty( TableView.Property.CELL_PADDING).Get( temp );
476 SetProperty( TableView.Property.CELL_PADDING, new NUI.Property.Value( value ) );
479 public NUI.Property.Map LayoutRows
483 NUI.Property.Map temp = new NUI.Property.Map();
484 GetProperty( TableView.Property.LAYOUT_ROWS).Get( temp );
489 SetProperty( TableView.Property.LAYOUT_ROWS, new NUI.Property.Value( value ) );
492 public NUI.Property.Map LayoutColumns
496 NUI.Property.Map temp = new NUI.Property.Map();
497 GetProperty( TableView.Property.LAYOUT_COLUMNS).Get( temp );
502 SetProperty( TableView.Property.LAYOUT_COLUMNS, new NUI.Property.Value( value ) );