Merge "DALi C# Tizen GBS build: - currently GBS full auto building is impossible...
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / automatic / csharp / ScrollBar.cs
1 /** Copyright (c) 2016 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.9
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 using System;
30 using System.Runtime.InteropServices;
31
32
33 public class ScrollBar : View {
34   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
35
36   internal ScrollBar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollBar_SWIGUpcast(cPtr), cMemoryOwn) {
37     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
38   }
39
40   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollBar obj) {
41     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42   }
43
44   ~ScrollBar() {
45     Dispose();
46   }
47
48   public override void Dispose() {
49     lock(this) {
50       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
51         if (swigCMemOwn) {
52           swigCMemOwn = false;
53           NDalicPINVOKE.delete_ScrollBar(swigCPtr);
54         }
55         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
56       }
57       global::System.GC.SuppressFinalize(this);
58       base.Dispose();
59     }
60   }
61
62
63
64 public class PanFinishedEventArgs : EventArgs
65 {
66 }
67
68 public class ScrollPositionIntervalReachedEventArgs : EventArgs
69 {
70    private float _currentScrollPosition;
71
72    public float CurrentScrollPosition
73    {
74       get
75       {
76          return _currentScrollPosition;
77       }
78       set
79       {
80          _currentScrollPosition = value;
81       }
82    }
83 }
84
85   [UnmanagedFunctionPointer(CallingConvention.StdCall)]
86   private delegate void PanFinishedEventCallbackDelegate();
87   private DaliEventHandler<object,PanFinishedEventArgs> _scrollBarPanFinishedEventHandler;
88   private PanFinishedEventCallbackDelegate _scrollBarPanFinishedEventCallbackDelegate;
89   
90   [UnmanagedFunctionPointer(CallingConvention.StdCall)]
91   private delegate void ScrollPositionIntervalReachedEventCallbackDelegate();
92   private DaliEventHandler<object,ScrollPositionIntervalReachedEventArgs> _scrollBarScrollPositionIntervalReachedEventHandler;
93   private ScrollPositionIntervalReachedEventCallbackDelegate _scrollBarScrollPositionIntervalReachedEventCallbackDelegate;
94
95   public event DaliEventHandler<object,PanFinishedEventArgs> PanFinished
96   {
97      add
98      {
99         lock(this)
100         {
101            // Restricted to only one listener
102            if (_scrollBarPanFinishedEventHandler == null)
103            {
104               _scrollBarPanFinishedEventHandler += value;
105
106               _scrollBarPanFinishedEventCallbackDelegate = new PanFinishedEventCallbackDelegate(OnScrollBarPanFinished);
107               this.PanFinishedSignal().Connect(_scrollBarPanFinishedEventCallbackDelegate);
108            }
109         }
110      }
111
112      remove
113      {
114         lock(this)
115         {
116            if (_scrollBarPanFinishedEventHandler != null)
117            {
118               this.PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate);
119            }
120
121            _scrollBarPanFinishedEventHandler -= value;
122         }
123      }
124   }
125
126   // Callback for ScrollBar PanFinishedSignal
127   private void OnScrollBarPanFinished()
128   {
129      PanFinishedEventArgs e = new PanFinishedEventArgs();
130
131      if (_scrollBarPanFinishedEventHandler != null)
132      {
133         //here we send all data to user event handlers
134         _scrollBarPanFinishedEventHandler(this, e);
135      }
136   }
137
138
139   public event DaliEventHandler<object,ScrollPositionIntervalReachedEventArgs> ScrollPositionIntervalReached
140   {
141      add
142      {
143         lock(this)
144         {
145            // Restricted to only one listener
146            if (_scrollBarScrollPositionIntervalReachedEventHandler == null)
147            {
148               _scrollBarScrollPositionIntervalReachedEventHandler += value;
149
150               _scrollBarScrollPositionIntervalReachedEventCallbackDelegate = new ScrollPositionIntervalReachedEventCallbackDelegate(OnScrollBarScrollPositionIntervalReached);
151               this.ScrollPositionIntervalReachedSignal().Connect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
152            }
153         }
154      }
155
156      remove
157      {
158         lock(this)
159         {
160            if (_scrollBarScrollPositionIntervalReachedEventHandler != null)
161            {
162               this.ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
163            }
164
165            _scrollBarScrollPositionIntervalReachedEventHandler -= value;
166         }
167      }
168   }
169
170   // Callback for ScrollBar ScrollPositionIntervalReachedSignal
171   private void OnScrollBarScrollPositionIntervalReached()
172   {
173      ScrollPositionIntervalReachedEventArgs e = new ScrollPositionIntervalReachedEventArgs();
174
175      if (_scrollBarScrollPositionIntervalReachedEventHandler != null)
176      {
177         //here we send all data to user event handlers
178         _scrollBarScrollPositionIntervalReachedEventHandler(this, e);
179      }
180   }
181
182
183   public class Property : global::System.IDisposable {
184     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
185     protected bool swigCMemOwn;
186   
187     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
188       swigCMemOwn = cMemoryOwn;
189       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
190     }
191   
192     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
193       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
194     }
195   
196     ~Property() {
197       Dispose();
198     }
199   
200     public virtual void Dispose() {
201       lock(this) {
202         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
203           if (swigCMemOwn) {
204             swigCMemOwn = false;
205             NDalicPINVOKE.delete_ScrollBar_Property(swigCPtr);
206           }
207           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
208         }
209         global::System.GC.SuppressFinalize(this);
210       }
211     }
212   
213     public Property() : this(NDalicPINVOKE.new_ScrollBar_Property(), true) {
214       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
215     }
216   
217     public static readonly int SCROLL_DIRECTION = NDalicPINVOKE.ScrollBar_Property_SCROLL_DIRECTION_get();
218     public static readonly int INDICATOR_HEIGHT_POLICY = NDalicPINVOKE.ScrollBar_Property_INDICATOR_HEIGHT_POLICY_get();
219     public static readonly int INDICATOR_FIXED_HEIGHT = NDalicPINVOKE.ScrollBar_Property_INDICATOR_FIXED_HEIGHT_get();
220     public static readonly int INDICATOR_SHOW_DURATION = NDalicPINVOKE.ScrollBar_Property_INDICATOR_SHOW_DURATION_get();
221     public static readonly int INDICATOR_HIDE_DURATION = NDalicPINVOKE.ScrollBar_Property_INDICATOR_HIDE_DURATION_get();
222     public static readonly int SCROLL_POSITION_INTERVALS = NDalicPINVOKE.ScrollBar_Property_SCROLL_POSITION_INTERVALS_get();
223     public static readonly int INDICATOR_MINIMUM_HEIGHT = NDalicPINVOKE.ScrollBar_Property_INDICATOR_MINIMUM_HEIGHT_get();
224     public static readonly int INDICATOR_START_PADDING = NDalicPINVOKE.ScrollBar_Property_INDICATOR_START_PADDING_get();
225     public static readonly int INDICATOR_END_PADDING = NDalicPINVOKE.ScrollBar_Property_INDICATOR_END_PADDING_get();
226   
227   }
228
229   public ScrollBar (ScrollBar.Direction direction) : this (NDalicPINVOKE.ScrollBar_New__SWIG_0((int)direction), true) {
230       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
231
232   }
233   public ScrollBar () : this (NDalicPINVOKE.ScrollBar_New__SWIG_1(), true) {
234       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
235
236   }
237   public ScrollBar(ScrollBar scrollBar) : this(NDalicPINVOKE.new_ScrollBar__SWIG_1(ScrollBar.getCPtr(scrollBar)), true) {
238     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
239   }
240
241   public ScrollBar Assign(ScrollBar scrollBar) {
242     ScrollBar ret = new ScrollBar(NDalicPINVOKE.ScrollBar_Assign(swigCPtr, ScrollBar.getCPtr(scrollBar)), false);
243     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
244     return ret;
245   }
246
247   public new static ScrollBar DownCast(BaseHandle handle) {
248     ScrollBar ret = new ScrollBar(NDalicPINVOKE.ScrollBar_DownCast(BaseHandle.getCPtr(handle)), true);
249     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
250     return ret;
251   }
252
253   public void SetScrollPropertySource(Handle handle, int propertyScrollPosition, int propertyMinScrollPosition, int propertyMaxScrollPosition, int propertyScrollContentSize) {
254     NDalicPINVOKE.ScrollBar_SetScrollPropertySource(swigCPtr, Handle.getCPtr(handle), propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
255     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
256   }
257
258   public void SetScrollIndicator(Actor indicator) {
259     NDalicPINVOKE.ScrollBar_SetScrollIndicator(swigCPtr, Actor.getCPtr(indicator));
260     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261   }
262
263   public Actor GetScrollIndicator() {
264     Actor ret = new Actor(NDalicPINVOKE.ScrollBar_GetScrollIndicator(swigCPtr), true);
265     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266     return ret;
267   }
268
269   public void SetScrollPositionIntervals(VectorFloat positions) {
270     NDalicPINVOKE.ScrollBar_SetScrollPositionIntervals(swigCPtr, VectorFloat.getCPtr(positions));
271     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
272   }
273
274   public VectorFloat GetScrollPositionIntervals() {
275     VectorFloat ret = new VectorFloat(NDalicPINVOKE.ScrollBar_GetScrollPositionIntervals(swigCPtr), true);
276     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
277     return ret;
278   }
279
280   public void SetScrollDirection(ScrollBar.Direction direction) {
281     NDalicPINVOKE.ScrollBar_SetScrollDirection(swigCPtr, (int)direction);
282     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283   }
284
285   public ScrollBar.Direction GetScrollDirection() {
286     ScrollBar.Direction ret = (ScrollBar.Direction)NDalicPINVOKE.ScrollBar_GetScrollDirection(swigCPtr);
287     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
288     return ret;
289   }
290
291   public void SetIndicatorHeightPolicy(ScrollBar.IndicatorHeightPolicyType policy) {
292     NDalicPINVOKE.ScrollBar_SetIndicatorHeightPolicy(swigCPtr, (int)policy);
293     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
294   }
295
296   public ScrollBar.IndicatorHeightPolicyType GetIndicatorHeightPolicy() {
297     ScrollBar.IndicatorHeightPolicyType ret = (ScrollBar.IndicatorHeightPolicyType)NDalicPINVOKE.ScrollBar_GetIndicatorHeightPolicy(swigCPtr);
298     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
299     return ret;
300   }
301
302   public void SetIndicatorFixedHeight(float height) {
303     NDalicPINVOKE.ScrollBar_SetIndicatorFixedHeight(swigCPtr, height);
304     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305   }
306
307   public float GetIndicatorFixedHeight() {
308     float ret = NDalicPINVOKE.ScrollBar_GetIndicatorFixedHeight(swigCPtr);
309     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
310     return ret;
311   }
312
313   public void SetIndicatorShowDuration(float durationSeconds) {
314     NDalicPINVOKE.ScrollBar_SetIndicatorShowDuration(swigCPtr, durationSeconds);
315     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
316   }
317
318   public float GetIndicatorShowDuration() {
319     float ret = NDalicPINVOKE.ScrollBar_GetIndicatorShowDuration(swigCPtr);
320     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321     return ret;
322   }
323
324   public void SetIndicatorHideDuration(float durationSeconds) {
325     NDalicPINVOKE.ScrollBar_SetIndicatorHideDuration(swigCPtr, durationSeconds);
326     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327   }
328
329   public float GetIndicatorHideDuration() {
330     float ret = NDalicPINVOKE.ScrollBar_GetIndicatorHideDuration(swigCPtr);
331     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332     return ret;
333   }
334
335   public void ShowIndicator() {
336     NDalicPINVOKE.ScrollBar_ShowIndicator(swigCPtr);
337     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
338   }
339
340   public void HideIndicator() {
341     NDalicPINVOKE.ScrollBar_HideIndicator(swigCPtr);
342     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343   }
344
345   public VoidSignal PanFinishedSignal() {
346     VoidSignal ret = new VoidSignal(NDalicPINVOKE.ScrollBar_PanFinishedSignal(swigCPtr), false);
347     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348     return ret;
349   }
350
351   public FloatSignal ScrollPositionIntervalReachedSignal() {
352     FloatSignal ret = new FloatSignal(NDalicPINVOKE.ScrollBar_ScrollPositionIntervalReachedSignal(swigCPtr), false);
353     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
354     return ret;
355   }
356
357   public enum PropertyRange {
358     PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
359     PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000
360   }
361
362   public enum Direction {
363     Vertical = 0,
364     Horizontal
365   }
366
367   public enum IndicatorHeightPolicyType {
368     Variable = 0,
369     Fixed
370   }
371
372   public string ScrollDirection 
373   { 
374     get 
375     {
376       string temp;
377       GetProperty( ScrollBar.Property.SCROLL_DIRECTION).Get( out temp );
378       return temp;
379     }
380     set 
381     { 
382       SetProperty( ScrollBar.Property.SCROLL_DIRECTION, new Dali.Property.Value( value ) );
383     }
384   }
385   public string IndicatorHeightPolicy 
386   { 
387     get 
388     {
389       string temp;
390       GetProperty( ScrollBar.Property.INDICATOR_HEIGHT_POLICY).Get( out temp );
391       return temp;
392     }
393     set 
394     { 
395       SetProperty( ScrollBar.Property.INDICATOR_HEIGHT_POLICY, new Dali.Property.Value( value ) );
396     }
397   }
398   public float IndicatorFixedHeight 
399   { 
400     get 
401     {
402       float temp = 0.0f;
403       GetProperty( ScrollBar.Property.INDICATOR_FIXED_HEIGHT).Get( ref temp );
404       return temp;
405     }
406     set 
407     { 
408       SetProperty( ScrollBar.Property.INDICATOR_FIXED_HEIGHT, new Dali.Property.Value( value ) );
409     }
410   }
411   public float IndicatorShowDuration 
412   { 
413     get 
414     {
415       float temp = 0.0f;
416       GetProperty( ScrollBar.Property.INDICATOR_SHOW_DURATION).Get( ref temp );
417       return temp;
418     }
419     set 
420     { 
421       SetProperty( ScrollBar.Property.INDICATOR_SHOW_DURATION, new Dali.Property.Value( value ) );
422     }
423   }
424   public float IndicatorHideDuration 
425   { 
426     get 
427     {
428       float temp = 0.0f;
429       GetProperty( ScrollBar.Property.INDICATOR_HIDE_DURATION).Get( ref temp );
430       return temp;
431     }
432     set 
433     { 
434       SetProperty( ScrollBar.Property.INDICATOR_HIDE_DURATION, new Dali.Property.Value( value ) );
435     }
436   }
437   public Dali.Property.Array ScrollPositionIntervals 
438   { 
439     get 
440     {
441       Dali.Property.Array temp = new Dali.Property.Array();
442       GetProperty( ScrollBar.Property.SCROLL_POSITION_INTERVALS).Get(  temp );
443       return temp;
444     }
445     set 
446     { 
447       SetProperty( ScrollBar.Property.SCROLL_POSITION_INTERVALS, new Dali.Property.Value( value ) );
448     }
449   }
450   public float IndicatorMinimumHeight 
451   { 
452     get 
453     {
454       float temp = 0.0f;
455       GetProperty( ScrollBar.Property.INDICATOR_MINIMUM_HEIGHT).Get( ref temp );
456       return temp;
457     }
458     set 
459     { 
460       SetProperty( ScrollBar.Property.INDICATOR_MINIMUM_HEIGHT, new Dali.Property.Value( value ) );
461     }
462   }
463   public float IndicatorStartPadding 
464   { 
465     get 
466     {
467       float temp = 0.0f;
468       GetProperty( ScrollBar.Property.INDICATOR_START_PADDING).Get( ref temp );
469       return temp;
470     }
471     set 
472     { 
473       SetProperty( ScrollBar.Property.INDICATOR_START_PADDING, new Dali.Property.Value( value ) );
474     }
475   }
476   public float IndicatorEndPadding 
477   { 
478     get 
479     {
480       float temp = 0.0f;
481       GetProperty( ScrollBar.Property.INDICATOR_END_PADDING).Get( ref temp );
482       return temp;
483     }
484     set 
485     { 
486       SetProperty( ScrollBar.Property.INDICATOR_END_PADDING, new Dali.Property.Value( value ) );
487     }
488   }
489
490 }
491
492 }