2 * Copyright(c) 2018 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.ComponentModel;
19 using System.Runtime.InteropServices;
20 using Tizen.NUI.BaseComponents;
21 using Tizen.NUI.Binding;
26 /// ScrollView contains views that can be scrolled manually (via touch).
28 /// <since_tizen> 3 </since_tizen>
29 public class ScrollView : Scrollable
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) =>
35 var scrollView = (ScrollView)bindable;
38 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP_ENABLED, new Tizen.NUI.PropertyValue((bool)newValue));
41 defaultValueCreator: (bindable) =>
43 var scrollView = (ScrollView)bindable;
45 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP_ENABLED).Get(out temp);
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) =>
52 var scrollView = (ScrollView)bindable;
55 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING_ENABLED, new Tizen.NUI.PropertyValue((bool)newValue));
58 defaultValueCreator: (bindable) =>
60 var scrollView = (ScrollView)bindable;
62 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING_ENABLED).Get(out temp);
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) =>
69 var scrollView = (ScrollView)bindable;
72 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.AXIS_AUTO_LOCK_ENABLED, new Tizen.NUI.PropertyValue((bool)newValue));
75 defaultValueCreator: (bindable) =>
77 var scrollView = (ScrollView)bindable;
79 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.AXIS_AUTO_LOCK_ENABLED).Get(out temp);
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) =>
86 var scrollView = (ScrollView)bindable;
89 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.WHEEL_SCROLL_DISTANCE_STEP, new Tizen.NUI.PropertyValue((Vector2)newValue));
92 defaultValueCreator: (bindable) =>
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);
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) =>
103 var scrollView = (ScrollView)bindable;
104 if (newValue != null)
106 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_POSITION, new Tizen.NUI.PropertyValue((Vector2)newValue));
109 defaultValueCreator: (bindable) =>
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);
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) =>
120 var scrollView = (ScrollView)bindable;
121 if (newValue != null)
123 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_PRE_POSITION, new Tizen.NUI.PropertyValue((Vector2)newValue));
126 defaultValueCreator: (bindable) =>
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);
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) =>
137 var scrollView = (ScrollView)bindable;
138 if (newValue != null)
140 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_PRE_POSITION_MAX, new Tizen.NUI.PropertyValue((Vector2)newValue));
143 defaultValueCreator: (bindable) =>
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);
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) =>
154 var scrollView = (ScrollView)bindable;
155 if (newValue != null)
157 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_X, new Tizen.NUI.PropertyValue((float)newValue));
160 defaultValueCreator: (bindable) =>
162 var scrollView = (ScrollView)bindable;
164 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_X).Get(out temp);
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) =>
171 var scrollView = (ScrollView)bindable;
172 if (newValue != null)
174 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_Y, new Tizen.NUI.PropertyValue((float)newValue));
177 defaultValueCreator: (bindable) =>
179 var scrollView = (ScrollView)bindable;
181 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.OVERSHOOT_Y).Get(out temp);
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) =>
188 var scrollView = (ScrollView)bindable;
189 if (newValue != null)
191 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_FINAL, new Tizen.NUI.PropertyValue((Vector2)newValue));
194 defaultValueCreator: (bindable) =>
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);
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) =>
205 var scrollView = (ScrollView)bindable;
206 if (newValue != null)
208 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP, new Tizen.NUI.PropertyValue((bool)newValue));
211 defaultValueCreator: (bindable) =>
213 var scrollView = (ScrollView)bindable;
215 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.WRAP).Get(out temp);
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) =>
222 var scrollView = (ScrollView)bindable;
223 if (newValue != null)
225 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING, new Tizen.NUI.PropertyValue((bool)newValue));
228 defaultValueCreator: (bindable) =>
230 var scrollView = (ScrollView)bindable;
232 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.PANNING).Get(out temp);
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) =>
239 var scrollView = (ScrollView)bindable;
240 if (newValue != null)
242 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLLING, new Tizen.NUI.PropertyValue((bool)newValue));
245 defaultValueCreator: (bindable) =>
247 var scrollView = (ScrollView)bindable;
249 Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLLING).Get(out temp);
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) =>
256 var scrollView = (ScrollView)bindable;
257 if (newValue != null)
259 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_DOMAIN_SIZE, new Tizen.NUI.PropertyValue((Vector2)newValue));
262 defaultValueCreator: (bindable) =>
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);
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) =>
273 var scrollView = (ScrollView)bindable;
274 if (newValue != null)
276 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_DOMAIN_OFFSET, new Tizen.NUI.PropertyValue((Vector2)newValue));
279 defaultValueCreator: (bindable) =>
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);
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) =>
290 var scrollView = (ScrollView)bindable;
291 if (newValue != null)
293 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_POSITION_DELTA, new Tizen.NUI.PropertyValue((Vector2)newValue));
296 defaultValueCreator: (bindable) =>
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);
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) =>
307 var scrollView = (ScrollView)bindable;
308 if (newValue != null)
310 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.START_PAGE_POSITION, new Tizen.NUI.PropertyValue((Vector3)newValue));
313 defaultValueCreator: (bindable) =>
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);
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) =>
324 var scrollView = (ScrollView)bindable;
325 if (newValue != null)
327 Tizen.NUI.Object.SetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_MODE, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
330 defaultValueCreator: (bindable) =>
332 var scrollView = (ScrollView)bindable;
333 PropertyValue value = Tizen.NUI.Object.GetProperty(scrollView.swigCPtr, ScrollView.Property.SCROLL_MODE);
334 PropertyMap map = new PropertyMap();
339 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
341 private DaliEventHandler<object, SnapStartedEventArgs> _scrollViewSnapStartedEventHandler;
342 private SnapStartedCallbackDelegate _scrollViewSnapStartedCallbackDelegate;
345 /// Create an instance of ScrollView.
347 /// <since_tizen> 3 </since_tizen>
348 public ScrollView() : this(Interop.ScrollView.ScrollView_New(), true)
350 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
353 internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.ScrollView.ScrollView_SWIGUpcast(cPtr), cMemoryOwn)
355 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
358 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
359 private delegate void SnapStartedCallbackDelegate(IntPtr data);
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).
366 /// <since_tizen> 3 </since_tizen>
367 public event DaliEventHandler<object, SnapStartedEventArgs> SnapStarted
373 // Restricted to only one listener
374 if (_scrollViewSnapStartedEventHandler == null)
376 _scrollViewSnapStartedEventHandler += value;
378 _scrollViewSnapStartedCallbackDelegate = new SnapStartedCallbackDelegate(OnSnapStarted);
379 this.SnapStartedSignal().Connect(_scrollViewSnapStartedCallbackDelegate);
388 if (_scrollViewSnapStartedEventHandler != null)
390 this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate);
393 _scrollViewSnapStartedEventHandler -= value;
399 /// Sets and Gets WrapEnabled property.
401 /// <since_tizen> 3 </since_tizen>
402 public bool WrapEnabled
406 return (bool)GetValue(WrapEnabledProperty);
410 SetValue(WrapEnabledProperty, value);
415 /// Sets and Gets PanningEnabled property.
417 /// <since_tizen> 3 </since_tizen>
418 public bool PanningEnabled
422 return (bool)GetValue(PanningEnabledProperty);
426 SetValue(PanningEnabledProperty, value);
431 /// Sets and Gets AxisAutoLockEnabled property.
433 /// <since_tizen> 3 </since_tizen>
434 public bool AxisAutoLockEnabled
438 return (bool)GetValue(AxisAutoLockEnabledProperty);
442 SetValue(AxisAutoLockEnabledProperty, value);
447 /// Sets and Gets WheelScrollDistanceStep property.
449 /// <since_tizen> 3 </since_tizen>
450 public Vector2 WheelScrollDistanceStep
454 return (Vector2)GetValue(WheelScrollDistanceStepProperty);
458 SetValue(WheelScrollDistanceStepProperty, value);
463 /// Sets and Gets ScrollPosition property.
465 /// <since_tizen> 3 </since_tizen>
466 public Vector2 ScrollPosition
470 return (Vector2)GetValue(ScrollPositionProperty);
474 SetValue(ScrollPositionProperty, value);
479 /// Sets and Gets ScrollPrePosition property.
481 /// <since_tizen> 3 </since_tizen>
482 public Vector2 ScrollPrePosition
486 return (Vector2)GetValue(ScrollPrePositionProperty);
490 SetValue(ScrollPrePositionProperty, value);
495 /// Sets and Gets ScrollPrePositionMax property.
497 /// <since_tizen> 3 </since_tizen>
498 public Vector2 ScrollPrePositionMax
502 return (Vector2)GetValue(ScrollPrePositionMaxProperty);
506 SetValue(ScrollPrePositionMaxProperty, value);
511 /// Sets and Gets OvershootX property.
513 /// <since_tizen> 3 </since_tizen>
514 public float OvershootX
518 return (float)GetValue(OvershootXProperty);
522 SetValue(OvershootXProperty, value);
527 /// Sets and Gets OvershootY property.
529 /// <since_tizen> 3 </since_tizen>
530 public float OvershootY
534 return (float)GetValue(OvershootYProperty);
538 SetValue(OvershootYProperty, value);
543 /// Sets and Gets ScrollFinal property.
545 /// <since_tizen> 3 </since_tizen>
546 public Vector2 ScrollFinal
550 return (Vector2)GetValue(ScrollFinalProperty);
554 SetValue(ScrollFinalProperty, value);
559 /// Sets and Gets Wrap property.
561 /// <since_tizen> 3 </since_tizen>
566 return (bool)GetValue(WrapProperty);
570 SetValue(WrapProperty, value);
575 /// Sets and Gets Panning property.
577 /// <since_tizen> 3 </since_tizen>
582 return (bool)GetValue(PanningProperty);
586 SetValue(PanningProperty, value);
591 /// Sets and Gets Scrolling property.
593 /// <since_tizen> 3 </since_tizen>
594 public bool Scrolling
598 return (bool)GetValue(ScrollingProperty);
602 SetValue(ScrollingProperty, value);
607 /// Sets and Gets ScrollDomainSize property.
609 /// <since_tizen> 3 </since_tizen>
610 public Vector2 ScrollDomainSize
614 return (Vector2)GetValue(ScrollDomainSizeProperty);
618 SetValue(ScrollDomainSizeProperty, value);
623 /// Sets and Gets ScrollDomainOffset property.
625 /// <since_tizen> 3 </since_tizen>
626 public Vector2 ScrollDomainOffset
630 return (Vector2)GetValue(ScrollDomainOffsetProperty);
634 SetValue(ScrollDomainOffsetProperty, value);
639 /// Sets and Gets ScrollPositionDelta property.
641 /// <since_tizen> 3 </since_tizen>
642 public Vector2 ScrollPositionDelta
646 return (Vector2)GetValue(ScrollPositionDeltaProperty);
650 SetValue(ScrollPositionDeltaProperty, value);
655 /// Sets and Gets StartPagePosition property.
657 /// <since_tizen> 3 </since_tizen>
658 public Vector3 StartPagePosition
662 return (Vector3)GetValue(StartPagePositionProperty);
666 SetValue(StartPagePositionProperty, value);
672 /// Sets and Gets ScrollMode property.
674 /// <since_tizen> 3 </since_tizen>
675 public PropertyMap ScrollMode
679 return (PropertyMap)GetValue(ScrollModeProperty);
683 SetValue(ScrollModeProperty, value);
688 /// Gets snap-animation's AlphaFunction.
690 /// <returns>Current easing alpha function of the snap animation.</returns>
691 /// <since_tizen> 3 </since_tizen>
692 public AlphaFunction GetScrollSnapAlphaFunction()
694 AlphaFunction ret = new AlphaFunction(Interop.ScrollView.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true);
695 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
700 /// Sets snap-animation's AlphaFunction.
702 /// <param name="alpha">Easing alpha function of the snap animation.</param>
703 /// <since_tizen> 3 </since_tizen>
704 public void SetScrollSnapAlphaFunction(AlphaFunction alpha)
706 Interop.ScrollView.ScrollView_SetScrollSnapAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
707 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
711 /// Gets flick-animation's AlphaFunction.
713 /// <returns>Current easing alpha function of the flick animation.</returns>
714 /// <since_tizen> 3 </since_tizen>
715 public AlphaFunction GetScrollFlickAlphaFunction()
717 AlphaFunction ret = new AlphaFunction(Interop.ScrollView.ScrollView_GetScrollFlickAlphaFunction(swigCPtr), true);
718 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
723 /// Sets flick-animation's AlphaFunction.
725 /// <param name="alpha">Easing alpha function of the flick animation.</param>
726 /// <since_tizen> 3 </since_tizen>
727 public void SetScrollFlickAlphaFunction(AlphaFunction alpha)
729 Interop.ScrollView.ScrollView_SetScrollFlickAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
730 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
734 /// Gets the time for the scroll snap-animation.
736 /// <returns>The time in seconds for the animation to take.</returns>
737 /// <since_tizen> 3 </since_tizen>
738 public float GetScrollSnapDuration()
740 float ret = Interop.ScrollView.ScrollView_GetScrollSnapDuration(swigCPtr);
741 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
746 /// Sets the time for the scroll snap-animation.
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)
752 Interop.ScrollView.ScrollView_SetScrollSnapDuration(swigCPtr, time);
753 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
757 /// Gets the time for the scroll flick-animation.
759 /// <returns>The time in seconds for the animation to take.</returns>
760 /// <since_tizen> 3 </since_tizen>
761 public float GetScrollFlickDuration()
763 float ret = Interop.ScrollView.ScrollView_GetScrollFlickDuration(swigCPtr);
764 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
769 /// Sets the time for the scroll snap-animation.
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)
775 Interop.ScrollView.ScrollView_SetScrollFlickDuration(swigCPtr, time);
776 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
780 /// Sets scroll sensibility of pan gesture.
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)
786 Interop.ScrollView.ScrollView_SetScrollSensitive(swigCPtr, sensitive);
787 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
791 /// Sets maximum overshoot amount.
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)
798 Interop.ScrollView.ScrollView_SetMaxOvershoot(swigCPtr, overshootX, overshootY);
799 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
803 /// Sets Snap Overshoot animation's AlphaFunction.
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)
809 Interop.ScrollView.ScrollView_SetSnapOvershootAlphaFunction(swigCPtr, AlphaFunction.getCPtr(alpha));
810 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
814 /// Sets Snap Overshoot animation's Duration.
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)
820 Interop.ScrollView.ScrollView_SetSnapOvershootDuration(swigCPtr, duration);
821 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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).
829 /// <param name="enable">Enables (true), or disables (false) Actor AutoSnap.</param>
830 /// <since_tizen> 3 </since_tizen>
831 public void SetViewAutoSnap(bool enable)
833 Interop.ScrollView.ScrollView_SetActorAutoSnap(swigCPtr, enable);
834 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
838 /// Enables or Disables Wrap mode for ScrollView contents.<br />
839 /// When enabled, the ScrollView contents are wrapped over the X/Y Domain.
841 /// <param name="enable">Enables (true), or disables (false) Wrap Mode.</param>
842 /// <since_tizen> 3 </since_tizen>
843 public void SetWrapMode(bool enable)
845 Interop.ScrollView.ScrollView_SetWrapMode(swigCPtr, enable);
846 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
850 /// Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted.
852 /// <returns>Current scroll update distance.</returns>
853 /// <since_tizen> 3 </since_tizen>
854 public int GetScrollUpdateDistance()
856 int ret = Interop.ScrollView.ScrollView_GetScrollUpdateDistance(swigCPtr);
857 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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 />
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)
870 Interop.ScrollView.ScrollView_SetScrollUpdateDistance(swigCPtr, distance);
871 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
875 /// Returns state of Axis Auto Lock mode.
877 /// <returns>Whether Axis Auto Lock mode has been enabled or not.</returns>
878 /// <since_tizen> 3 </since_tizen>
879 public bool GetAxisAutoLock()
881 bool ret = Interop.ScrollView.ScrollView_GetAxisAutoLock(swigCPtr);
882 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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.
892 /// <param name="enable">Enables (true), or disables (false) AxisAutoLock mode.</param>
893 /// <since_tizen> 3 </since_tizen>
894 public void SetAxisAutoLock(bool enable)
896 Interop.ScrollView.ScrollView_SetAxisAutoLock(swigCPtr, enable);
897 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
901 /// Gets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.
903 /// <returns>The gradient, a value between 0.0 and 1.0f.</returns>
904 /// <since_tizen> 3 </since_tizen>
905 public float GetAxisAutoLockGradient()
907 float ret = Interop.ScrollView.ScrollView_GetAxisAutoLockGradient(swigCPtr);
908 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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 />
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)
920 Interop.ScrollView.ScrollView_SetAxisAutoLockGradient(swigCPtr, gradient);
921 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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 )
928 /// <returns>Friction coefficient is returned.</returns>
929 /// <since_tizen> 3 </since_tizen>
930 public float GetFrictionCoefficient()
932 float ret = Interop.ScrollView.ScrollView_GetFrictionCoefficient(swigCPtr);
933 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
938 /// Sets the friction coefficient for ScrollView when flicking.<br />
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)
944 Interop.ScrollView.ScrollView_SetFrictionCoefficient(swigCPtr, friction);
945 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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.
952 /// <returns>The flick speed coefficient is returned.</returns>
953 /// <since_tizen> 3 </since_tizen>
954 public float GetFlickSpeedCoefficient()
956 float ret = Interop.ScrollView.ScrollView_GetFlickSpeedCoefficient(swigCPtr);
957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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 />
966 /// <param name="speed">The flick speed coefficient (default = 1.0).</param>
967 /// <since_tizen> 3 </since_tizen>
968 public void SetFlickSpeedCoefficient(float speed)
970 Interop.ScrollView.ScrollView_SetFlickSpeedCoefficient(swigCPtr, speed);
971 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
975 /// Gets the minimum pan distance required for a flick gesture in pixels.<br />
977 /// <returns>Minimum pan distance vector with separate x and y distance.</returns>
978 /// <since_tizen> 3 </since_tizen>
979 public Vector2 GetMinimumDistanceForFlick()
981 Vector2 ret = new Vector2(Interop.ScrollView.ScrollView_GetMinimumDistanceForFlick(swigCPtr), true);
982 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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.
990 /// <param name="distance">The flick speed coefficient (default = 1.0).</param>
991 /// <since_tizen> 3 </since_tizen>
992 public void SetMinimumDistanceForFlick(Vector2 distance)
994 Interop.ScrollView.ScrollView_SetMinimumDistanceForFlick(swigCPtr, Vector2.getCPtr(distance));
995 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
999 /// Returns the minimum pan speed required for a flick gesture in pixels per second.
1001 /// <returns>Minimum pan speed.</returns>
1002 /// <since_tizen> 3 </since_tizen>
1003 public float GetMinimumSpeedForFlick()
1005 float ret = Interop.ScrollView.ScrollView_GetMinimumSpeedForFlick(swigCPtr);
1006 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1011 /// Sets the minimum pan speed required for a flick in pixels per second.<br />
1013 /// <param name="speed">The minimum pan speed for a flick.</param>
1014 /// <since_tizen> 3 </since_tizen>
1015 public void SetMinimumSpeedForFlick(float speed)
1017 Interop.ScrollView.ScrollView_SetMinimumSpeedForFlick(swigCPtr, speed);
1018 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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.
1025 /// <returns>Maximum flick speed is returned.</returns>
1026 /// <since_tizen> 3 </since_tizen>
1027 public float GetMaxFlickSpeed()
1029 float ret = Interop.ScrollView.ScrollView_GetMaxFlickSpeed(swigCPtr);
1030 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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 />
1038 /// <param name="speed">Maximum flick speed (default = 3.0).</param>
1039 /// <since_tizen> 3 </since_tizen>
1040 public void SetMaxFlickSpeed(float speed)
1042 Interop.ScrollView.ScrollView_SetMaxFlickSpeed(swigCPtr, speed);
1043 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1047 /// Gets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.<br />
1049 /// <returns>The step of scroll distance(pixel) in X and Y axes.</returns>
1050 /// <since_tizen> 3 </since_tizen>
1051 public Vector2 GetWheelScrollDistanceStep()
1053 Vector2 ret = new Vector2(Interop.ScrollView.ScrollView_GetWheelScrollDistanceStep(swigCPtr), true);
1054 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1059 /// Sets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.<br />
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)
1065 Interop.ScrollView.ScrollView_SetWheelScrollDistanceStep(swigCPtr, Vector2.getCPtr(step));
1066 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1070 /// Retrieves current scroll position.<br />
1072 /// <returns>The current scroll position.</returns>
1073 /// <since_tizen> 3 </since_tizen>
1074 public Vector2 GetCurrentScrollPosition()
1076 Vector2 ret = new Vector2(Interop.ScrollView.ScrollView_GetCurrentScrollPosition(swigCPtr), true);
1077 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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.
1085 /// <returns>The current scroll position.</returns>
1086 /// <since_tizen> 3 </since_tizen>
1087 public uint GetCurrentPage()
1089 uint ret = Interop.ScrollView.ScrollView_GetCurrentPage(swigCPtr);
1090 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1095 /// Scrolls View to position specified (contents will scroll to this position).
1097 /// <param name="position">The position to scroll to.</param>
1098 /// <since_tizen> 3 </since_tizen>
1099 public void ScrollTo(Vector2 position)
1101 Interop.ScrollView.ScrollView_ScrollTo__SWIG_0(swigCPtr, Vector2.getCPtr(position));
1102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1106 /// Scrolls View to position specified (contents will scroll to this position).
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)
1113 Interop.ScrollView.ScrollView_ScrollTo__SWIG_1(swigCPtr, Vector2.getCPtr(position), duration);
1114 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1118 /// Scrolls View to position specified (contents will scroll to this position).
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)
1126 Interop.ScrollView.ScrollView_ScrollTo__SWIG_2(swigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha));
1127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1131 /// Scrolls View to position specified (contents will scroll to this position).
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)
1140 Interop.ScrollView.ScrollView_ScrollTo__SWIG_3(swigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias);
1141 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1145 /// Scrolls View to position specified (contents will scroll to this position).
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)
1155 Interop.ScrollView.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();
1160 /// Scrolls View to position specified (contents will scroll to this position).
1162 /// <param name="page">The page to scroll to.</param>
1163 /// <since_tizen> 3 </since_tizen>
1164 public void ScrollTo(uint page)
1166 Interop.ScrollView.ScrollView_ScrollTo__SWIG_5(swigCPtr, page);
1167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1171 /// Scrolls View to position specified (contents will scroll to this position).
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)
1178 Interop.ScrollView.ScrollView_ScrollTo__SWIG_6(swigCPtr, page, duration);
1179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1183 /// Scrolls View to position specified (contents will scroll to this position).
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)
1191 Interop.ScrollView.ScrollView_ScrollTo__SWIG_7(swigCPtr, page, duration, (int)bias);
1192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1196 /// Scrolls View to position specified (contents will scroll to this position).
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)
1202 Interop.ScrollView.ScrollView_ScrollTo__SWIG_8(swigCPtr, View.getCPtr(view));
1203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1207 /// Scrolls View to position specified (contents will scroll to this position).
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)
1214 Interop.ScrollView.ScrollView_ScrollTo__SWIG_9(swigCPtr, View.getCPtr(view), duration);
1215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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 />
1222 /// <returns>True if Snapping necessary.</returns>
1223 /// <since_tizen> 3 </since_tizen>
1224 public bool ScrollToSnapPoint()
1226 bool ret = Interop.ScrollView.ScrollView_ScrollToSnapPoint(swigCPtr);
1227 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1232 /// Applies Effect to ScrollView.
1234 /// <param name="effect">The effect to apply to scroll view.</param>
1235 /// <since_tizen> 3 </since_tizen>
1236 public void ApplyEffect(ScrollViewEffect effect)
1238 Interop.ScrollView.ScrollView_ApplyEffect(swigCPtr, ScrollViewEffect.getCPtr(effect));
1239 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1243 /// Removes Effect from ScrollView.
1245 /// <param name="effect">The effect to remove.</param>
1246 /// <since_tizen> 3 </since_tizen>
1247 public void RemoveEffect(ScrollViewEffect effect)
1249 Interop.ScrollView.ScrollView_RemoveEffect(swigCPtr, ScrollViewEffect.getCPtr(effect));
1250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1254 /// Remove All Effects from ScrollView.
1256 /// <since_tizen> 3 </since_tizen>
1257 public void RemoveAllEffects()
1259 Interop.ScrollView.ScrollView_RemoveAllEffects(swigCPtr);
1260 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1264 /// Binds view to this ScrollView.
1265 /// Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
1267 /// <param name="child">The view to add to this ScrollView.</param>
1268 /// <since_tizen> 3 </since_tizen>
1269 public void BindView(View child)
1271 Interop.ScrollView.ScrollView_BindActor(swigCPtr, View.getCPtr(child));
1272 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1276 /// Unbinds view to this ScrollView.
1277 /// Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
1279 /// <param name="child">The view to remove to this ScrollView.</param>
1280 /// <since_tizen> 3 </since_tizen>
1281 public void UnbindView(View child)
1283 Interop.ScrollView.ScrollView_UnbindActor(swigCPtr, View.getCPtr(child));
1284 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1288 /// Allows the user to constrain the scroll view in a particular direction.
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)
1295 Interop.ScrollView.ScrollView_SetScrollingDirection__SWIG_0(swigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold));
1296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1300 /// Allows the user to constrain the scroll view in a particular direction.
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)
1306 Interop.ScrollView.ScrollView_SetScrollingDirection__SWIG_1(swigCPtr, Radian.getCPtr(direction));
1307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1311 /// Removes a direction constraint from the scroll view.
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)
1317 Interop.ScrollView.ScrollView_RemoveScrollingDirection(swigCPtr, Radian.getCPtr(direction));
1318 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1324 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
1325 [EditorBrowsable(EditorBrowsableState.Never)]
1326 public void SetRulerX(RulerPtr ruler)
1328 Interop.ScrollView.ScrollView_SetRulerX(swigCPtr, RulerPtr.getCPtr(ruler));
1334 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
1335 [EditorBrowsable(EditorBrowsableState.Never)]
1336 public void SetRulerY(RulerPtr ruler)
1338 Interop.ScrollView.ScrollView_SetRulerY(swigCPtr, RulerPtr.getCPtr(ruler));
1341 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollView obj)
1343 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1346 internal void ApplyConstraintToChildren(SWIGTYPE_p_Dali__Constraint constraint)
1348 Interop.ScrollView.ScrollView_ApplyConstraintToChildren(swigCPtr, SWIGTYPE_p_Dali__Constraint.getCPtr(constraint));
1349 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1352 internal ScrollViewSnapStartedSignal SnapStartedSignal()
1354 ScrollViewSnapStartedSignal ret = new ScrollViewSnapStartedSignal(Interop.ScrollView.ScrollView_SnapStartedSignal(swigCPtr), false);
1355 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1362 /// <param name="type">the dispose type</param>
1363 /// <since_tizen> 3 </since_tizen>
1364 protected override void Dispose(DisposeTypes type)
1371 //Release your own unmanaged resources here.
1372 //You should not access any managed member here except static instance.
1373 //because the execution order of Finalizes is non-deterministic.
1375 if (this != null && _scrollViewSnapStartedCallbackDelegate != null)
1377 this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate);
1380 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1384 swigCMemOwn = false;
1385 Interop.ScrollView.delete_ScrollView(swigCPtr);
1387 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1393 // Callback for ScrollView SnapStarted signal
1394 private void OnSnapStarted(IntPtr data)
1396 SnapStartedEventArgs e = new SnapStartedEventArgs();
1398 // Populate all members of "e" (SnapStartedEventArgs) with real data
1399 e.SnapEventInfo = SnapEvent.GetSnapEventFromPtr(data);
1401 if (_scrollViewSnapStartedEventHandler != null)
1403 //here we send all data to user event handlers
1404 _scrollViewSnapStartedEventHandler(this, e);
1409 /// This should be internal, please do not use.
1411 /// <since_tizen> 3 </since_tizen>
1412 [EditorBrowsable(EditorBrowsableState.Never)]
1413 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1414 public new class Property
1417 /// This should be internal, please do not use.
1419 /// <since_tizen> 3 </since_tizen>
1420 [EditorBrowsable(EditorBrowsableState.Never)]
1421 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1422 public static readonly int WRAP_ENABLED = Interop.ScrollView.ScrollView_Property_WRAP_ENABLED_get();
1424 /// This should be internal, please do not use.
1426 /// <since_tizen> 3 </since_tizen>
1427 [EditorBrowsable(EditorBrowsableState.Never)]
1428 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1429 public static readonly int PANNING_ENABLED = Interop.ScrollView.ScrollView_Property_PANNING_ENABLED_get();
1431 /// This should be internal, please do not use.
1433 /// <since_tizen> 3 </since_tizen>
1434 [EditorBrowsable(EditorBrowsableState.Never)]
1435 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1436 public static readonly int AXIS_AUTO_LOCK_ENABLED = Interop.ScrollView.ScrollView_Property_AXIS_AUTO_LOCK_ENABLED_get();
1438 /// This should be internal, please do not use.
1440 /// <since_tizen> 3 </since_tizen>
1441 [EditorBrowsable(EditorBrowsableState.Never)]
1442 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1443 public static readonly int WHEEL_SCROLL_DISTANCE_STEP = Interop.ScrollView.ScrollView_Property_WHEEL_SCROLL_DISTANCE_STEP_get();
1445 /// This should be internal, please do not use.
1447 /// <since_tizen> 3 </since_tizen>
1448 [EditorBrowsable(EditorBrowsableState.Never)]
1449 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1450 public static readonly int SCROLL_MODE = Interop.ScrollView.ScrollView_Property_SCROLL_MODE_get();
1452 /// This should be internal, please do not use.
1454 /// <since_tizen> 3 </since_tizen>
1455 [EditorBrowsable(EditorBrowsableState.Never)]
1456 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1457 public static readonly int SCROLL_POSITION = Interop.ScrollView.ScrollView_Property_SCROLL_POSITION_get();
1459 /// This should be internal, please do not use.
1461 /// <since_tizen> 3 </since_tizen>
1462 [EditorBrowsable(EditorBrowsableState.Never)]
1463 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1464 public static readonly int SCROLL_PRE_POSITION = Interop.ScrollView.ScrollView_Property_SCROLL_PRE_POSITION_get();
1466 /// This should be internal, please do not use.
1468 /// <since_tizen> 3 </since_tizen>
1469 [EditorBrowsable(EditorBrowsableState.Never)]
1470 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1471 public static readonly int SCROLL_PRE_POSITION_X = Interop.ScrollView.ScrollView_Property_SCROLL_PRE_POSITION_X_get();
1473 /// This should be internal, please do not use.
1475 /// <since_tizen> 3 </since_tizen>
1476 [EditorBrowsable(EditorBrowsableState.Never)]
1477 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1478 public static readonly int SCROLL_PRE_POSITION_Y = Interop.ScrollView.ScrollView_Property_SCROLL_PRE_POSITION_Y_get();
1480 /// This should be internal, please do not use.
1482 /// <since_tizen> 3 </since_tizen>
1483 [EditorBrowsable(EditorBrowsableState.Never)]
1484 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1485 public static readonly int SCROLL_PRE_POSITION_MAX = Interop.ScrollView.ScrollView_Property_SCROLL_PRE_POSITION_MAX_get();
1487 /// This should be internal, please do not use.
1489 /// <since_tizen> 3 </since_tizen>
1490 [EditorBrowsable(EditorBrowsableState.Never)]
1491 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1492 public static readonly int SCROLL_PRE_POSITION_MAX_X = Interop.ScrollView.ScrollView_Property_SCROLL_PRE_POSITION_MAX_X_get();
1494 /// This should be internal, please do not use.
1496 /// <since_tizen> 3 </since_tizen>
1497 [EditorBrowsable(EditorBrowsableState.Never)]
1498 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1499 public static readonly int SCROLL_PRE_POSITION_MAX_Y = Interop.ScrollView.ScrollView_Property_SCROLL_PRE_POSITION_MAX_Y_get();
1501 /// This should be internal, please do not use.
1503 /// <since_tizen> 3 </since_tizen>
1504 [EditorBrowsable(EditorBrowsableState.Never)]
1505 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1506 public static readonly int OVERSHOOT_X = Interop.ScrollView.ScrollView_Property_OVERSHOOT_X_get();
1508 /// This should be internal, please do not use.
1510 /// <since_tizen> 3 </since_tizen>
1511 [EditorBrowsable(EditorBrowsableState.Never)]
1512 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1513 public static readonly int OVERSHOOT_Y = Interop.ScrollView.ScrollView_Property_OVERSHOOT_Y_get();
1515 /// This should be internal, please do not use.
1517 /// <since_tizen> 3 </since_tizen>
1518 [EditorBrowsable(EditorBrowsableState.Never)]
1519 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1520 public static readonly int SCROLL_FINAL = Interop.ScrollView.ScrollView_Property_SCROLL_FINAL_get();
1522 /// This should be internal, please do not use.
1524 /// <since_tizen> 3 </since_tizen>
1525 [EditorBrowsable(EditorBrowsableState.Never)]
1526 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1527 public static readonly int SCROLL_FINAL_X = Interop.ScrollView.ScrollView_Property_SCROLL_FINAL_X_get();
1529 /// This should be internal, please do not use.
1531 /// <since_tizen> 3 </since_tizen>
1532 [EditorBrowsable(EditorBrowsableState.Never)]
1533 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1534 public static readonly int SCROLL_FINAL_Y = Interop.ScrollView.ScrollView_Property_SCROLL_FINAL_Y_get();
1536 /// This should be internal, please do not use.
1538 /// <since_tizen> 3 </since_tizen>
1539 [EditorBrowsable(EditorBrowsableState.Never)]
1540 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1541 public static readonly int WRAP = Interop.ScrollView.ScrollView_Property_WRAP_get();
1543 /// This should be internal, please do not use.
1545 /// <since_tizen> 3 </since_tizen>
1546 [EditorBrowsable(EditorBrowsableState.Never)]
1547 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1548 public static readonly int PANNING = Interop.ScrollView.ScrollView_Property_PANNING_get();
1550 /// This should be internal, please do not use.
1552 /// <since_tizen> 3 </since_tizen>
1553 [EditorBrowsable(EditorBrowsableState.Never)]
1554 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1555 public static readonly int SCROLLING = Interop.ScrollView.ScrollView_Property_SCROLLING_get();
1557 /// This should be internal, please do not use.
1559 /// <since_tizen> 3 </since_tizen>
1560 [EditorBrowsable(EditorBrowsableState.Never)]
1561 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1562 public static readonly int SCROLL_DOMAIN_SIZE = Interop.ScrollView.ScrollView_Property_SCROLL_DOMAIN_SIZE_get();
1564 /// This should be internal, please do not use.
1566 /// <since_tizen> 3 </since_tizen>
1567 [EditorBrowsable(EditorBrowsableState.Never)]
1568 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1569 public static readonly int SCROLL_DOMAIN_SIZE_X = Interop.ScrollView.ScrollView_Property_SCROLL_DOMAIN_SIZE_X_get();
1571 /// This should be internal, please do not use.
1573 /// <since_tizen> 3 </since_tizen>
1574 [EditorBrowsable(EditorBrowsableState.Never)]
1575 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1576 public static readonly int SCROLL_DOMAIN_SIZE_Y = Interop.ScrollView.ScrollView_Property_SCROLL_DOMAIN_SIZE_Y_get();
1578 /// This should be internal, please do not use.
1580 /// <since_tizen> 3 </since_tizen>
1581 [EditorBrowsable(EditorBrowsableState.Never)]
1582 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1583 public static readonly int SCROLL_DOMAIN_OFFSET = Interop.ScrollView.ScrollView_Property_SCROLL_DOMAIN_OFFSET_get();
1585 /// This should be internal, please do not use.
1587 /// <since_tizen> 3 </since_tizen>
1588 [EditorBrowsable(EditorBrowsableState.Never)]
1589 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1590 public static readonly int SCROLL_POSITION_DELTA = Interop.ScrollView.ScrollView_Property_SCROLL_POSITION_DELTA_get();
1592 /// This should be internal, please do not use.
1594 /// <since_tizen> 3 </since_tizen>
1595 [EditorBrowsable(EditorBrowsableState.Never)]
1596 [Obsolete("Deprecated in API6; Will be removed in API9.")]
1597 public static readonly int START_PAGE_POSITION = Interop.ScrollView.ScrollView_Property_START_PAGE_POSITION_get();
1601 /// Snaps signal event's data.
1603 /// <since_tizen> 3 </since_tizen>
1604 public class SnapEvent : global::System.IDisposable
1609 /// <since_tizen> 3 </since_tizen>
1610 protected bool swigCMemOwn;
1613 /// A Flat to check if it is already disposed.
1616 /// <since_tizen> 3 </since_tizen>
1617 protected bool disposed = false;
1619 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
1621 //A Flag to check who called Dispose(). (By User or DisposeQueue)
1622 private bool isDisposeQueued = false;
1625 /// Create an instance of SnapEvent.
1627 /// <since_tizen> 3 </since_tizen>
1628 public SnapEvent() : this(Interop.ScrollView.new_ScrollView_SnapEvent(), true)
1630 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1633 internal SnapEvent(global::System.IntPtr cPtr, bool cMemoryOwn)
1635 swigCMemOwn = cMemoryOwn;
1636 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
1642 /// <since_tizen> 3 </since_tizen>
1645 if (!isDisposeQueued)
1647 isDisposeQueued = true;
1648 DisposeQueue.Instance.Add(this);
1653 /// Scroll position.
1655 /// <since_tizen> 3 </since_tizen>
1656 public Vector2 position
1660 Interop.ScrollView.ScrollView_SnapEvent_position_set(swigCPtr, Vector2.getCPtr(value));
1661 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1665 global::System.IntPtr cPtr = Interop.ScrollView.ScrollView_SnapEvent_position_get(swigCPtr);
1666 Vector2 ret = (cPtr == global::System.IntPtr.Zero) ? null : new Vector2(cPtr, false);
1667 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1673 /// Scroll duration.
1675 /// <since_tizen> 3 </since_tizen>
1676 public float duration
1680 Interop.ScrollView.ScrollView_SnapEvent_duration_set(swigCPtr, value);
1681 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1685 float ret = Interop.ScrollView.ScrollView_SnapEvent_duration_get(swigCPtr);
1686 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1691 internal SnapType type
1695 Interop.ScrollView.ScrollView_SnapEvent_type_set(swigCPtr, (int)value);
1696 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1700 SnapType ret = (SnapType)Interop.ScrollView.ScrollView_SnapEvent_type_get(swigCPtr);
1701 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1707 /// Get SnapEvent From Ptr
1709 /// <since_tizen> 3 </since_tizen>
1710 public static SnapEvent GetSnapEventFromPtr(global::System.IntPtr cPtr)
1712 SnapEvent ret = new SnapEvent(cPtr, false);
1713 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1720 /// <since_tizen> 3 </since_tizen>
1721 public void Dispose()
1723 //Throw excpetion if Dispose() is called in separate thread.
1724 if (!Window.IsInstalled())
1726 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
1729 if (isDisposeQueued)
1731 Dispose(DisposeTypes.Implicit);
1735 Dispose(DisposeTypes.Explicit);
1736 System.GC.SuppressFinalize(this);
1740 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SnapEvent obj)
1742 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
1748 /// <param name="type">the dispose type</param>
1749 /// <since_tizen> 3 </since_tizen>
1750 protected virtual void Dispose(DisposeTypes type)
1757 if (type == DisposeTypes.Explicit)
1760 //Release your own managed resources here.
1761 //You should release all of your own disposable objects here.
1765 //Release your own unmanaged resources here.
1766 //You should not access any managed member here except static instance.
1767 //because the execution order of Finalizes is non-deterministic.
1769 if (swigCPtr.Handle != global::System.IntPtr.Zero)
1773 swigCMemOwn = false;
1774 Interop.ScrollView.delete_ScrollView_SnapEvent(swigCPtr);
1776 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
1784 /// Event arguments that passed via the SnapStarted signal.
1786 /// <since_tizen> 3 </since_tizen>
1787 public class SnapStartedEventArgs : EventArgs
1789 private Tizen.NUI.ScrollView.SnapEvent _snapEvent;
1792 /// SnapEventInfo is the SnapEvent information like snap or flick (it tells the target position, scale, rotation for the snap or flick).
1794 /// <since_tizen> 3 </since_tizen>
1795 public Tizen.NUI.ScrollView.SnapEvent SnapEventInfo