Revert "[Tizen] Revert "Ensuring that Registry.Unregister is called from the most...
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / ScrollView.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
17 namespace Tizen.NUI
18 {
19
20     using System;
21     using System.Runtime.InteropServices;
22     using Tizen.NUI.BaseComponents;
23
24     public class ScrollView : Scrollable
25     {
26         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27
28         internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollView_SWIGUpcast(cPtr), cMemoryOwn)
29         {
30             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
31         }
32
33         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollView obj)
34         {
35             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
36         }
37
38         protected override void Dispose(DisposeTypes type)
39         {
40             if (disposed)
41             {
42                 return;
43             }
44
45             if (type == DisposeTypes.Explicit)
46             {
47                 //Called by User
48                 //Release your own managed resources here.
49                 //You should release all of your own disposable objects here.
50
51             }
52
53             //Release your own unmanaged resources here.
54             //You should not access any managed member here except static instance.
55             //because the execution order of Finalizes is non-deterministic.
56
57             if (swigCPtr.Handle != global::System.IntPtr.Zero)
58             {
59                 if (swigCMemOwn)
60                 {
61                     swigCMemOwn = false;
62
63                     //Unreference this instance from Registry.
64                     Registry.Unregister(this);
65
66                     NDalicPINVOKE.delete_ScrollView(swigCPtr);
67                 }
68                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69             }
70
71             base.Dispose(type);
72         }
73
74         /**
75           * @brief Event arguments that passed via SnapStarted signal
76           *
77           */
78         public class SnapStartedEventArgs : EventArgs
79         {
80             private Tizen.NUI.ScrollView.SnapEvent _snapEvent;
81
82             /**
83               * @brief SnapEvent - is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick).
84               *
85               */
86             public Tizen.NUI.ScrollView.SnapEvent SnapEventInfo
87             {
88                 get
89                 {
90                     return _snapEvent;
91                 }
92                 set
93                 {
94                     _snapEvent = value;
95                 }
96             }
97         }
98
99         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
100         private delegate void SnapStartedCallbackDelegate(IntPtr data);
101         private DaliEventHandler<object, SnapStartedEventArgs> _scrollViewSnapStartedEventHandler;
102         private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate;
103
104         /**
105           * @brief Event for SnapStarted signal which can be used to subscribe/unsubscribe the event handler
106           * (in the type of SnapStartedEventHandler-DaliEventHandler<object,SnapStartedEventArgs>) provided by the user.
107           * SnapStarted signal is emitted hen the ScrollView has started to snap or flick (it tells the target
108           * position, scale, rotation for the snap or flick).
109           *
110           */
111         public event DaliEventHandler<object, SnapStartedEventArgs> SnapStarted
112         {
113             add
114             {
115                 lock (this)
116                 {
117                     // Restricted to only one listener
118                     if (_scrollViewSnapStartedEventHandler == null)
119                     {
120                         _scrollViewSnapStartedEventHandler += value;
121
122                         _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted);
123                         this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate);
124                     }
125                 }
126             }
127
128             remove
129             {
130                 lock (this)
131                 {
132                     if (_scrollViewSnapStartedEventHandler != null)
133                     {
134                         this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate);
135                     }
136
137                     _scrollViewSnapStartedEventHandler -= value;
138                 }
139             }
140         }
141
142         // Callback for ScrollView SnapStarted signal
143         private void OnSnapStarted(IntPtr data)
144         {
145             SnapStartedEventArgs e = new SnapStartedEventArgs();
146
147             // Populate all members of "e" (SnapStartedEventArgs) with real data
148             e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr(data);
149
150             if (_scrollViewSnapStartedEventHandler != null)
151             {
152                 //here we send all data to user event handlers
153                 _scrollViewSnapStartedEventHandler(this, e);
154             }
155         }
156
157         public class SnapEvent : global::System.IDisposable
158         {
159             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
160             protected bool swigCMemOwn;
161
162             internal SnapEvent(global::System.IntPtr cPtr, bool cMemoryOwn)
163             {
164                 swigCMemOwn = cMemoryOwn;
165                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
166             }
167
168             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SnapEvent obj)
169             {
170                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
171             }
172
173             //A Flag to check who called Dispose(). (By User or DisposeQueue)
174             private bool isDisposeQueued = false;
175             //A Flat to check if it is already disposed.
176             protected bool disposed = false;
177
178
179             ~SnapEvent()
180             {
181                 if (!isDisposeQueued)
182                 {
183                     isDisposeQueued = true;
184                     DisposeQueue.Instance.Add(this);
185                 }
186             }
187
188             public void Dispose()
189             {
190                 //Throw excpetion if Dispose() is called in separate thread.
191                 if (!Window.IsInstalled())
192                 {
193                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
194                 }
195
196                 if (isDisposeQueued)
197                 {
198                     Dispose(DisposeTypes.Implicit);
199                 }
200                 else
201                 {
202                     Dispose(DisposeTypes.Explicit);
203                     System.GC.SuppressFinalize(this);
204                 }
205             }
206
207             protected virtual void Dispose(DisposeTypes type)
208             {
209                 if (disposed)
210                 {
211                     return;
212                 }
213
214                 if (type == DisposeTypes.Explicit)
215                 {
216                     //Called by User
217                     //Release your own managed resources here.
218                     //You should release all of your own disposable objects here.
219
220                 }
221
222                 //Release your own unmanaged resources here.
223                 //You should not access any managed member here except static instance.
224                 //because the execution order of Finalizes is non-deterministic.
225
226                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
227                 {
228                     if (swigCMemOwn)
229                     {
230                         swigCMemOwn = false;
231                         NDalicPINVOKE.delete_ScrollView_SnapEvent(swigCPtr);
232                     }
233                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
234                 }
235
236                 disposed = true;
237             }
238
239             public static SnapEvent GetSnapEventFromPtr(global::System.IntPtr cPtr)
240             {
241                 SnapEvent ret = new SnapEvent(cPtr, false);
242                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
243                 return ret;
244             }
245
246             internal SnapType type
247             {
248                 set
249                 {
250                     NDalicPINVOKE.ScrollView_SnapEvent_type_set(swigCPtr, (int)value);
251                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
252                 }
253                 get
254                 {
255                     SnapType ret = (SnapType)NDalicPINVOKE.ScrollView_SnapEvent_type_get(swigCPtr);
256                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257                     return ret;
258                 }
259             }
260
261             public Vector2 position
262             {
263                 set
264                 {
265                     NDalicPINVOKE.ScrollView_SnapEvent_position_set(swigCPtr, Vector2.getCPtr(value));
266                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
267                 }
268                 get
269                 {
270                     global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_SnapEvent_position_get(swigCPtr);
271                     Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
272                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273                     return ret;
274                 }
275             }
276
277             public float duration
278             {
279                 set
280                 {
281                     NDalicPINVOKE.ScrollView_SnapEvent_duration_set(swigCPtr, value);
282                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283                 }
284                 get
285                 {
286                     float ret = NDalicPINVOKE.ScrollView_SnapEvent_duration_get(swigCPtr);
287                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
288                     return ret;
289                 }
290             }
291
292             public SnapEvent() : this(NDalicPINVOKE.new_ScrollView_SnapEvent(), true)
293             {
294                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295             }
296
297         }
298
299         public class Property
300         {
301             public static readonly int WRAP_ENABLED = NDalicPINVOKE.ScrollView_Property_WRAP_ENABLED_get();
302             public static readonly int PANNING_ENABLED = NDalicPINVOKE.ScrollView_Property_PANNING_ENABLED_get();
303             public static readonly int AXIS_AUTO_LOCK_ENABLED = NDalicPINVOKE.ScrollView_Property_AXIS_AUTO_LOCK_ENABLED_get();
304             public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get();
305             public static readonly int SCROLL_MODE = NDalicPINVOKE.ScrollView_Property_SCROLL_MODE_get();
306             public static readonly int SCROLL_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_get();
307             public static readonly int SCROLL_PRE_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_get();
308             public static readonly int SCROLL_PRE_POSITION_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_X_get();
309             public static readonly int SCROLL_PRE_POSITION_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_Y_get();
310             public static readonly int SCROLL_PRE_POSITION_MAX = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_get();
311             public static readonly int SCROLL_PRE_POSITION_MAX_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_X_get();
312             public static readonly int SCROLL_PRE_POSITION_MAX_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_Y_get();
313             public static readonly int OVERSHOOT_X = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_X_get();
314             public static readonly int OVERSHOOT_Y = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_Y_get();
315             public static readonly int SCROLL_FINAL = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_get();
316             public static readonly int SCROLL_FINAL_X = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_X_get();
317             public static readonly int SCROLL_FINAL_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_Y_get();
318             public static readonly int WRAP = NDalicPINVOKE.ScrollView_Property_WRAP_get();
319             public static readonly int PANNING = NDalicPINVOKE.ScrollView_Property_PANNING_get();
320             public static readonly int SCROLLING = NDalicPINVOKE.ScrollView_Property_SCROLLING_get();
321             public static readonly int SCROLL_DOMAIN_SIZE = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_get();
322             public static readonly int SCROLL_DOMAIN_SIZE_X = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_X_get();
323             public static readonly int SCROLL_DOMAIN_SIZE_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_Y_get();
324             public static readonly int SCROLL_DOMAIN_OFFSET = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_OFFSET_get();
325             public static readonly int SCROLL_POSITION_DELTA = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_DELTA_get();
326             public static readonly int START_PAGE_POSITION = NDalicPINVOKE.ScrollView_Property_START_PAGE_POSITION_get();
327
328         }
329
330         public ScrollView() : this(NDalicPINVOKE.ScrollView_New(), true)
331         {
332             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
333
334         }
335
336         public AlphaFunction GetScrollSnapAlphaFunction()
337         {
338             AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true);
339             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340             return ret;
341         }
342
343         public void SetScrollSnapAlphaFunction(AlphaFunction alpha)
344         {
345             NDalicPINVOKE.ScrollView_SetScrollSnapAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
346             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
347         }
348
349         public AlphaFunction GetScrollFlickAlphaFunction()
350         {
351             AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollFlickAlphaFunction(swigCPtr), true);
352             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
353             return ret;
354         }
355
356         public void SetScrollFlickAlphaFunction(AlphaFunction alpha)
357         {
358             NDalicPINVOKE.ScrollView_SetScrollFlickAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
359             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
360         }
361
362         public float GetScrollSnapDuration()
363         {
364             float ret = NDalicPINVOKE.ScrollView_GetScrollSnapDuration(swigCPtr);
365             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
366             return ret;
367         }
368
369         public void SetScrollSnapDuration(float time)
370         {
371             NDalicPINVOKE.ScrollView_SetScrollSnapDuration(swigCPtr, time);
372             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
373         }
374
375         public float GetScrollFlickDuration()
376         {
377             float ret = NDalicPINVOKE.ScrollView_GetScrollFlickDuration(swigCPtr);
378             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
379             return ret;
380         }
381
382         public void SetScrollFlickDuration(float time)
383         {
384             NDalicPINVOKE.ScrollView_SetScrollFlickDuration(swigCPtr, time);
385             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
386         }
387
388
389         public void SetScrollSensitive(bool sensitive)
390         {
391             NDalicPINVOKE.ScrollView_SetScrollSensitive(swigCPtr, sensitive);
392             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
393         }
394
395         public void SetMaxOvershoot(float overshootX, float overshootY)
396         {
397             NDalicPINVOKE.ScrollView_SetMaxOvershoot(swigCPtr, overshootX, overshootY);
398             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399         }
400
401         public void SetSnapOvershootAlphaFunction(AlphaFunction alpha)
402         {
403             NDalicPINVOKE.ScrollView_SetSnapOvershootAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
404             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
405         }
406
407         public void SetSnapOvershootDuration(float duration)
408         {
409             NDalicPINVOKE.ScrollView_SetSnapOvershootDuration(swigCPtr, duration);
410             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
411         }
412
413         public void SetViewAutoSnap(bool enable)
414         {
415             NDalicPINVOKE.ScrollView_SetActorAutoSnap(swigCPtr, enable);
416             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
417         }
418
419         public void SetWrapMode(bool enable)
420         {
421             NDalicPINVOKE.ScrollView_SetWrapMode(swigCPtr, enable);
422             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
423         }
424
425         public int GetScrollUpdateDistance()
426         {
427             int ret = NDalicPINVOKE.ScrollView_GetScrollUpdateDistance(swigCPtr);
428             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
429             return ret;
430         }
431
432         public void SetScrollUpdateDistance(int distance)
433         {
434             NDalicPINVOKE.ScrollView_SetScrollUpdateDistance(swigCPtr, distance);
435             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
436         }
437
438         public bool GetAxisAutoLock()
439         {
440             bool ret = NDalicPINVOKE.ScrollView_GetAxisAutoLock(swigCPtr);
441             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
442             return ret;
443         }
444
445         public void SetAxisAutoLock(bool enable)
446         {
447             NDalicPINVOKE.ScrollView_SetAxisAutoLock(swigCPtr, enable);
448             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
449         }
450
451         public float GetAxisAutoLockGradient()
452         {
453             float ret = NDalicPINVOKE.ScrollView_GetAxisAutoLockGradient(swigCPtr);
454             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
455             return ret;
456         }
457
458         public void SetAxisAutoLockGradient(float gradient)
459         {
460             NDalicPINVOKE.ScrollView_SetAxisAutoLockGradient(swigCPtr, gradient);
461             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
462         }
463
464         public float GetFrictionCoefficient()
465         {
466             float ret = NDalicPINVOKE.ScrollView_GetFrictionCoefficient(swigCPtr);
467             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
468             return ret;
469         }
470
471         public void SetFrictionCoefficient(float friction)
472         {
473             NDalicPINVOKE.ScrollView_SetFrictionCoefficient(swigCPtr, friction);
474             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
475         }
476
477         public float GetFlickSpeedCoefficient()
478         {
479             float ret = NDalicPINVOKE.ScrollView_GetFlickSpeedCoefficient(swigCPtr);
480             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
481             return ret;
482         }
483
484         public void SetFlickSpeedCoefficient(float speed)
485         {
486             NDalicPINVOKE.ScrollView_SetFlickSpeedCoefficient(swigCPtr, speed);
487             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
488         }
489
490         public Vector2 GetMinimumDistanceForFlick()
491         {
492             Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetMinimumDistanceForFlick(swigCPtr), true);
493             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
494             return ret;
495         }
496
497         public void SetMinimumDistanceForFlick(Vector2 distance)
498         {
499             NDalicPINVOKE.ScrollView_SetMinimumDistanceForFlick(swigCPtr, Vector2.getCPtr(distance));
500             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
501         }
502
503         public float GetMinimumSpeedForFlick()
504         {
505             float ret = NDalicPINVOKE.ScrollView_GetMinimumSpeedForFlick(swigCPtr);
506             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507             return ret;
508         }
509
510         public void SetMinimumSpeedForFlick(float speed)
511         {
512             NDalicPINVOKE.ScrollView_SetMinimumSpeedForFlick(swigCPtr, speed);
513             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
514         }
515
516         public float GetMaxFlickSpeed()
517         {
518             float ret = NDalicPINVOKE.ScrollView_GetMaxFlickSpeed(swigCPtr);
519             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
520             return ret;
521         }
522
523         public void SetMaxFlickSpeed(float speed)
524         {
525             NDalicPINVOKE.ScrollView_SetMaxFlickSpeed(swigCPtr, speed);
526             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
527         }
528
529         public Vector2 GetWheelScrollDistanceStep()
530         {
531             Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetWheelScrollDistanceStep(swigCPtr), true);
532             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
533             return ret;
534         }
535
536         public void SetWheelScrollDistanceStep(Vector2 step)
537         {
538             NDalicPINVOKE.ScrollView_SetWheelScrollDistanceStep(swigCPtr, Vector2.getCPtr(step));
539             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
540         }
541
542         public Vector2 GetCurrentScrollPosition()
543         {
544             Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetCurrentScrollPosition(swigCPtr), true);
545             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
546             return ret;
547         }
548
549         public uint GetCurrentPage()
550         {
551             uint ret = NDalicPINVOKE.ScrollView_GetCurrentPage(swigCPtr);
552             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
553             return ret;
554         }
555
556         public void ScrollTo(Vector2 position)
557         {
558             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_0(swigCPtr, Vector2.getCPtr(position));
559             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
560         }
561
562         public void ScrollTo(Vector2 position, float duration)
563         {
564             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_1(swigCPtr, Vector2.getCPtr(position), duration);
565             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
566         }
567
568         public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha)
569         {
570             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_2(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha));
571             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
572         }
573
574         public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias)
575         {
576             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_3(swigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias);
577             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
578         }
579
580         public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias)
581         {
582             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_4(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha), (int)horizontalBias, (int)verticalBias);
583             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
584         }
585
586         public void ScrollTo(uint page)
587         {
588             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_5(swigCPtr, page);
589             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
590         }
591
592         public void ScrollTo(uint page, float duration)
593         {
594             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_6(swigCPtr, page, duration);
595             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
596         }
597
598         public void ScrollTo(uint page, float duration, DirectionBias bias)
599         {
600             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_7(swigCPtr, page, duration, (int)bias);
601             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
602         }
603
604         public void ScrollTo(View view)
605         {
606             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_8(swigCPtr, View.getCPtr(view));
607             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
608         }
609
610         public void ScrollTo(View view, float duration)
611         {
612             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_9(swigCPtr, View.getCPtr(view), duration);
613             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
614         }
615
616         public bool ScrollToSnapPoint()
617         {
618             bool ret = NDalicPINVOKE.ScrollView_ScrollToSnapPoint(swigCPtr);
619             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
620             return ret;
621         }
622
623         internal void ApplyConstraintToChildren(SWIGTYPE_p_Dali__Constraint constraint)
624         {
625             NDalicPINVOKE.ScrollView_ApplyConstraintToChildren(swigCPtr, SWIGTYPE_p_Dali__Constraint.getCPtr(constraint));
626             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
627         }
628
629         public void ApplyEffect(ScrollViewEffect effect)
630         {
631             NDalicPINVOKE.ScrollView_ApplyEffect(swigCPtr, ScrollViewEffect.getCPtr(effect));
632             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
633         }
634
635         public void RemoveEffect(ScrollViewEffect effect)
636         {
637             NDalicPINVOKE.ScrollView_RemoveEffect(swigCPtr, ScrollViewEffect.getCPtr(effect));
638             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
639         }
640
641         public void RemoveAllEffects()
642         {
643             NDalicPINVOKE.ScrollView_RemoveAllEffects(swigCPtr);
644             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
645         }
646
647         public void BindView(View child)
648         {
649             NDalicPINVOKE.ScrollView_BindActor(swigCPtr, View.getCPtr(child));
650             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
651         }
652
653         public void UnbindView(View child)
654         {
655             NDalicPINVOKE.ScrollView_UnbindActor(swigCPtr, View.getCPtr(child));
656             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
657         }
658
659         public void SetScrollingDirection(Radian direction, Radian threshold)
660         {
661             NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold));
662             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
663         }
664
665         public void SetScrollingDirection(Radian direction)
666         {
667             NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction));
668             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
669         }
670
671         public void RemoveScrollingDirection(Radian direction)
672         {
673             NDalicPINVOKE.ScrollView_RemoveScrollingDirection(swigCPtr, Radian.getCPtr(direction));
674             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
675         }
676
677         internal ScrollViewSnapStartedSignal SnapStartedSignal()
678         {
679             ScrollViewSnapStartedSignal ret = new ScrollViewSnapStartedSignal(NDalicPINVOKE.ScrollView_SnapStartedSignal(swigCPtr), false);
680             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
681             return ret;
682         }
683
684         public bool WrapEnabled
685         {
686             get
687             {
688                 bool temp = false;
689                 GetProperty(ScrollView.Property.WRAP_ENABLED).Get(out temp);
690                 return temp;
691             }
692             set
693             {
694                 SetProperty(ScrollView.Property.WRAP_ENABLED, new Tizen.NUI.PropertyValue(value));
695             }
696         }
697         public bool PanningEnabled
698         {
699             get
700             {
701                 bool temp = false;
702                 GetProperty(ScrollView.Property.PANNING_ENABLED).Get(out temp);
703                 return temp;
704             }
705             set
706             {
707                 SetProperty(ScrollView.Property.PANNING_ENABLED, new Tizen.NUI.PropertyValue(value));
708             }
709         }
710         public bool AxisAutoLockEnabled
711         {
712             get
713             {
714                 bool temp = false;
715                 GetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED).Get(out temp);
716                 return temp;
717             }
718             set
719             {
720                 SetProperty(ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, new Tizen.NUI.PropertyValue(value));
721             }
722         }
723         public Vector2 WheelScrollDistanceStep
724         {
725             get
726             {
727                 Vector2 temp = new Vector2(0.0f, 0.0f);
728                 GetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get(temp);
729                 return temp;
730             }
731             set
732             {
733                 SetProperty(ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue(value));
734             }
735         }
736         public Vector2 ScrollPosition
737         {
738             get
739             {
740                 Vector2 temp = new Vector2(0.0f, 0.0f);
741                 GetProperty(ScrollView.Property.SCROLL_POSITION).Get(temp);
742                 return temp;
743             }
744             set
745             {
746                 SetProperty(ScrollView.Property.SCROLL_POSITION, new Tizen.NUI.PropertyValue(value));
747             }
748         }
749         public Vector2 ScrollPrePosition
750         {
751             get
752             {
753                 Vector2 temp = new Vector2(0.0f, 0.0f);
754                 GetProperty(ScrollView.Property.SCROLL_PRE_POSITION).Get(temp);
755                 return temp;
756             }
757             set
758             {
759                 SetProperty(ScrollView.Property.SCROLL_PRE_POSITION, new Tizen.NUI.PropertyValue(value));
760             }
761         }
762         public Vector2 ScrollPrePositionMax
763         {
764             get
765             {
766                 Vector2 temp = new Vector2(0.0f, 0.0f);
767                 GetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX).Get(temp);
768                 return temp;
769             }
770             set
771             {
772                 SetProperty(ScrollView.Property.SCROLL_PRE_POSITION_MAX, new Tizen.NUI.PropertyValue(value));
773             }
774         }
775         public float OvershootX
776         {
777             get
778             {
779                 float temp = 0.0f;
780                 GetProperty(ScrollView.Property.OVERSHOOT_X).Get(out temp);
781                 return temp;
782             }
783             set
784             {
785                 SetProperty(ScrollView.Property.OVERSHOOT_X, new Tizen.NUI.PropertyValue(value));
786             }
787         }
788         public float OvershootY
789         {
790             get
791             {
792                 float temp = 0.0f;
793                 GetProperty(ScrollView.Property.OVERSHOOT_Y).Get(out temp);
794                 return temp;
795             }
796             set
797             {
798                 SetProperty(ScrollView.Property.OVERSHOOT_Y, new Tizen.NUI.PropertyValue(value));
799             }
800         }
801         public Vector2 ScrollFinal
802         {
803             get
804             {
805                 Vector2 temp = new Vector2(0.0f, 0.0f);
806                 GetProperty(ScrollView.Property.SCROLL_FINAL).Get(temp);
807                 return temp;
808             }
809             set
810             {
811                 SetProperty(ScrollView.Property.SCROLL_FINAL, new Tizen.NUI.PropertyValue(value));
812             }
813         }
814         public bool Wrap
815         {
816             get
817             {
818                 bool temp = false;
819                 GetProperty(ScrollView.Property.WRAP).Get(out temp);
820                 return temp;
821             }
822             set
823             {
824                 SetProperty(ScrollView.Property.WRAP, new Tizen.NUI.PropertyValue(value));
825             }
826         }
827         public bool Panning
828         {
829             get
830             {
831                 bool temp = false;
832                 GetProperty(ScrollView.Property.PANNING).Get(out temp);
833                 return temp;
834             }
835             set
836             {
837                 SetProperty(ScrollView.Property.PANNING, new Tizen.NUI.PropertyValue(value));
838             }
839         }
840         public bool Scrolling
841         {
842             get
843             {
844                 bool temp = false;
845                 GetProperty(ScrollView.Property.SCROLLING).Get(out temp);
846                 return temp;
847             }
848             set
849             {
850                 SetProperty(ScrollView.Property.SCROLLING, new Tizen.NUI.PropertyValue(value));
851             }
852         }
853         public Vector2 ScrollDomainSize
854         {
855             get
856             {
857                 Vector2 temp = new Vector2(0.0f, 0.0f);
858                 GetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE).Get(temp);
859                 return temp;
860             }
861             set
862             {
863                 SetProperty(ScrollView.Property.SCROLL_DOMAIN_SIZE, new Tizen.NUI.PropertyValue(value));
864             }
865         }
866         public Vector2 ScrollDomainOffset
867         {
868             get
869             {
870                 Vector2 temp = new Vector2(0.0f, 0.0f);
871                 GetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET).Get(temp);
872                 return temp;
873             }
874             set
875             {
876                 SetProperty(ScrollView.Property.SCROLL_DOMAIN_OFFSET, new Tizen.NUI.PropertyValue(value));
877             }
878         }
879         public Vector2 ScrollPositionDelta
880         {
881             get
882             {
883                 Vector2 temp = new Vector2(0.0f, 0.0f);
884                 GetProperty(ScrollView.Property.SCROLL_POSITION_DELTA).Get(temp);
885                 return temp;
886             }
887             set
888             {
889                 SetProperty(ScrollView.Property.SCROLL_POSITION_DELTA, new Tizen.NUI.PropertyValue(value));
890             }
891         }
892         public Vector3 StartPagePosition
893         {
894             get
895             {
896                 Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
897                 GetProperty(ScrollView.Property.START_PAGE_POSITION).Get(temp);
898                 return temp;
899             }
900             set
901             {
902                 SetProperty(ScrollView.Property.START_PAGE_POSITION, new Tizen.NUI.PropertyValue(value));
903             }
904         }
905
906         public PropertyMap ScrollMode
907         {
908             get
909             {
910                 PropertyValue value = GetProperty( ScrollView.Property.SCROLL_MODE );
911                 PropertyMap map = new PropertyMap();
912                 value.Get( map );
913                 return map;
914             }
915             set
916             {
917                 SetProperty( ScrollView.Property.SCROLL_MODE, new PropertyValue( value ) );
918             }
919         }
920
921     }
922
923 }