Note that some Text propeties in devel api can't be changed
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / public / TableView.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
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
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
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.
14 *
15 */
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
18 // <auto-generated />
19 //
20 // This file was automatically generated by SWIG (http://www.swig.org).
21 // Version 3.0.10
22 //
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
26
27 namespace Dali {
28
29 public class TableView : View {
30   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
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);
34   }
35
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;
38   }
39
40   ~TableView() {
41     DisposeQueue.Instance.Add(this);
42   }
43
44   public override void Dispose() {
45     if (!Window.IsInstalled()) {
46       DisposeQueue.Instance.Add(this);
47       return;
48     }
49
50     lock(this) {
51       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
52         if (swigCMemOwn) {
53           swigCMemOwn = false;
54           NDalicPINVOKE.delete_TableView(swigCPtr);
55         }
56         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57       }
58       global::System.GC.SuppressFinalize(this);
59       base.Dispose();
60     }
61   }
62
63
64   public class Property
65   {
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();
71   }
72
73   public class ChildProperty
74   {
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();
80   
81   }
82
83   public class CellPosition : global::System.IDisposable {
84     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
85     protected bool swigCMemOwn;
86   
87     internal CellPosition(global::System.IntPtr cPtr, bool cMemoryOwn) {
88       swigCMemOwn = cMemoryOwn;
89       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
90     }
91   
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;
94     }
95   
96     ~CellPosition() {
97       Dispose();
98     }
99   
100     public virtual void Dispose() {
101       lock(this) {
102         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
103           if (swigCMemOwn) {
104             swigCMemOwn = false;
105             NDalicPINVOKE.delete_TableView_CellPosition(swigCPtr);
106           }
107           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
108         }
109         global::System.GC.SuppressFinalize(this);
110       }
111     }
112   
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();
115     }
116   
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();
119     }
120   
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();
123     }
124   
125     public CellPosition(uint rowIndex) : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_3(rowIndex), true) {
126       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
127     }
128   
129     public CellPosition() : this(NDalicPINVOKE.new_TableView_CellPosition__SWIG_4(), true) {
130       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131     }
132   
133     public uint rowIndex {
134       set {
135         NDalicPINVOKE.TableView_CellPosition_rowIndex_set(swigCPtr, value);
136         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
137       } 
138       get {
139         uint ret = NDalicPINVOKE.TableView_CellPosition_rowIndex_get(swigCPtr);
140         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
141         return ret;
142       } 
143     }
144   
145     public uint columnIndex {
146       set {
147         NDalicPINVOKE.TableView_CellPosition_columnIndex_set(swigCPtr, value);
148         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149       } 
150       get {
151         uint ret = NDalicPINVOKE.TableView_CellPosition_columnIndex_get(swigCPtr);
152         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153         return ret;
154       } 
155     }
156   
157     public uint rowSpan {
158       set {
159         NDalicPINVOKE.TableView_CellPosition_rowSpan_set(swigCPtr, value);
160         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161       } 
162       get {
163         uint ret = NDalicPINVOKE.TableView_CellPosition_rowSpan_get(swigCPtr);
164         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
165         return ret;
166       } 
167     }
168   
169     public uint columnSpan {
170       set {
171         NDalicPINVOKE.TableView_CellPosition_columnSpan_set(swigCPtr, value);
172         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
173       } 
174       get {
175         uint ret = NDalicPINVOKE.TableView_CellPosition_columnSpan_get(swigCPtr);
176         if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177         return ret;
178       } 
179     }
180   
181   }
182
183   public TableView (uint initialRows, uint initialColumns) : this (NDalicPINVOKE.TableView_New(initialRows, initialColumns), true) {
184       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185
186   }
187   public TableView(TableView handle) : this(NDalicPINVOKE.new_TableView__SWIG_1(TableView.getCPtr(handle)), true) {
188     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189   }
190
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();
194     return ret;
195   }
196
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();
200     return ret;
201   }
202
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();
206     return ret;
207   }
208
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();
212     return ret;
213   }
214
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();
218     return ret;
219   }
220
221   public void InsertRow(uint rowIndex) {
222     NDalicPINVOKE.TableView_InsertRow(swigCPtr, rowIndex);
223     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
224   }
225
226   public void DeleteRow(uint rowIndex) {
227     NDalicPINVOKE.TableView_DeleteRow__SWIG_0(swigCPtr, rowIndex);
228     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
229   }
230
231   public void InsertColumn(uint columnIndex) {
232     NDalicPINVOKE.TableView_InsertColumn(swigCPtr, columnIndex);
233     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
234   }
235
236   public void DeleteColumn(uint columnIndex) {
237     NDalicPINVOKE.TableView_DeleteColumn__SWIG_0(swigCPtr, columnIndex);
238     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239   }
240
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();
244   }
245
246   public void SetCellPadding(Vector2 padding) {
247     NDalicPINVOKE.TableView_SetCellPadding(swigCPtr, Vector2.getCPtr(padding));
248     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
249   }
250
251   public Vector2 GetCellPadding() {
252     Vector2 ret = new Vector2(NDalicPINVOKE.TableView_GetCellPadding(swigCPtr), true);
253     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
254     return ret;
255   }
256
257   public void SetFitHeight(uint rowIndex) {
258     NDalicPINVOKE.TableView_SetFitHeight(swigCPtr, rowIndex);
259     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
260   }
261
262   public bool IsFitHeight(uint rowIndex) {
263     bool ret = NDalicPINVOKE.TableView_IsFitHeight(swigCPtr, rowIndex);
264     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
265     return ret;
266   }
267
268   public void SetFitWidth(uint columnIndex) {
269     NDalicPINVOKE.TableView_SetFitWidth(swigCPtr, columnIndex);
270     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
271   }
272
273   public bool IsFitWidth(uint columnIndex) {
274     bool ret = NDalicPINVOKE.TableView_IsFitWidth(swigCPtr, columnIndex);
275     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
276     return ret;
277   }
278
279   public void SetFixedHeight(uint rowIndex, float height) {
280     NDalicPINVOKE.TableView_SetFixedHeight(swigCPtr, rowIndex, height);
281     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
282   }
283
284   public float GetFixedHeight(uint rowIndex) {
285     float ret = NDalicPINVOKE.TableView_GetFixedHeight(swigCPtr, rowIndex);
286     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
287     return ret;
288   }
289
290   public void SetRelativeHeight(uint rowIndex, float heightPercentage) {
291     NDalicPINVOKE.TableView_SetRelativeHeight(swigCPtr, rowIndex, heightPercentage);
292     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
293   }
294
295   public float GetRelativeHeight(uint rowIndex) {
296     float ret = NDalicPINVOKE.TableView_GetRelativeHeight(swigCPtr, rowIndex);
297     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
298     return ret;
299   }
300
301   public void SetFixedWidth(uint columnIndex, float width) {
302     NDalicPINVOKE.TableView_SetFixedWidth(swigCPtr, columnIndex, width);
303     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
304   }
305
306   public float GetFixedWidth(uint columnIndex) {
307     float ret = NDalicPINVOKE.TableView_GetFixedWidth(swigCPtr, columnIndex);
308     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309     return ret;
310   }
311
312   public void SetRelativeWidth(uint columnIndex, float widthPercentage) {
313     NDalicPINVOKE.TableView_SetRelativeWidth(swigCPtr, columnIndex, widthPercentage);
314     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
315   }
316
317   public float GetRelativeWidth(uint columnIndex) {
318     float ret = NDalicPINVOKE.TableView_GetRelativeWidth(swigCPtr, columnIndex);
319     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
320     return ret;
321   }
322
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();
326   }
327
328   public enum LayoutPolicy {
329     FIXED,
330     RELATIVE,
331     FILL,
332     FIT
333   }
334
335   public int Rows
336   {
337     get
338     {
339       int temp = 0;
340       GetProperty( TableView.Property.ROWS).Get( out temp );
341       return temp;
342     }
343     set
344     {
345       SetProperty( TableView.Property.ROWS, new Dali.Property.Value( value ) );
346     }
347   }
348   public int Columns
349   {
350     get
351     {
352       int temp = 0;
353       GetProperty( TableView.Property.COLUMNS).Get( out temp );
354       return temp;
355     }
356     set
357     {
358       SetProperty( TableView.Property.COLUMNS, new Dali.Property.Value( value ) );
359     }
360   }
361   public Vector2 CellPadding
362   {
363     get
364     {
365       Vector2 temp = new Vector2(0.0f,0.0f);
366       GetProperty( TableView.Property.CELL_PADDING).Get(  temp );
367       return temp;
368     }
369     set
370     {
371       SetProperty( TableView.Property.CELL_PADDING, new Dali.Property.Value( value ) );
372     }
373   }
374   public Dali.Property.Map LayoutRows
375   {
376     get
377     {
378       Dali.Property.Map temp = new Dali.Property.Map();
379       GetProperty( TableView.Property.LAYOUT_ROWS).Get(  temp );
380       return temp;
381     }
382     set
383     {
384       SetProperty( TableView.Property.LAYOUT_ROWS, new Dali.Property.Value( value ) );
385     }
386   }
387   public Dali.Property.Map LayoutColumns
388   {
389     get
390     {
391       Dali.Property.Map temp = new Dali.Property.Map();
392       GetProperty( TableView.Property.LAYOUT_COLUMNS).Get(  temp );
393       return temp;
394     }
395     set
396     {
397       SetProperty( TableView.Property.LAYOUT_COLUMNS, new Dali.Property.Value( value ) );
398     }
399   }
400
401 }
402
403 }