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