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