Make some apis as inhouse, will be internal later (#699)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / UIComponents / ScrollView.cs
1 /*
2  * Copyright(c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 using System;
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.BaseComponents;
21 using Tizen.NUI.Binding;
22
23 namespace Tizen.NUI
24 {
25     /// <summary>
26     /// ScrollView contains views that can be scrolled manually (via touch).
27     /// </summary>
28     /// <since_tizen> 3 </since_tizen>
29     public class ScrollView : Scrollable
30     {
31         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
32         [EditorBrowsable(EditorBrowsableState.Never)]
33         public static readonly BindableProperty WrapEnabledProperty = BindableProperty.Create("WrapEnabled", typeof(bool), typeof(ScrollView), false, propertyChanged: (bindable, oldValue, newValue) =>
34         {
35             var scrollView = (ScrollView)bindable;
36             if (newValue != null)
37             {
38                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP_ENABLED, new Tizen.NUI.PropertyValue((bool)newValue));
39             }
40         },
41         defaultValueCreator: (bindable) =>
42         {
43             var scrollView = (ScrollView)bindable;
44             bool temp = false;
45             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP_ENABLED).Get(out temp);
46             return temp;
47         });
48         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
49         [EditorBrowsable(EditorBrowsableState.Never)]
50         public static readonly BindableProperty PanningEnabledProperty = BindableProperty.Create("PanningEnabled", typeof(bool), typeof(ScrollView), false, propertyChanged: (bindable, oldValue, newValue) =>
51         {
52             var scrollView = (ScrollView)bindable;
53             if (newValue != null)
54             {
55                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING_ENABLED, new Tizen.NUI.PropertyValue((bool)newValue));
56             }
57         },
58         defaultValueCreator: (bindable) =>
59         {
60             var scrollView = (ScrollView)bindable;
61             bool temp = false;
62             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING_ENABLED).Get(out temp);
63             return temp;
64         });
65         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         public static readonly BindableProperty AxisAutoLockEnabledProperty = BindableProperty.Create("AxisAutoLockEnabled", typeof(bool), typeof(ScrollView), false, propertyChanged: (bindable, oldValue, newValue) =>
68         {
69             var scrollView = (ScrollView)bindable;
70             if (newValue != null)
71             {
72                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, new Tizen.NUI.PropertyValue((bool)newValue));
73             }
74         },
75         defaultValueCreator: (bindable) =>
76         {
77             var scrollView = (ScrollView)bindable;
78             bool temp = false;
79             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.AXIS_AUTO_LOCK_ENABLED).Get(out temp);
80             return temp;
81         });
82         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
83         [EditorBrowsable(EditorBrowsableState.Never)]
84         public static readonly BindableProperty WheelScrollDistanceStepProperty = BindableProperty.Create("WheelScrollDistanceStep", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
85         {
86             var scrollView = (ScrollView)bindable;
87             if (newValue != null)
88             {
89                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue((Vector2)newValue));
90             }
91         },
92         defaultValueCreator: (bindable) =>
93         {
94             var scrollView = (ScrollView)bindable;
95             Vector2 temp = new Vector2(0.0f, 0.0f);
96             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP).Get(temp);
97             return temp;
98         });
99         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
100         [EditorBrowsable(EditorBrowsableState.Never)]
101         public static readonly BindableProperty ScrollPositionProperty = BindableProperty.Create("ScrollPosition", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
102         {
103             var scrollView = (ScrollView)bindable;
104             if (newValue != null)
105             {
106                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_POSITION, new Tizen.NUI.PropertyValue((Vector2)newValue));
107             }
108         },
109         defaultValueCreator: (bindable) =>
110         {
111             var scrollView = (ScrollView)bindable;
112             Vector2 temp = new Vector2(0.0f, 0.0f);
113             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_POSITION).Get(temp);
114             return temp;
115         });
116         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
117         [EditorBrowsable(EditorBrowsableState.Never)]
118         public static readonly BindableProperty ScrollPrePositionProperty = BindableProperty.Create("ScrollPrePosition", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
119         {
120             var scrollView = (ScrollView)bindable;
121             if (newValue != null)
122             {
123                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_PRE_POSITION, new Tizen.NUI.PropertyValue((Vector2)newValue));
124             }
125         },
126         defaultValueCreator: (bindable) =>
127         {
128             var scrollView = (ScrollView)bindable;
129             Vector2 temp = new Vector2(0.0f, 0.0f);
130             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_PRE_POSITION).Get(temp);
131             return temp;
132         });
133         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
134         [EditorBrowsable(EditorBrowsableState.Never)]
135         public static readonly BindableProperty ScrollPrePositionMaxProperty = BindableProperty.Create("ScrollPrePositionMax", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
136         {
137             var scrollView = (ScrollView)bindable;
138             if (newValue != null)
139             {
140                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_PRE_POSITION_MAX, new Tizen.NUI.PropertyValue((Vector2)newValue));
141             }
142         },
143         defaultValueCreator: (bindable) =>
144         {
145             var scrollView = (ScrollView)bindable;
146             Vector2 temp = new Vector2(0.0f, 0.0f);
147             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_PRE_POSITION_MAX).Get(temp);
148             return temp;
149         });
150         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
151         [EditorBrowsable(EditorBrowsableState.Never)]
152         public static readonly BindableProperty OvershootXProperty = BindableProperty.Create("OvershootX", typeof(float), typeof(ScrollView), default(float), propertyChanged: (bindable, oldValue, newValue) =>
153         {
154             var scrollView = (ScrollView)bindable;
155             if (newValue != null)
156             {
157                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_X, new Tizen.NUI.PropertyValue((float)newValue));
158             }
159         },
160         defaultValueCreator: (bindable) =>
161         {
162             var scrollView = (ScrollView)bindable;
163             float temp = 0.0f;
164             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_X).Get(out temp);
165             return temp;
166         });
167         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
168         [EditorBrowsable(EditorBrowsableState.Never)]
169         public static readonly BindableProperty OvershootYProperty = BindableProperty.Create("OvershootY", typeof(float), typeof(ScrollView), default(float), propertyChanged: (bindable, oldValue, newValue) =>
170         {
171             var scrollView = (ScrollView)bindable;
172             if (newValue != null)
173             {
174                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_Y, new Tizen.NUI.PropertyValue((float)newValue));
175             }
176         },
177         defaultValueCreator: (bindable) =>
178         {
179             var scrollView = (ScrollView)bindable;
180             float temp = 0.0f;
181             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_Y).Get(out temp);
182             return temp;
183         });
184         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
185         [EditorBrowsable(EditorBrowsableState.Never)]
186         public static readonly BindableProperty ScrollFinalProperty = BindableProperty.Create("ScrollFinal", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
187         {
188             var scrollView = (ScrollView)bindable;
189             if (newValue != null)
190             {
191                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_FINAL, new Tizen.NUI.PropertyValue((Vector2)newValue));
192             }
193         },
194         defaultValueCreator: (bindable) =>
195         {
196             var scrollView = (ScrollView)bindable;
197             Vector2 temp = new Vector2(0.0f, 0.0f);
198             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_FINAL).Get(temp);
199             return temp;
200         });
201         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
202         [EditorBrowsable(EditorBrowsableState.Never)]
203         public static readonly BindableProperty WrapProperty = BindableProperty.Create("Wrap", typeof(bool), typeof(ScrollView), false, propertyChanged: (bindable, oldValue, newValue) =>
204         {
205             var scrollView = (ScrollView)bindable;
206             if (newValue != null)
207             {
208                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP, new Tizen.NUI.PropertyValue((bool)newValue));
209             }
210         },
211         defaultValueCreator: (bindable) =>
212         {
213             var scrollView = (ScrollView)bindable;
214             bool temp = false;
215             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP).Get(out temp);
216             return temp;
217         });
218         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
219         [EditorBrowsable(EditorBrowsableState.Never)]
220         public static readonly BindableProperty PanningProperty = BindableProperty.Create("Panning", typeof(bool), typeof(ScrollView), false, propertyChanged: (bindable, oldValue, newValue) =>
221         {
222             var scrollView = (ScrollView)bindable;
223             if (newValue != null)
224             {
225                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING, new Tizen.NUI.PropertyValue((bool)newValue));
226             }
227         },
228         defaultValueCreator: (bindable) =>
229         {
230             var scrollView = (ScrollView)bindable;
231             bool temp = false;
232             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING).Get(out temp);
233             return temp;
234         });
235         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
236         [EditorBrowsable(EditorBrowsableState.Never)]
237         public static readonly BindableProperty ScrollingProperty = BindableProperty.Create("Scrolling", typeof(bool), typeof(ScrollView), false, propertyChanged: (bindable, oldValue, newValue) =>
238         {
239             var scrollView = (ScrollView)bindable;
240             if (newValue != null)
241             {
242                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLLING, new Tizen.NUI.PropertyValue((bool)newValue));
243             }
244         },
245         defaultValueCreator: (bindable) =>
246         {
247             var scrollView = (ScrollView)bindable;
248             bool temp = false;
249             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLLING).Get(out temp);
250             return temp;
251         });
252         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
253         [EditorBrowsable(EditorBrowsableState.Never)]
254         public static readonly BindableProperty ScrollDomainSizeProperty = BindableProperty.Create("ScrollDomainSize", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
255         {
256             var scrollView = (ScrollView)bindable;
257             if (newValue != null)
258             {
259                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_DOMAIN_SIZE, new Tizen.NUI.PropertyValue((Vector2)newValue));
260             }
261         },
262         defaultValueCreator: (bindable) =>
263         {
264             var scrollView = (ScrollView)bindable;
265             Vector2 temp = new Vector2(0.0f, 0.0f);
266             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_DOMAIN_SIZE).Get(temp);
267             return temp;
268         });
269         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
270         [EditorBrowsable(EditorBrowsableState.Never)]
271         public static readonly BindableProperty ScrollDomainOffsetProperty = BindableProperty.Create("ScrollDomainOffset", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
272         {
273             var scrollView = (ScrollView)bindable;
274             if (newValue != null)
275             {
276                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_DOMAIN_OFFSET, new Tizen.NUI.PropertyValue((Vector2)newValue));
277             }
278         },
279         defaultValueCreator: (bindable) =>
280         {
281             var scrollView = (ScrollView)bindable;
282             Vector2 temp = new Vector2(0.0f, 0.0f);
283             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_DOMAIN_OFFSET).Get(temp);
284             return temp;
285         });
286         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
287         [EditorBrowsable(EditorBrowsableState.Never)]
288         public static readonly BindableProperty ScrollPositionDeltaProperty = BindableProperty.Create("ScrollPositionDelta", typeof(Vector2), typeof(ScrollView), Vector2.Zero, propertyChanged: (bindable, oldValue, newValue) =>
289         {
290             var scrollView = (ScrollView)bindable;
291             if (newValue != null)
292             {
293                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_POSITION_DELTA, new Tizen.NUI.PropertyValue((Vector2)newValue));
294             }
295         },
296         defaultValueCreator: (bindable) =>
297         {
298             var scrollView = (ScrollView)bindable;
299             Vector2 temp = new Vector2(0.0f, 0.0f);
300             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_POSITION_DELTA).Get(temp);
301             return temp;
302         });
303         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
304         [EditorBrowsable(EditorBrowsableState.Never)]
305         public static readonly BindableProperty StartPagePositionProperty = BindableProperty.Create("StartPagePosition", typeof(Vector3), typeof(ScrollView), Vector3.Zero, propertyChanged: (bindable, oldValue, newValue) =>
306         {
307             var scrollView = (ScrollView)bindable;
308             if (newValue != null)
309             {
310                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.START_PAGE_POSITION, new Tizen.NUI.PropertyValue((Vector3)newValue));
311             }
312         },
313         defaultValueCreator: (bindable) =>
314         {
315             var scrollView = (ScrollView)bindable;
316             Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
317             Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.START_PAGE_POSITION).Get(temp);
318             return temp;
319         });
320         /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
321         [EditorBrowsable(EditorBrowsableState.Never)]
322         public static readonly BindableProperty ScrollModeProperty = BindableProperty.Create("ScrollMode", typeof(PropertyMap), typeof(ScrollView), new PropertyMap(), propertyChanged: (bindable, oldValue, newValue) =>
323         {
324             var scrollView = (ScrollView)bindable;
325             if (newValue != null)
326             {
327                 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_MODE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
328             }
329         },
330         defaultValueCreator: (bindable) =>
331         {
332             var scrollView = (ScrollView)bindable;
333             PropertyValue value = Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_MODE);
334             PropertyMap map = new PropertyMap();
335             value.Get(map);
336             return map;
337         });
338
339         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
340
341         private DaliEventHandler<object, SnapStartedEventArgs> _scrollViewSnapStartedEventHandler;
342         private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate;
343
344         /// <summary>
345         /// Create an instance of ScrollView.
346         /// </summary>
347         /// <since_tizen> 3 </since_tizen>
348         public ScrollView() : this(NDalicPINVOKE.ScrollView_New(), true)
349         {
350             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351         }
352
353         internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollView_SWIGUpcast(cPtr), cMemoryOwn)
354         {
355             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
356         }
357
358         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
359         private delegate void SnapStartedCallbackDelegate(IntPtr data);
360
361         /// <summary>
362         /// SnapStarted can be used to subscribe or unsubscribe the event handler
363         /// The SnapStarted signal is emitted when the ScrollView has started to snap or flick (it tells the target
364         ///  position, scale, rotation for the snap or flick).
365         /// </summary>
366         /// <since_tizen> 3 </since_tizen>
367         public event DaliEventHandler<object, SnapStartedEventArgs> SnapStarted
368         {
369             add
370             {
371                 lock (this)
372                 {
373                     // Restricted to only one listener
374                     if (_scrollViewSnapStartedEventHandler == null)
375                     {
376                         _scrollViewSnapStartedEventHandler += value;
377
378                         _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted);
379                         this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate);
380                     }
381                 }
382             }
383
384             remove
385             {
386                 lock (this)
387                 {
388                     if (_scrollViewSnapStartedEventHandler != null)
389                     {
390                         this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate);
391                     }
392
393                     _scrollViewSnapStartedEventHandler -= value;
394                 }
395             }
396         }
397
398         /// <summary>
399         /// Sets and Gets WrapEnabled property.
400         /// </summary>
401         /// <since_tizen> 3 </since_tizen>
402         public bool WrapEnabled
403         {
404             get
405             {
406                 return (bool)GetValue(WrapEnabledProperty);
407             }
408             set
409             {
410                 SetValue(WrapEnabledProperty, value);
411             }
412         }
413
414         /// <summary>
415         /// Sets and Gets PanningEnabled property.
416         /// </summary>
417         /// <since_tizen> 3 </since_tizen>
418         public bool PanningEnabled
419         {
420             get
421             {
422                 return (bool)GetValue(PanningEnabledProperty);
423             }
424             set
425             {
426                 SetValue(PanningEnabledProperty, value);
427             }
428         }
429
430         /// <summary>
431         /// Sets and Gets AxisAutoLockEnabled property.
432         /// </summary>
433         /// <since_tizen> 3 </since_tizen>
434         public bool AxisAutoLockEnabled
435         {
436             get
437             {
438                 return (bool)GetValue(AxisAutoLockEnabledProperty);
439             }
440             set
441             {
442                 SetValue(AxisAutoLockEnabledProperty, value);
443             }
444         }
445
446         /// <summary>
447         /// Sets and Gets WheelScrollDistanceStep property.
448         /// </summary>
449         /// <since_tizen> 3 </since_tizen>
450         public Vector2 WheelScrollDistanceStep
451         {
452             get
453             {
454                 return (Vector2)GetValue(WheelScrollDistanceStepProperty);
455             }
456             set
457             {
458                 SetValue(WheelScrollDistanceStepProperty, value);
459             }
460         }
461
462         /// <summary>
463         /// Sets and Gets ScrollPosition property.
464         /// </summary>
465         /// <since_tizen> 3 </since_tizen>
466         public Vector2 ScrollPosition
467         {
468             get
469             {
470                 return (Vector2)GetValue(ScrollPositionProperty);
471             }
472             set
473             {
474                 SetValue(ScrollPositionProperty, value);
475             }
476         }
477
478         /// <summary>
479         /// Sets and Gets ScrollPrePosition property.
480         /// </summary>
481         /// <since_tizen> 3 </since_tizen>
482         public Vector2 ScrollPrePosition
483         {
484             get
485             {
486                 return (Vector2)GetValue(ScrollPrePositionProperty);
487             }
488             set
489             {
490                 SetValue(ScrollPrePositionProperty, value);
491             }
492         }
493
494         /// <summary>
495         /// Sets and Gets ScrollPrePositionMax property.
496         /// </summary>
497         /// <since_tizen> 3 </since_tizen>
498         public Vector2 ScrollPrePositionMax
499         {
500             get
501             {
502                 return (Vector2)GetValue(ScrollPrePositionMaxProperty);
503             }
504             set
505             {
506                 SetValue(ScrollPrePositionMaxProperty, value);
507             }
508         }
509
510         /// <summary>
511         /// Sets and Gets OvershootX property.
512         /// </summary>
513         /// <since_tizen> 3 </since_tizen>
514         public float OvershootX
515         {
516             get
517             {
518                 return (float)GetValue(OvershootXProperty);
519             }
520             set
521             {
522                 SetValue(OvershootXProperty, value);
523             }
524         }
525
526         /// <summary>
527         /// Sets and Gets OvershootY property.
528         /// </summary>
529         /// <since_tizen> 3 </since_tizen>
530         public float OvershootY
531         {
532             get
533             {
534                 return (float)GetValue(OvershootYProperty);
535             }
536             set
537             {
538                 SetValue(OvershootYProperty, value);
539             }
540         }
541
542         /// <summary>
543         /// Sets and Gets ScrollFinal property.
544         /// </summary>
545         /// <since_tizen> 3 </since_tizen>
546         public Vector2 ScrollFinal
547         {
548             get
549             {
550                 return (Vector2)GetValue(ScrollFinalProperty);
551             }
552             set
553             {
554                 SetValue(ScrollFinalProperty, value);
555             }
556         }
557
558         /// <summary>
559         /// Sets and Gets Wrap property.
560         /// </summary>
561         /// <since_tizen> 3 </since_tizen>
562         public bool Wrap
563         {
564             get
565             {
566                 return (bool)GetValue(WrapProperty);
567             }
568             set
569             {
570                 SetValue(WrapProperty, value);
571             }
572         }
573
574         /// <summary>
575         /// Sets and Gets Panning property.
576         /// </summary>
577         /// <since_tizen> 3 </since_tizen>
578         public bool Panning
579         {
580             get
581             {
582                 return (bool)GetValue(PanningProperty);
583             }
584             set
585             {
586                 SetValue(PanningProperty, value);
587             }
588         }
589
590         /// <summary>
591         /// Sets and Gets Scrolling property.
592         /// </summary>
593         /// <since_tizen> 3 </since_tizen>
594         public bool Scrolling
595         {
596             get
597             {
598                 return (bool)GetValue(ScrollingProperty);
599             }
600             set
601             {
602                 SetValue(ScrollingProperty, value);
603             }
604         }
605
606         /// <summary>
607         /// Sets and Gets ScrollDomainSize property.
608         /// </summary>
609         /// <since_tizen> 3 </since_tizen>
610         public Vector2 ScrollDomainSize
611         {
612             get
613             {
614                 return (Vector2)GetValue(ScrollDomainSizeProperty);
615             }
616             set
617             {
618                 SetValue(ScrollDomainSizeProperty, value);
619             }
620         }
621
622         /// <summary>
623         /// Sets and Gets ScrollDomainOffset property.
624         /// </summary>
625         /// <since_tizen> 3 </since_tizen>
626         public Vector2 ScrollDomainOffset
627         {
628             get
629             {
630                 return (Vector2)GetValue(ScrollDomainOffsetProperty);
631             }
632             set
633             {
634                 SetValue(ScrollDomainOffsetProperty, value);
635             }
636         }
637
638         /// <summary>
639         /// Sets and Gets ScrollPositionDelta property.
640         /// </summary>
641         /// <since_tizen> 3 </since_tizen>
642         public Vector2 ScrollPositionDelta
643         {
644             get
645             {
646                 return (Vector2)GetValue(ScrollPositionDeltaProperty);
647             }
648             set
649             {
650                 SetValue(ScrollPositionDeltaProperty, value);
651             }
652         }
653
654         /// <summary>
655         /// Sets and Gets StartPagePosition property.
656         /// </summary>
657         /// <since_tizen> 3 </since_tizen>
658         public Vector3 StartPagePosition
659         {
660             get
661             {
662                 return (Vector3)GetValue(StartPagePositionProperty);
663             }
664             set
665             {
666                 SetValue(StartPagePositionProperty, value);
667             }
668         }
669
670
671         /// <summary>
672         /// Sets and Gets ScrollMode property.
673         /// </summary>
674         /// <since_tizen> 3 </since_tizen>
675         public PropertyMap ScrollMode
676         {
677             get
678             {
679                 return (PropertyMap)GetValue(ScrollModeProperty);
680             }
681             set
682             {
683                 SetValue(ScrollModeProperty, value);
684             }
685         }
686
687         /// <summary>
688         /// Gets snap-animation's AlphaFunction.
689         /// </summary>
690         /// <returns>Current easing alpha function of the snap animation.</returns>
691         /// <since_tizen> 3 </since_tizen>
692         public AlphaFunction GetScrollSnapAlphaFunction()
693         {
694             AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true);
695             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
696             return ret;
697         }
698
699         /// <summary>
700         /// Sets snap-animation's AlphaFunction.
701         /// </summary>
702         /// <param name="alpha">Easing alpha function of the snap animation.</param>
703         /// <since_tizen> 3 </since_tizen>
704         public void SetScrollSnapAlphaFunction(AlphaFunction alpha)
705         {
706             NDalicPINVOKE.ScrollView_SetScrollSnapAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
707             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
708         }
709
710         /// <summary>
711         /// Gets flick-animation's AlphaFunction.
712         /// </summary>
713         /// <returns>Current easing alpha function of the flick animation.</returns>
714         /// <since_tizen> 3 </since_tizen>
715         public AlphaFunction GetScrollFlickAlphaFunction()
716         {
717             AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollFlickAlphaFunction(swigCPtr), true);
718             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
719             return ret;
720         }
721
722         /// <summary>
723         /// Sets flick-animation's AlphaFunction.
724         /// </summary>
725         /// <param name="alpha">Easing alpha function of the flick animation.</param>
726         /// <since_tizen> 3 </since_tizen>
727         public void SetScrollFlickAlphaFunction(AlphaFunction alpha)
728         {
729             NDalicPINVOKE.ScrollView_SetScrollFlickAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
730             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
731         }
732
733         /// <summary>
734         /// Gets the time for the scroll snap-animation.
735         /// </summary>
736         /// <returns>The time in seconds for the animation to take.</returns>
737         /// <since_tizen> 3 </since_tizen>
738         public float GetScrollSnapDuration()
739         {
740             float ret = NDalicPINVOKE.ScrollView_GetScrollSnapDuration(swigCPtr);
741             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
742             return ret;
743         }
744
745         /// <summary>
746         /// Sets the time for the scroll snap-animation.
747         /// </summary>
748         /// <param name="time">The time in seconds for the animation to take.</param>
749         /// <since_tizen> 3 </since_tizen>
750         public void SetScrollSnapDuration(float time)
751         {
752             NDalicPINVOKE.ScrollView_SetScrollSnapDuration(swigCPtr, time);
753             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
754         }
755
756         /// <summary>
757         /// Gets the time for the scroll flick-animation.
758         /// </summary>
759         /// <returns>The time in seconds for the animation to take.</returns>
760         /// <since_tizen> 3 </since_tizen>
761         public float GetScrollFlickDuration()
762         {
763             float ret = NDalicPINVOKE.ScrollView_GetScrollFlickDuration(swigCPtr);
764             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
765             return ret;
766         }
767
768         /// <summary>
769         /// Sets the time for the scroll snap-animation.
770         /// </summary>
771         /// <param name="time">The time in seconds for the animation to take.</param>
772         /// <since_tizen> 3 </since_tizen>
773         public void SetScrollFlickDuration(float time)
774         {
775             NDalicPINVOKE.ScrollView_SetScrollFlickDuration(swigCPtr, time);
776             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
777         }
778
779         /// <summary>
780         /// Sets scroll sensibility of pan gesture.
781         /// </summary>
782         /// <param name="sensitive">True to enable scroll, false to disable scrolling.</param>
783         /// <since_tizen> 3 </since_tizen>
784         public void SetScrollSensitive(bool sensitive)
785         {
786             NDalicPINVOKE.ScrollView_SetScrollSensitive(swigCPtr, sensitive);
787             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
788         }
789
790         /// <summary>
791         /// Sets maximum overshoot amount.
792         /// </summary>
793         /// <param name="overshootX">The maximum number of horizontally scrolled pixels before overshoot X reaches 1.0f.</param>
794         /// <param name="overshootY">The maximum number of vertically scrolled pixels before overshoot X reaches 1.0f.</param>
795         /// <since_tizen> 3 </since_tizen>
796         public void SetMaxOvershoot(float overshootX, float overshootY)
797         {
798             NDalicPINVOKE.ScrollView_SetMaxOvershoot(swigCPtr, overshootX, overshootY);
799             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
800         }
801
802         /// <summary>
803         /// Sets Snap Overshoot animation's AlphaFunction.
804         /// </summary>
805         /// <param name="alpha">Easing alpha function of the overshoot snap animation.</param>
806         /// <since_tizen> 3 </since_tizen>
807         public void SetSnapOvershootAlphaFunction(AlphaFunction alpha)
808         {
809             NDalicPINVOKE.ScrollView_SetSnapOvershootAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
810             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
811         }
812
813         /// <summary>
814         /// Sets Snap Overshoot animation's Duration.
815         /// </summary>
816         /// <param name="duration">duration The duration of the overshoot snap animation.</param>
817         /// <since_tizen> 3 </since_tizen>
818         public void SetSnapOvershootDuration(float duration)
819         {
820             NDalicPINVOKE.ScrollView_SetSnapOvershootDuration(swigCPtr, duration);
821             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
822         }
823
824         /// <summary>
825         /// Enables or Disables Actor Auto-Snap mode.<br />
826         /// When Actor Auto-Snap mode has been enabled, ScrollView will automatically,
827         /// snap to the closest actor (The closest actor will appear in the center of the ScrollView).
828         /// </summary>
829         /// <param name="enable">Enables (true), or disables (false) Actor AutoSnap.</param>
830         /// <since_tizen> 3 </since_tizen>
831         public void SetViewAutoSnap(bool enable)
832         {
833             NDalicPINVOKE.ScrollView_SetActorAutoSnap(swigCPtr, enable);
834             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
835         }
836
837         /// <summary>
838         /// Enables or Disables Wrap mode for ScrollView contents.<br />
839         /// When enabled, the ScrollView contents are wrapped over the X/Y Domain.
840         /// </summary>
841         /// <param name="enable">Enables (true), or disables (false) Wrap Mode.</param>
842         /// <since_tizen> 3 </since_tizen>
843         public void SetWrapMode(bool enable)
844         {
845             NDalicPINVOKE.ScrollView_SetWrapMode(swigCPtr, enable);
846             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
847         }
848
849         /// <summary>
850         /// Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted.
851         /// </summary>
852         /// <returns>Current scroll update distance.</returns>
853         /// <since_tizen> 3 </since_tizen>
854         public int GetScrollUpdateDistance()
855         {
856             int ret = NDalicPINVOKE.ScrollView_GetScrollUpdateDistance(swigCPtr);
857             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
858             return ret;
859         }
860
861         /// <summary>
862         /// Sets the distance needed to scroll for ScrollUpdatedSignal to be emitted.<br />
863         /// The scroll update distance tells ScrollView how far to move before ScrollUpdatedSignal the informs application.<br />
864         /// Each time the ScrollView crosses this distance the signal will be emitted.<br />
865         /// </summary>
866         /// <param name="distance">The distance for ScrollView to move before emitting update signal.</param>
867         /// <since_tizen> 3 </since_tizen>
868         public void SetScrollUpdateDistance(int distance)
869         {
870             NDalicPINVOKE.ScrollView_SetScrollUpdateDistance(swigCPtr, distance);
871             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
872         }
873
874         /// <summary>
875         /// Returns state of Axis Auto Lock mode.
876         /// </summary>
877         /// <returns>Whether Axis Auto Lock mode has been enabled or not.</returns>
878         /// <since_tizen> 3 </since_tizen>
879         public bool GetAxisAutoLock()
880         {
881             bool ret = NDalicPINVOKE.ScrollView_GetAxisAutoLock(swigCPtr);
882             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
883             return ret;
884         }
885
886         /// <summary>
887         /// Enables or Disables Axis Auto Lock mode for panning within the ScrollView.<br />
888         /// When enabled, any pan gesture that appears mostly horizontal or mostly
889         /// vertical, will be automatically restricted to horizontal only or vertical
890         /// only panning, until the pan gesture has completed.
891         /// </summary>
892         /// <param name="enable">Enables (true), or disables (false) AxisAutoLock mode.</param>
893         /// <since_tizen> 3 </since_tizen>
894         public void SetAxisAutoLock(bool enable)
895         {
896             NDalicPINVOKE.ScrollView_SetAxisAutoLock(swigCPtr, enable);
897             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
898         }
899
900         /// <summary>
901         /// Gets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.
902         /// </summary>
903         /// <returns>The gradient, a value between 0.0 and 1.0f.</returns>
904         /// <since_tizen> 3 </since_tizen>
905         public float GetAxisAutoLockGradient()
906         {
907             float ret = NDalicPINVOKE.ScrollView_GetAxisAutoLockGradient(swigCPtr);
908             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
909             return ret;
910         }
911
912         /// <summary>
913         /// Sets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.<br />
914         /// By default, this is 0.36 (0.36:1) which means angles less than 20 degrees to an axis will lock to that axis.<br />
915         /// </summary>
916         /// <param name="gradient">gradient A value between 0.0 and 1.0 (auto-lock for all angles).</param>
917         /// <since_tizen> 3 </since_tizen>
918         public void SetAxisAutoLockGradient(float gradient)
919         {
920             NDalicPINVOKE.ScrollView_SetAxisAutoLockGradient(swigCPtr, gradient);
921             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
922         }
923
924         /// <summary>
925         /// Gets the friction coefficient setting for ScrollView when flicking in free panning mode.
926         /// This is a value in stage-diagonals per second^2, stage-diagonal = Length( stage.width, stage.height )
927         /// </summary>
928         /// <returns>Friction coefficient is returned.</returns>
929         /// <since_tizen> 3 </since_tizen>
930         public float GetFrictionCoefficient()
931         {
932             float ret = NDalicPINVOKE.ScrollView_GetFrictionCoefficient(swigCPtr);
933             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
934             return ret;
935         }
936
937         /// <summary>
938         /// Sets the friction coefficient for ScrollView when flicking.<br />
939         /// </summary>
940         /// <param name="friction">Friction coefficient must be greater than 0.0 (default = 1.0).</param>
941         /// <since_tizen> 3 </since_tizen>
942         public void SetFrictionCoefficient(float friction)
943         {
944             NDalicPINVOKE.ScrollView_SetFrictionCoefficient(swigCPtr, friction);
945             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946         }
947
948         /// <summary>
949         /// Gets the flick speed coefficient for ScrollView when flicking in free panning mode.<br />
950         /// This is a constant which multiplies the input touch flick velocity to determine the actual velocity at which to move the scrolling area.
951         /// </summary>
952         /// <returns>The flick speed coefficient is returned.</returns>
953         /// <since_tizen> 3 </since_tizen>
954         public float GetFlickSpeedCoefficient()
955         {
956             float ret = NDalicPINVOKE.ScrollView_GetFlickSpeedCoefficient(swigCPtr);
957             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
958             return ret;
959         }
960
961         /// <summary>
962         /// Sets the flick speed coefficient for ScrollView when flicking in free panning mode.<br />
963         /// This is a constant which multiplies the input touch flick velocity to determine the actual velocity at
964         /// which to move the scrolling area.<br />
965         /// </summary>
966         /// <param name="speed">The flick speed coefficient (default = 1.0).</param>
967         /// <since_tizen> 3 </since_tizen>
968         public void SetFlickSpeedCoefficient(float speed)
969         {
970             NDalicPINVOKE.ScrollView_SetFlickSpeedCoefficient(swigCPtr, speed);
971             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
972         }
973
974         /// <summary>
975         /// Gets the minimum pan distance required for a flick gesture in pixels.<br />
976         /// </summary>
977         /// <returns>Minimum pan distance vector with separate x and y distance.</returns>
978         /// <since_tizen> 3 </since_tizen>
979         public Vector2 GetMinimumDistanceForFlick()
980         {
981             Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetMinimumDistanceForFlick(swigCPtr), true);
982             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
983             return ret;
984         }
985
986         /// <summary>
987         /// Sets the minimum pan distance required for a flick in pixels.<br />
988         /// Takes a Vector2 containing separate x and y values. As long as the pan distance exceeds one of these axes, a flick will be allowed.
989         /// </summary>
990         /// <param name="distance">The flick speed coefficient (default = 1.0).</param>
991         /// <since_tizen> 3 </since_tizen>
992         public void SetMinimumDistanceForFlick(Vector2 distance)
993         {
994             NDalicPINVOKE.ScrollView_SetMinimumDistanceForFlick(swigCPtr, Vector2.getCPtr(distance));
995             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
996         }
997
998         /// <summary>
999         /// Returns the minimum pan speed required for a flick gesture in pixels per second.
1000         /// </summary>
1001         /// <returns>Minimum pan speed.</returns>
1002         /// <since_tizen> 3 </since_tizen>
1003         public float GetMinimumSpeedForFlick()
1004         {
1005             float ret = NDalicPINVOKE.ScrollView_GetMinimumSpeedForFlick(swigCPtr);
1006             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1007             return ret;
1008         }
1009
1010         /// <summary>
1011         /// Sets the minimum pan speed required for a flick in pixels per second.<br />
1012         /// </summary>
1013         /// <param name="speed">The minimum pan speed for a flick.</param>
1014         /// <since_tizen> 3 </since_tizen>
1015         public void SetMinimumSpeedForFlick(float speed)
1016         {
1017             NDalicPINVOKE.ScrollView_SetMinimumSpeedForFlick(swigCPtr, speed);
1018             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1019         }
1020
1021         /// <summary>
1022         /// Gets the maximum flick speed setting for ScrollView when flicking in free panning mode.<br />
1023         /// This is a value in stage-diagonals per second.
1024         /// </summary>
1025         /// <returns>Maximum flick speed is returned.</returns>
1026         /// <since_tizen> 3 </since_tizen>
1027         public float GetMaxFlickSpeed()
1028         {
1029             float ret = NDalicPINVOKE.ScrollView_GetMaxFlickSpeed(swigCPtr);
1030             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1031             return ret;
1032         }
1033
1034         /// <summary>
1035         /// Sets the maximum flick speed for the ScrollView when flicking in free panning mode.<br />
1036         /// This is a value in stage-diagonals per second. stage-diagonal = Length( stage.width, stage.height ).<br />
1037         /// </summary>
1038         /// <param name="speed">Maximum flick speed (default = 3.0).</param>
1039         /// <since_tizen> 3 </since_tizen>
1040         public void SetMaxFlickSpeed(float speed)
1041         {
1042             NDalicPINVOKE.ScrollView_SetMaxFlickSpeed(swigCPtr, speed);
1043             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1044         }
1045
1046         /// <summary>
1047         /// Gets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.<br />
1048         /// </summary>
1049         /// <returns>The step of scroll distance(pixel) in X and Y axes.</returns>
1050         /// <since_tizen> 3 </since_tizen>
1051         public Vector2 GetWheelScrollDistanceStep()
1052         {
1053             Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetWheelScrollDistanceStep(swigCPtr), true);
1054             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1055             return ret;
1056         }
1057
1058         /// <summary>
1059         /// Sets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.<br />
1060         /// </summary>
1061         /// <param name="step">step The step of scroll distance(pixel) in X and Y axes.</param>
1062         /// <since_tizen> 3 </since_tizen>
1063         public void SetWheelScrollDistanceStep(Vector2 step)
1064         {
1065             NDalicPINVOKE.ScrollView_SetWheelScrollDistanceStep(swigCPtr, Vector2.getCPtr(step));
1066             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1067         }
1068
1069         /// <summary>
1070         /// Retrieves current scroll position.<br />
1071         /// </summary>
1072         /// <returns>The current scroll position.</returns>
1073         /// <since_tizen> 3 </since_tizen>
1074         public Vector2 GetCurrentScrollPosition()
1075         {
1076             Vector2 ret = new Vector2(NDalicPINVOKE.ScrollView_GetCurrentScrollPosition(swigCPtr), true);
1077             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1078             return ret;
1079         }
1080
1081         /// <summary>
1082         /// Retrieves current scroll page based on ScrollView dimensions being the size of one page, and all pages laid out in<br />
1083         /// a grid fashion, increasing from left to right until the end of the X-domain.
1084         /// </summary>
1085         /// <returns>The current scroll position.</returns>
1086         /// <since_tizen> 3 </since_tizen>
1087         public uint GetCurrentPage()
1088         {
1089             uint ret = NDalicPINVOKE.ScrollView_GetCurrentPage(swigCPtr);
1090             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1091             return ret;
1092         }
1093
1094         /// <summary>
1095         /// Scrolls View to position specified (contents will scroll to this position).
1096         /// </summary>
1097         /// <param name="position">The position to scroll to.</param>
1098         /// <since_tizen> 3 </since_tizen>
1099         public void ScrollTo(Vector2 position)
1100         {
1101             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_0(swigCPtr, Vector2.getCPtr(position));
1102             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1103         }
1104
1105         /// <summary>
1106         /// Scrolls View to position specified (contents will scroll to this position).
1107         /// </summary>
1108         /// <param name="position">The position to scroll to.</param>
1109         /// <param name="duration">The duration of the animation in seconds.</param>
1110         /// <since_tizen> 3 </since_tizen>
1111         public void ScrollTo(Vector2 position, float duration)
1112         {
1113             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_1(swigCPtr, Vector2.getCPtr(position), duration);
1114             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1115         }
1116
1117         /// <summary>
1118         /// Scrolls View to position specified (contents will scroll to this position).
1119         /// </summary>
1120         /// <param name="position">The position to scroll to.</param>
1121         /// <param name="duration">The duration of the animation in seconds.</param>
1122         /// <param name="alpha">The alpha function to use.</param>
1123         /// <since_tizen> 3 </since_tizen>
1124         public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha)
1125         {
1126             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_2(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha));
1127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1128         }
1129
1130         /// <summary>
1131         /// Scrolls View to position specified (contents will scroll to this position).
1132         /// </summary>
1133         /// <param name="position">The position to scroll to.</param>
1134         /// <param name="duration">The duration of the animation in seconds.</param>
1135         /// <param name="horizontalBias">Whether to bias scrolling to left or right.</param>
1136         /// <param name="verticalBias">Whether to bias scrolling to top or bottom.</param>
1137         /// <since_tizen> 3 </since_tizen>
1138         public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias)
1139         {
1140             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_3(swigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias);
1141             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1142         }
1143
1144         /// <summary>
1145         /// Scrolls View to position specified (contents will scroll to this position).
1146         /// </summary>
1147         /// <param name="position">The position to scroll to.</param>
1148         /// <param name="duration">The duration of the animation in seconds.</param>
1149         /// <param name="alpha">Alpha function to use.</param>
1150         /// <param name="horizontalBias">Whether to bias scrolling to left or right.</param>
1151         /// <param name="verticalBias">Whether to bias scrolling to top or bottom.</param>
1152         /// <since_tizen> 3 </since_tizen>
1153         public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias)
1154         {
1155             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_4(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha), (int)horizontalBias, (int)verticalBias);
1156             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1157         }
1158
1159         /// <summary>
1160         /// Scrolls View to position specified (contents will scroll to this position).
1161         /// </summary>
1162         /// <param name="page">The page to scroll to.</param>
1163         /// <since_tizen> 3 </since_tizen>
1164         public void ScrollTo(uint page)
1165         {
1166             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_5(swigCPtr, page);
1167             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1168         }
1169
1170         /// <summary>
1171         /// Scrolls View to position specified (contents will scroll to this position).
1172         /// </summary>
1173         /// <param name="page">The page to scroll to.</param>
1174         /// <param name="duration">The duration of the animation in seconds.</param>
1175         /// <since_tizen> 3 </since_tizen>
1176         public void ScrollTo(uint page, float duration)
1177         {
1178             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_6(swigCPtr, page, duration);
1179             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1180         }
1181
1182         /// <summary>
1183         /// Scrolls View to position specified (contents will scroll to this position).
1184         /// </summary>
1185         /// <param name="page">The page to scroll to.</param>
1186         /// <param name="duration">The duration of the animation in seconds.</param>
1187         /// <param name="bias">Whether to bias scrolling to left or right.</param>
1188         /// <since_tizen> 3 </since_tizen>
1189         public void ScrollTo(uint page, float duration, DirectionBias bias)
1190         {
1191             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_7(swigCPtr, page, duration, (int)bias);
1192             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1193         }
1194
1195         /// <summary>
1196         /// Scrolls View to position specified (contents will scroll to this position).
1197         /// </summary>
1198         /// <param name="view">The view to center in on (via Scrolling).</param>
1199         /// <since_tizen> 3 </since_tizen>
1200         public void ScrollTo(View view)
1201         {
1202             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_8(swigCPtr, View.getCPtr(view));
1203             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1204         }
1205
1206         /// <summary>
1207         /// Scrolls View to position specified (contents will scroll to this position).
1208         /// </summary>
1209         /// <param name="view">The view to center in on (via Scrolling).</param>
1210         /// <param name="duration">The duration of the animation in seconds.</param>
1211         /// <since_tizen> 3 </since_tizen>
1212         public void ScrollTo(View view, float duration)
1213         {
1214             NDalicPINVOKE.ScrollView_ScrollTo__SWIG_9(swigCPtr, View.getCPtr(view), duration);
1215             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1216         }
1217
1218         /// <summary>
1219         /// Scrolls View to the nearest snap points as specified by the Rulers.<br />
1220         /// If already at snap points, then will return false, and not scroll.<br />
1221         /// </summary>
1222         /// <returns>True if Snapping necessary.</returns>
1223         /// <since_tizen> 3 </since_tizen>
1224         public bool ScrollToSnapPoint()
1225         {
1226             bool ret = NDalicPINVOKE.ScrollView_ScrollToSnapPoint(swigCPtr);
1227             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1228             return ret;
1229         }
1230
1231         /// <summary>
1232         /// Applies Effect to ScrollView.
1233         /// </summary>
1234         /// <param name="effect">The effect to apply to scroll view.</param>
1235         /// <since_tizen> 3 </since_tizen>
1236         public void ApplyEffect(ScrollViewEffect effect)
1237         {
1238             NDalicPINVOKE.ScrollView_ApplyEffect(swigCPtr, ScrollViewEffect.getCPtr(effect));
1239             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1240         }
1241
1242         /// <summary>
1243         /// Removes Effect from ScrollView.
1244         /// </summary>
1245         /// <param name="effect">The effect to remove.</param>
1246         /// <since_tizen> 3 </since_tizen>
1247         public void RemoveEffect(ScrollViewEffect effect)
1248         {
1249             NDalicPINVOKE.ScrollView_RemoveEffect(swigCPtr, ScrollViewEffect.getCPtr(effect));
1250             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1251         }
1252
1253         /// <summary>
1254         /// Remove All Effects from ScrollView.
1255         /// </summary>
1256         /// <since_tizen> 3 </since_tizen>
1257         public void RemoveAllEffects()
1258         {
1259             NDalicPINVOKE.ScrollView_RemoveAllEffects(swigCPtr);
1260             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1261         }
1262
1263         /// <summary>
1264         /// Binds view to this ScrollView.
1265         /// Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
1266         /// </summary>
1267         /// <param name="child">The view to add to this ScrollView.</param>
1268         /// <since_tizen> 3 </since_tizen>
1269         public void BindView(View child)
1270         {
1271             NDalicPINVOKE.ScrollView_BindActor(swigCPtr, View.getCPtr(child));
1272             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1273         }
1274
1275         /// <summary>
1276         /// Unbinds view to this ScrollView.
1277         /// Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
1278         /// </summary>
1279         /// <param name="child">The view to remove to this ScrollView.</param>
1280         /// <since_tizen> 3 </since_tizen>
1281         public void UnbindView(View child)
1282         {
1283             NDalicPINVOKE.ScrollView_UnbindActor(swigCPtr, View.getCPtr(child));
1284             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1285         }
1286
1287         /// <summary>
1288         /// Allows the user to constrain the scroll view in a particular direction.
1289         /// </summary>
1290         /// <param name="direction">The axis to constrain the scroll-view to.</param>
1291         /// <param name="threshold">The threshold to apply around the axis.</param>
1292         /// <since_tizen> 3 </since_tizen>
1293         public void SetScrollingDirection(Radian direction, Radian threshold)
1294         {
1295             NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold));
1296             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1297         }
1298
1299         /// <summary>
1300         /// Allows the user to constrain the scroll view in a particular direction.
1301         /// </summary>
1302         /// <param name="direction">The axis to constrain the scroll-view to.</param>
1303         /// <since_tizen> 3 </since_tizen>
1304         public void SetScrollingDirection(Radian direction)
1305         {
1306             NDalicPINVOKE.ScrollView_SetScrollingDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction));
1307             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1308         }
1309
1310         /// <summary>
1311         /// Removes a direction constraint from the scroll view.
1312         /// </summary>
1313         /// <param name="direction">The axis to constrain the scroll-view to.</param>
1314         /// <since_tizen> 3 </since_tizen>
1315         public void RemoveScrollingDirection(Radian direction)
1316         {
1317             NDalicPINVOKE.ScrollView_RemoveScrollingDirection(swigCPtr, Radian.getCPtr(direction));
1318             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1319         }
1320
1321         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollView obj)
1322         {
1323             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1324         }
1325
1326         internal void ApplyConstraintToChildren(SWIGTYPE_p_Dali__Constraint constraint)
1327         {
1328             NDalicPINVOKE.ScrollView_ApplyConstraintToChildren(swigCPtr, SWIGTYPE_p_Dali__Constraint.getCPtr(constraint));
1329             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1330         }
1331
1332         internal ScrollViewSnapStartedSignal SnapStartedSignal()
1333         {
1334             ScrollViewSnapStartedSignal ret = new ScrollViewSnapStartedSignal(NDalicPINVOKE.ScrollView_SnapStartedSignal(swigCPtr), false);
1335             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1336             return ret;
1337         }
1338
1339         /// <summary>
1340         /// Dispose
1341         /// </summary>
1342         /// <param name="type">the dispose type</param>
1343         /// <since_tizen> 3 </since_tizen>
1344         protected override void Dispose(DisposeTypes type)
1345         {
1346             if (disposed)
1347             {
1348                 return;
1349             }
1350
1351             if (type == DisposeTypes.Explicit)
1352             {
1353                 //Called by User
1354                 //Release your own managed resources here.
1355                 //You should release all of your own disposable objects here.
1356
1357             }
1358
1359             //Release your own unmanaged resources here.
1360             //You should not access any managed member here except static instance.
1361             //because the execution order of Finalizes is non-deterministic.
1362
1363             if (this != null && _scrollViewSnapStartedCallbackDelegate != null)
1364             {
1365                 this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate);
1366             }
1367
1368             if (swigCPtr.Handle != global::System.IntPtr.Zero)
1369             {
1370                 if (swigCMemOwn)
1371                 {
1372                     swigCMemOwn = false;
1373                     NDalicPINVOKE.delete_ScrollView(swigCPtr);
1374                 }
1375                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1376             }
1377
1378             base.Dispose(type);
1379         }
1380
1381         // Callback for ScrollView SnapStarted signal
1382         private void OnSnapStarted(IntPtr data)
1383         {
1384             SnapStartedEventArgs e = new SnapStartedEventArgs();
1385
1386             // Populate all members of "e" (SnapStartedEventArgs) with real data
1387             e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr(data);
1388
1389             if (_scrollViewSnapStartedEventHandler != null)
1390             {
1391                 //here we send all data to user event handlers
1392                 _scrollViewSnapStartedEventHandler(this, e);
1393             }
1394         }
1395
1396         /// <summary>
1397         /// This should be internal, please do not use.
1398         /// </summary>
1399         /// <since_tizen> 3 </since_tizen>
1400         /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1401         [EditorBrowsable(EditorBrowsableState.Never)]
1402         public new class Property
1403         {
1404             /// <summary>
1405             /// This should be internal, please do not use.
1406             /// </summary>
1407             /// <since_tizen> 3 </since_tizen>
1408             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1409             [EditorBrowsable(EditorBrowsableState.Never)]
1410             public static readonly int WRAP_ENABLED = NDalicPINVOKE.ScrollView_Property_WRAP_ENABLED_get();
1411             /// <summary>
1412             /// This should be internal, please do not use.
1413             /// </summary>
1414             /// <since_tizen> 3 </since_tizen>
1415             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1416             [EditorBrowsable(EditorBrowsableState.Never)]
1417             public static readonly int PANNING_ENABLED = NDalicPINVOKE.ScrollView_Property_PANNING_ENABLED_get();
1418             /// <summary>
1419             /// This should be internal, please do not use.
1420             /// </summary>
1421             /// <since_tizen> 3 </since_tizen>
1422             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1423             [EditorBrowsable(EditorBrowsableState.Never)]
1424             public static readonly int AXIS_AUTO_LOCK_ENABLED = NDalicPINVOKE.ScrollView_Property_AXIS_AUTO_LOCK_ENABLED_get();
1425             /// <summary>
1426             /// This should be internal, please do not use.
1427             /// </summary>
1428             /// <since_tizen> 3 </since_tizen>
1429             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1430             [EditorBrowsable(EditorBrowsableState.Never)]
1431             public static readonly int WHEEL_SCROLL_DISTANCE_STEP = NDalicPINVOKE.ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get();
1432             /// <summary>
1433             /// This should be internal, please do not use.
1434             /// </summary>
1435             /// <since_tizen> 3 </since_tizen>
1436             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1437             [EditorBrowsable(EditorBrowsableState.Never)]
1438             public static readonly int SCROLL_MODE = NDalicPINVOKE.ScrollView_Property_SCROLL_MODE_get();
1439             /// <summary>
1440             /// This should be internal, please do not use.
1441             /// </summary>
1442             /// <since_tizen> 3 </since_tizen>
1443             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1444             [EditorBrowsable(EditorBrowsableState.Never)]
1445             public static readonly int SCROLL_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_get();
1446             /// <summary>
1447             /// This should be internal, please do not use.
1448             /// </summary>
1449             /// <since_tizen> 3 </since_tizen>
1450             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1451             [EditorBrowsable(EditorBrowsableState.Never)]
1452             public static readonly int SCROLL_PRE_POSITION = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_get();
1453             /// <summary>
1454             /// This should be internal, please do not use.
1455             /// </summary>
1456             /// <since_tizen> 3 </since_tizen>
1457             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1458             [EditorBrowsable(EditorBrowsableState.Never)]
1459             public static readonly int SCROLL_PRE_POSITION_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_X_get();
1460             /// <summary>
1461             /// This should be internal, please do not use.
1462             /// </summary>
1463             /// <since_tizen> 3 </since_tizen>
1464             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1465             [EditorBrowsable(EditorBrowsableState.Never)]
1466             public static readonly int SCROLL_PRE_POSITION_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_Y_get();
1467             /// <summary>
1468             /// This should be internal, please do not use.
1469             /// </summary>
1470             /// <since_tizen> 3 </since_tizen>
1471             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1472             [EditorBrowsable(EditorBrowsableState.Never)]
1473             public static readonly int SCROLL_PRE_POSITION_MAX = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_get();
1474             /// <summary>
1475             /// This should be internal, please do not use.
1476             /// </summary>
1477             /// <since_tizen> 3 </since_tizen>
1478             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1479             [EditorBrowsable(EditorBrowsableState.Never)]
1480             public static readonly int SCROLL_PRE_POSITION_MAX_X = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_X_get();
1481             /// <summary>
1482             /// This should be internal, please do not use.
1483             /// </summary>
1484             /// <since_tizen> 3 </since_tizen>
1485             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1486             [EditorBrowsable(EditorBrowsableState.Never)]
1487             public static readonly int SCROLL_PRE_POSITION_MAX_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_PRE_POSITION_MAX_Y_get();
1488             /// <summary>
1489             /// This should be internal, please do not use.
1490             /// </summary>
1491             /// <since_tizen> 3 </since_tizen>
1492             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1493             [EditorBrowsable(EditorBrowsableState.Never)]
1494             public static readonly int OVERSHOOT_X = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_X_get();
1495             /// <summary>
1496             /// This should be internal, please do not use.
1497             /// </summary>
1498             /// <since_tizen> 3 </since_tizen>
1499             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1500             [EditorBrowsable(EditorBrowsableState.Never)]
1501             public static readonly int OVERSHOOT_Y = NDalicPINVOKE.ScrollView_Property_OVERSHOOT_Y_get();
1502             /// <summary>
1503             /// This should be internal, please do not use.
1504             /// </summary>
1505             /// <since_tizen> 3 </since_tizen>
1506             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1507             [EditorBrowsable(EditorBrowsableState.Never)]
1508             public static readonly int SCROLL_FINAL = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_get();
1509             /// <summary>
1510             /// This should be internal, please do not use.
1511             /// </summary>
1512             /// <since_tizen> 3 </since_tizen>
1513             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1514             [EditorBrowsable(EditorBrowsableState.Never)]
1515             public static readonly int SCROLL_FINAL_X = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_X_get();
1516             /// <summary>
1517             /// This should be internal, please do not use.
1518             /// </summary>
1519             /// <since_tizen> 3 </since_tizen>
1520             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1521             [EditorBrowsable(EditorBrowsableState.Never)]
1522             public static readonly int SCROLL_FINAL_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_FINAL_Y_get();
1523             /// <summary>
1524             /// This should be internal, please do not use.
1525             /// </summary>
1526             /// <since_tizen> 3 </since_tizen>
1527             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1528             [EditorBrowsable(EditorBrowsableState.Never)]
1529             public static readonly int WRAP = NDalicPINVOKE.ScrollView_Property_WRAP_get();
1530             /// <summary>
1531             /// This should be internal, please do not use.
1532             /// </summary>
1533             /// <since_tizen> 3 </since_tizen>
1534             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1535             [EditorBrowsable(EditorBrowsableState.Never)]
1536             public static readonly int PANNING = NDalicPINVOKE.ScrollView_Property_PANNING_get();
1537             /// <summary>
1538             /// This should be internal, please do not use.
1539             /// </summary>
1540             /// <since_tizen> 3 </since_tizen>
1541             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1542             [EditorBrowsable(EditorBrowsableState.Never)]
1543             public static readonly int SCROLLING = NDalicPINVOKE.ScrollView_Property_SCROLLING_get();
1544             /// <summary>
1545             /// This should be internal, please do not use.
1546             /// </summary>
1547             /// <since_tizen> 3 </since_tizen>
1548             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1549             [EditorBrowsable(EditorBrowsableState.Never)]
1550             public static readonly int SCROLL_DOMAIN_SIZE = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_get();
1551             /// <summary>
1552             /// This should be internal, please do not use.
1553             /// </summary>
1554             /// <since_tizen> 3 </since_tizen>
1555             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1556             [EditorBrowsable(EditorBrowsableState.Never)]
1557             public static readonly int SCROLL_DOMAIN_SIZE_X = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_X_get();
1558             /// <summary>
1559             /// This should be internal, please do not use.
1560             /// </summary>
1561             /// <since_tizen> 3 </since_tizen>
1562             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1563             [EditorBrowsable(EditorBrowsableState.Never)]
1564             public static readonly int SCROLL_DOMAIN_SIZE_Y = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_SIZE_Y_get();
1565             /// <summary>
1566             /// This should be internal, please do not use.
1567             /// </summary>
1568             /// <since_tizen> 3 </since_tizen>
1569             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1570             [EditorBrowsable(EditorBrowsableState.Never)]
1571             public static readonly int SCROLL_DOMAIN_OFFSET = NDalicPINVOKE.ScrollView_Property_SCROLL_DOMAIN_OFFSET_get();
1572             /// <summary>
1573             /// This should be internal, please do not use.
1574             /// </summary>
1575             /// <since_tizen> 3 </since_tizen>
1576             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1577             [EditorBrowsable(EditorBrowsableState.Never)]
1578             public static readonly int SCROLL_POSITION_DELTA = NDalicPINVOKE.ScrollView_Property_SCROLL_POSITION_DELTA_get();
1579             /// <summary>
1580             /// This should be internal, please do not use.
1581             /// </summary>
1582             /// <since_tizen> 3 </since_tizen>
1583             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1584             [EditorBrowsable(EditorBrowsableState.Never)]
1585             public static readonly int START_PAGE_POSITION = NDalicPINVOKE.ScrollView_Property_START_PAGE_POSITION_get();
1586         }
1587
1588         /// <summary>
1589         /// Snaps signal event's data.
1590         /// </summary>
1591         /// <since_tizen> 3 </since_tizen>
1592         public class SnapEvent : global::System.IDisposable
1593         {
1594             /// <summary>
1595             /// swigCMemOwn
1596             /// </summary>
1597             /// <since_tizen> 3 </since_tizen>
1598             protected bool swigCMemOwn;
1599
1600             /// <summary>
1601             /// A Flat to check if it is already disposed.
1602             /// </summary>
1603             /// swigCMemOwn
1604             /// <since_tizen> 3 </since_tizen>
1605             protected bool disposed = false;
1606
1607             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1608
1609             //A Flag to check who called Dispose(). (By User or DisposeQueue)
1610             private bool isDisposeQueued = false;
1611
1612             /// <summary>
1613             /// Create an instance of SnapEvent.
1614             /// </summary>
1615             /// <since_tizen> 3 </since_tizen>
1616             public SnapEvent() : this(NDalicPINVOKE.new_ScrollView_SnapEvent(), true)
1617             {
1618                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1619             }
1620
1621             internal SnapEvent(global::System.IntPtr cPtr, bool cMemoryOwn)
1622             {
1623                 swigCMemOwn = cMemoryOwn;
1624                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1625             }
1626
1627             /// <summary>
1628             /// Dispose
1629             /// </summary>
1630             /// <since_tizen> 3 </since_tizen>
1631             ~SnapEvent()
1632             {
1633                 if (!isDisposeQueued)
1634                 {
1635                     isDisposeQueued = true;
1636                     DisposeQueue.Instance.Add(this);
1637                 }
1638             }
1639
1640             /// <summary>
1641             /// Scroll position.
1642             /// </summary>
1643             /// <since_tizen> 3 </since_tizen>
1644             public Vector2 position
1645             {
1646                 set
1647                 {
1648                     NDalicPINVOKE.ScrollView_SnapEvent_position_set(swigCPtr, Vector2.getCPtr(value));
1649                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1650                 }
1651                 get
1652                 {
1653                     global::System.IntPtr cPtr = NDalicPINVOKE.ScrollView_SnapEvent_position_get(swigCPtr);
1654                     Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
1655                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1656                     return ret;
1657                 }
1658             }
1659
1660             /// <summary>
1661             /// Scroll duration.
1662             /// </summary>
1663             /// <since_tizen> 3 </since_tizen>
1664             public float duration
1665             {
1666                 set
1667                 {
1668                     NDalicPINVOKE.ScrollView_SnapEvent_duration_set(swigCPtr, value);
1669                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1670                 }
1671                 get
1672                 {
1673                     float ret = NDalicPINVOKE.ScrollView_SnapEvent_duration_get(swigCPtr);
1674                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1675                     return ret;
1676                 }
1677             }
1678
1679             internal SnapType type
1680             {
1681                 set
1682                 {
1683                     NDalicPINVOKE.ScrollView_SnapEvent_type_set(swigCPtr, (int)value);
1684                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1685                 }
1686                 get
1687                 {
1688                     SnapType ret = (SnapType)NDalicPINVOKE.ScrollView_SnapEvent_type_get(swigCPtr);
1689                     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1690                     return ret;
1691                 }
1692             }
1693
1694             /// <summary>
1695             /// Get SnapEvent From Ptr
1696             /// </summary>
1697             /// <since_tizen> 3 </since_tizen>
1698             /// This will be changed internal API after ACR done. Before ACR, need to be hidden as inhouse API.
1699             [EditorBrowsable(EditorBrowsableState.Never)]
1700             public static SnapEvent GetSnapEventFromPtr(global::System.IntPtr cPtr)
1701             {
1702                 SnapEvent ret = new SnapEvent(cPtr, false);
1703                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1704                 return ret;
1705             }
1706
1707             /// <summary>
1708             /// Dispose.
1709             /// </summary>
1710             /// <since_tizen> 3 </since_tizen>
1711             public void Dispose()
1712             {
1713                 //Throw excpetion if Dispose() is called in separate thread.
1714                 if (!Window.IsInstalled())
1715                 {
1716                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1717                 }
1718
1719                 if (isDisposeQueued)
1720                 {
1721                     Dispose(DisposeTypes.Implicit);
1722                 }
1723                 else
1724                 {
1725                     Dispose(DisposeTypes.Explicit);
1726                     System.GC.SuppressFinalize(this);
1727                 }
1728             }
1729
1730             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SnapEvent obj)
1731             {
1732                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1733             }
1734
1735             /// <summary>
1736             /// Dispose
1737             /// </summary>
1738             /// <param name="type">the dispose type</param>
1739             /// <since_tizen> 3 </since_tizen>
1740             protected virtual void Dispose(DisposeTypes type)
1741             {
1742                 if (disposed)
1743                 {
1744                     return;
1745                 }
1746
1747                 if (type == DisposeTypes.Explicit)
1748                 {
1749                     //Called by User
1750                     //Release your own managed resources here.
1751                     //You should release all of your own disposable objects here.
1752
1753                 }
1754
1755                 //Release your own unmanaged resources here.
1756                 //You should not access any managed member here except static instance.
1757                 //because the execution order of Finalizes is non-deterministic.
1758
1759                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1760                 {
1761                     if (swigCMemOwn)
1762                     {
1763                         swigCMemOwn = false;
1764                         NDalicPINVOKE.delete_ScrollView_SnapEvent(swigCPtr);
1765                     }
1766                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1767                 }
1768
1769                 disposed = true;
1770             }
1771
1772         }
1773         /// <summary>
1774         /// Event arguments that passed via the SnapStarted signal.
1775         /// </summary>
1776         /// <since_tizen> 3 </since_tizen>
1777         public class SnapStartedEventArgs : EventArgs
1778         {
1779             private Tizen.NUI.ScrollView.SnapEvent _snapEvent;
1780
1781             /// <summary>
1782             /// SnapEventInfo is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick).
1783             /// </summary>
1784             /// <since_tizen> 3 </since_tizen>
1785             public Tizen.NUI.ScrollView.SnapEvent SnapEventInfo
1786             {
1787                 get
1788                 {
1789                     return _snapEvent;
1790                 }
1791                 set
1792                 {
1793                     _snapEvent = value;
1794                 }
1795             }
1796         }
1797     }
1798 }