2 * Copyright(c) 2021 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 Tizen.NUI.BaseComponents;
24 /// ScrollView contains views that can be scrolled manually (via touch).
26 [EditorBrowsable(EditorBrowsableState.Never)]
27 public partial class ScrollView : Scrollable
31 /// Create an instance of ScrollView.
33 [EditorBrowsable(EditorBrowsableState.Never)]
34 public ScrollView() : this(Interop.ScrollView.New(), true)
36 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39 internal ScrollView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
44 /// Sets and Gets WrapEnabled property.
46 [EditorBrowsable(EditorBrowsableState.Never)]
47 public bool WrapEnabled
51 return (bool)GetValue(WrapEnabledProperty);
55 SetValue(WrapEnabledProperty, value);
60 /// Sets and Gets PanningEnabled property.
62 [EditorBrowsable(EditorBrowsableState.Never)]
63 public bool PanningEnabled
67 return (bool)GetValue(PanningEnabledProperty);
71 SetValue(PanningEnabledProperty, value);
76 /// Sets and Gets AxisAutoLockEnabled property.
78 [EditorBrowsable(EditorBrowsableState.Never)]
79 public bool AxisAutoLockEnabled
83 return (bool)GetValue(AxisAutoLockEnabledProperty);
87 SetValue(AxisAutoLockEnabledProperty, value);
92 /// Sets and Gets WheelScrollDistanceStep property.
94 [EditorBrowsable(EditorBrowsableState.Never)]
95 public Vector2 WheelScrollDistanceStep
99 return (Vector2)GetValue(WheelScrollDistanceStepProperty);
103 SetValue(WheelScrollDistanceStepProperty, value);
108 /// Sets and Gets ScrollPosition property.
110 [EditorBrowsable(EditorBrowsableState.Never)]
111 public Vector2 ScrollPosition
115 return (Vector2)GetValue(ScrollPositionProperty);
119 SetValue(ScrollPositionProperty, value);
124 /// Sets and Gets ScrollPrePosition property.
126 [EditorBrowsable(EditorBrowsableState.Never)]
127 public Vector2 ScrollPrePosition
131 return (Vector2)GetValue(ScrollPrePositionProperty);
135 SetValue(ScrollPrePositionProperty, value);
140 /// Sets and Gets ScrollPrePositionMax property.
142 [EditorBrowsable(EditorBrowsableState.Never)]
143 public Vector2 ScrollPrePositionMax
147 return (Vector2)GetValue(ScrollPrePositionMaxProperty);
151 SetValue(ScrollPrePositionMaxProperty, value);
156 /// Sets and Gets OvershootX property.
158 [EditorBrowsable(EditorBrowsableState.Never)]
159 public float OvershootX
163 return (float)GetValue(OvershootXProperty);
167 SetValue(OvershootXProperty, value);
172 /// Sets and Gets OvershootY property.
174 [EditorBrowsable(EditorBrowsableState.Never)]
175 public float OvershootY
179 return (float)GetValue(OvershootYProperty);
183 SetValue(OvershootYProperty, value);
188 /// Sets and Gets ScrollFinal property.
190 [EditorBrowsable(EditorBrowsableState.Never)]
191 public Vector2 ScrollFinal
195 return (Vector2)GetValue(ScrollFinalProperty);
199 SetValue(ScrollFinalProperty, value);
204 /// Sets and Gets Wrap property.
206 [EditorBrowsable(EditorBrowsableState.Never)]
211 return (bool)GetValue(WrapProperty);
215 SetValue(WrapProperty, value);
220 /// Sets and Gets Panning property.
222 [EditorBrowsable(EditorBrowsableState.Never)]
227 return (bool)GetValue(PanningProperty);
231 SetValue(PanningProperty, value);
236 /// Sets and Gets Scrolling property.
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public bool Scrolling
243 return (bool)GetValue(ScrollingProperty);
247 SetValue(ScrollingProperty, value);
252 /// Sets and Gets ScrollDomainSize property.
254 [EditorBrowsable(EditorBrowsableState.Never)]
255 public Vector2 ScrollDomainSize
259 return (Vector2)GetValue(ScrollDomainSizeProperty);
263 SetValue(ScrollDomainSizeProperty, value);
268 /// Sets and Gets ScrollDomainOffset property.
270 [EditorBrowsable(EditorBrowsableState.Never)]
271 public Vector2 ScrollDomainOffset
275 return (Vector2)GetValue(ScrollDomainOffsetProperty);
279 SetValue(ScrollDomainOffsetProperty, value);
284 /// Sets and Gets ScrollPositionDelta property.
286 [EditorBrowsable(EditorBrowsableState.Never)]
287 public Vector2 ScrollPositionDelta
291 return (Vector2)GetValue(ScrollPositionDeltaProperty);
295 SetValue(ScrollPositionDeltaProperty, value);
300 /// Sets and Gets StartPagePosition property.
302 [EditorBrowsable(EditorBrowsableState.Never)]
303 public Vector3 StartPagePosition
307 return (Vector3)GetValue(StartPagePositionProperty);
311 SetValue(StartPagePositionProperty, value);
317 /// Sets and Gets ScrollMode property.
319 [EditorBrowsable(EditorBrowsableState.Never)]
320 public PropertyMap ScrollMode
324 return (PropertyMap)GetValue(ScrollModeProperty);
328 SetValue(ScrollModeProperty, value);
333 /// Gets snap-animation's AlphaFunction.
335 /// <returns>Current easing alpha function of the snap animation.</returns>
336 [EditorBrowsable(EditorBrowsableState.Never)]
337 public AlphaFunction GetScrollSnapAlphaFunction()
339 AlphaFunction ret = new AlphaFunction(Interop.ScrollView.GetScrollSnapAlphaFunction(SwigCPtr), true);
340 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 /// Sets snap-animation's AlphaFunction.
347 /// <param name="alpha">Easing alpha function of the snap animation.</param>
348 [EditorBrowsable(EditorBrowsableState.Never)]
349 public void SetScrollSnapAlphaFunction(AlphaFunction alpha)
351 Interop.ScrollView.SetScrollSnapAlphaFunction(SwigCPtr, AlphaFunction.getCPtr(alpha));
352 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356 /// Gets flick-animation's AlphaFunction.
358 /// <returns>Current easing alpha function of the flick animation.</returns>
359 [EditorBrowsable(EditorBrowsableState.Never)]
360 public AlphaFunction GetScrollFlickAlphaFunction()
362 AlphaFunction ret = new AlphaFunction(Interop.ScrollView.GetScrollFlickAlphaFunction(SwigCPtr), true);
363 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368 /// Sets flick-animation's AlphaFunction.
370 /// <param name="alpha">Easing alpha function of the flick animation.</param>
371 [EditorBrowsable(EditorBrowsableState.Never)]
372 public void SetScrollFlickAlphaFunction(AlphaFunction alpha)
374 Interop.ScrollView.SetScrollFlickAlphaFunction(SwigCPtr, AlphaFunction.getCPtr(alpha));
375 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
379 /// Gets the time for the scroll snap-animation.
381 /// <returns>The time in seconds for the animation to take.</returns>
382 [EditorBrowsable(EditorBrowsableState.Never)]
383 public float GetScrollSnapDuration()
385 float ret = Interop.ScrollView.GetScrollSnapDuration(SwigCPtr);
386 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
391 /// Sets the time for the scroll snap-animation.
393 /// <param name="time">The time in seconds for the animation to take.</param>
394 [EditorBrowsable(EditorBrowsableState.Never)]
395 public void SetScrollSnapDuration(float time)
397 Interop.ScrollView.SetScrollSnapDuration(SwigCPtr, time);
398 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402 /// Gets the time for the scroll flick-animation.
404 /// <returns>The time in seconds for the animation to take.</returns>
405 [EditorBrowsable(EditorBrowsableState.Never)]
406 public float GetScrollFlickDuration()
408 float ret = Interop.ScrollView.GetScrollFlickDuration(SwigCPtr);
409 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
414 /// Sets the time for the scroll snap-animation.
416 /// <param name="time">The time in seconds for the animation to take.</param>
417 [EditorBrowsable(EditorBrowsableState.Never)]
418 public void SetScrollFlickDuration(float time)
420 Interop.ScrollView.SetScrollFlickDuration(SwigCPtr, time);
421 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
425 /// Sets scroll sensibility of pan gesture.
427 /// <param name="sensitive">True to enable scroll, false to disable scrolling.</param>
428 [EditorBrowsable(EditorBrowsableState.Never)]
429 public void SetScrollSensitive(bool sensitive)
431 Interop.ScrollView.SetScrollSensitive(SwigCPtr, sensitive);
432 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
436 /// Sets maximum overshoot amount.
438 /// <param name="overshootX">The maximum number of horizontally scrolled pixels before overshoot X reaches 1.0f.</param>
439 /// <param name="overshootY">The maximum number of vertically scrolled pixels before overshoot X reaches 1.0f.</param>
440 [EditorBrowsable(EditorBrowsableState.Never)]
441 public void SetMaxOvershoot(float overshootX, float overshootY)
443 Interop.ScrollView.SetMaxOvershoot(SwigCPtr, overshootX, overshootY);
444 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
448 /// Sets Snap Overshoot animation's AlphaFunction.
450 /// <param name="alpha">Easing alpha function of the overshoot snap animation.</param>
451 [EditorBrowsable(EditorBrowsableState.Never)]
452 public void SetSnapOvershootAlphaFunction(AlphaFunction alpha)
454 Interop.ScrollView.SetSnapOvershootAlphaFunction(SwigCPtr, AlphaFunction.getCPtr(alpha));
455 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
459 /// Sets Snap Overshoot animation's Duration.
461 /// <param name="duration">duration The duration of the overshoot snap animation.</param>
462 [EditorBrowsable(EditorBrowsableState.Never)]
463 public void SetSnapOvershootDuration(float duration)
465 Interop.ScrollView.SetSnapOvershootDuration(SwigCPtr, duration);
466 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
470 /// Enables or Disables Actor Auto-Snap mode.<br />
471 /// When Actor Auto-Snap mode has been enabled, ScrollView will automatically,
472 /// snap to the closest actor (The closest actor will appear in the center of the ScrollView).
474 /// <param name="enable">Enables (true), or disables (false) Actor AutoSnap.</param>
475 [EditorBrowsable(EditorBrowsableState.Never)]
476 public void SetViewAutoSnap(bool enable)
478 Interop.ScrollView.SetActorAutoSnap(SwigCPtr, enable);
479 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
483 /// Enables or Disables Wrap mode for ScrollView contents.<br />
484 /// When enabled, the ScrollView contents are wrapped over the X/Y Domain.
486 /// <param name="enable">Enables (true), or disables (false) Wrap Mode.</param>
487 [EditorBrowsable(EditorBrowsableState.Never)]
488 public void SetWrapMode(bool enable)
490 Interop.ScrollView.SetWrapMode(SwigCPtr, enable);
491 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
495 /// Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted.
497 /// <returns>Current scroll update distance.</returns>
498 [EditorBrowsable(EditorBrowsableState.Never)]
499 public int GetScrollUpdateDistance()
501 int ret = Interop.ScrollView.GetScrollUpdateDistance(SwigCPtr);
502 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
507 /// Sets the distance needed to scroll for ScrollUpdatedSignal to be emitted.<br />
508 /// The scroll update distance tells ScrollView how far to move before ScrollUpdatedSignal the informs application.<br />
509 /// Each time the ScrollView crosses this distance the signal will be emitted.<br />
511 /// <param name="distance">The distance for ScrollView to move before emitting update signal.</param>
512 [EditorBrowsable(EditorBrowsableState.Never)]
513 public void SetScrollUpdateDistance(int distance)
515 Interop.ScrollView.SetScrollUpdateDistance(SwigCPtr, distance);
516 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
520 /// Returns state of Axis Auto Lock mode.
522 /// <returns>Whether Axis Auto Lock mode has been enabled or not.</returns>
523 [EditorBrowsable(EditorBrowsableState.Never)]
524 public bool GetAxisAutoLock()
526 bool ret = Interop.ScrollView.GetAxisAutoLock(SwigCPtr);
527 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
532 /// Enables or Disables Axis Auto Lock mode for panning within the ScrollView.<br />
533 /// When enabled, any pan gesture that appears mostly horizontal or mostly
534 /// vertical, will be automatically restricted to horizontal only or vertical
535 /// only panning, until the pan gesture has completed.
537 /// <param name="enable">Enables (true), or disables (false) AxisAutoLock mode.</param>
538 [EditorBrowsable(EditorBrowsableState.Never)]
539 public void SetAxisAutoLock(bool enable)
541 Interop.ScrollView.SetAxisAutoLock(SwigCPtr, enable);
542 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
546 /// Gets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.
548 /// <returns>The gradient, a value between 0.0 and 1.0f.</returns>
549 [EditorBrowsable(EditorBrowsableState.Never)]
550 public float GetAxisAutoLockGradient()
552 float ret = Interop.ScrollView.GetAxisAutoLockGradient(SwigCPtr);
553 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
558 /// Sets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.<br />
559 /// 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 />
561 /// <param name="gradient">gradient A value between 0.0 and 1.0 (auto-lock for all angles).</param>
562 [EditorBrowsable(EditorBrowsableState.Never)]
563 public void SetAxisAutoLockGradient(float gradient)
565 Interop.ScrollView.SetAxisAutoLockGradient(SwigCPtr, gradient);
566 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
570 /// Gets the friction coefficient setting for ScrollView when flicking in free panning mode.
571 /// This is a value in stage-diagonals per second^2, stage-diagonal = Length( stage.width, stage.height )
573 /// <returns>Friction coefficient is returned.</returns>
574 [EditorBrowsable(EditorBrowsableState.Never)]
575 public float GetFrictionCoefficient()
577 float ret = Interop.ScrollView.GetFrictionCoefficient(SwigCPtr);
578 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
583 /// Sets the friction coefficient for ScrollView when flicking.<br />
585 /// <param name="friction">Friction coefficient must be greater than 0.0 (default = 1.0).</param>
586 [EditorBrowsable(EditorBrowsableState.Never)]
587 public void SetFrictionCoefficient(float friction)
589 Interop.ScrollView.SetFrictionCoefficient(SwigCPtr, friction);
590 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
594 /// Gets the flick speed coefficient for ScrollView when flicking in free panning mode.<br />
595 /// This is a constant which multiplies the input touch flick velocity to determine the actual velocity at which to move the scrolling area.
597 /// <returns>The flick speed coefficient is returned.</returns>
598 [EditorBrowsable(EditorBrowsableState.Never)]
599 public float GetFlickSpeedCoefficient()
601 float ret = Interop.ScrollView.GetFlickSpeedCoefficient(SwigCPtr);
602 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
607 /// Sets the flick speed coefficient for ScrollView when flicking in free panning mode.<br />
608 /// This is a constant which multiplies the input touch flick velocity to determine the actual velocity at
609 /// which to move the scrolling area.<br />
611 /// <param name="speed">The flick speed coefficient (default = 1.0).</param>
612 [EditorBrowsable(EditorBrowsableState.Never)]
613 public void SetFlickSpeedCoefficient(float speed)
615 Interop.ScrollView.SetFlickSpeedCoefficient(SwigCPtr, speed);
616 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
620 /// Gets the minimum pan distance required for a flick gesture in pixels.<br />
622 /// <returns>Minimum pan distance vector with separate x and y distance.</returns>
623 [EditorBrowsable(EditorBrowsableState.Never)]
624 public Vector2 GetMinimumDistanceForFlick()
626 Vector2 ret = new Vector2(Interop.ScrollView.GetMinimumDistanceForFlick(SwigCPtr), true);
627 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
632 /// Sets the minimum pan distance required for a flick in pixels.<br />
633 /// 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.
635 /// <param name="distance">The flick speed coefficient (default = 1.0).</param>
636 [EditorBrowsable(EditorBrowsableState.Never)]
637 public void SetMinimumDistanceForFlick(Vector2 distance)
639 Interop.ScrollView.SetMinimumDistanceForFlick(SwigCPtr, Vector2.getCPtr(distance));
640 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
644 /// Returns the minimum pan speed required for a flick gesture in pixels per second.
646 /// <returns>Minimum pan speed.</returns>
647 [EditorBrowsable(EditorBrowsableState.Never)]
648 public float GetMinimumSpeedForFlick()
650 float ret = Interop.ScrollView.GetMinimumSpeedForFlick(SwigCPtr);
651 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
656 /// Sets the minimum pan speed required for a flick in pixels per second.<br />
658 /// <param name="speed">The minimum pan speed for a flick.</param>
659 [EditorBrowsable(EditorBrowsableState.Never)]
660 public void SetMinimumSpeedForFlick(float speed)
662 Interop.ScrollView.SetMinimumSpeedForFlick(SwigCPtr, speed);
663 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
667 /// Gets the maximum flick speed setting for ScrollView when flicking in free panning mode.<br />
668 /// This is a value in stage-diagonals per second.
670 /// <returns>Maximum flick speed is returned.</returns>
671 [EditorBrowsable(EditorBrowsableState.Never)]
672 public float GetMaxFlickSpeed()
674 float ret = Interop.ScrollView.GetMaxFlickSpeed(SwigCPtr);
675 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
680 /// Sets the maximum flick speed for the ScrollView when flicking in free panning mode.<br />
681 /// This is a value in stage-diagonals per second. stage-diagonal = Length( stage.width, stage.height ).<br />
683 /// <param name="speed">Maximum flick speed (default = 3.0).</param>
684 [EditorBrowsable(EditorBrowsableState.Never)]
685 public void SetMaxFlickSpeed(float speed)
687 Interop.ScrollView.SetMaxFlickSpeed(SwigCPtr, speed);
688 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
692 /// Retrieves current scroll position.<br />
694 /// <returns>The current scroll position.</returns>
695 [EditorBrowsable(EditorBrowsableState.Never)]
696 public Vector2 GetCurrentScrollPosition()
698 Vector2 ret = new Vector2(Interop.ScrollView.GetCurrentScrollPosition(SwigCPtr), true);
699 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
704 /// Retrieves current scroll page based on ScrollView dimensions being the size of one page, and all pages laid out in<br />
705 /// a grid fashion, increasing from left to right until the end of the X-domain.
707 /// <returns>The current scroll position.</returns>
708 [EditorBrowsable(EditorBrowsableState.Never)]
709 public uint GetCurrentPage()
711 uint ret = Interop.ScrollView.GetCurrentPage(SwigCPtr);
712 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
717 /// Scrolls View to position specified (contents will scroll to this position).
719 /// <param name="position">The position to scroll to.</param>
720 [EditorBrowsable(EditorBrowsableState.Never)]
721 public void ScrollTo(Vector2 position)
723 Interop.ScrollView.ScrollToVector2(SwigCPtr, Vector2.getCPtr(position));
724 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
728 /// Scrolls View to position specified (contents will scroll to this position).
730 /// <param name="position">The position to scroll to.</param>
731 /// <param name="duration">The duration of the animation in seconds.</param>
732 [EditorBrowsable(EditorBrowsableState.Never)]
733 public void ScrollTo(Vector2 position, float duration)
735 Interop.ScrollView.ScrollTo(SwigCPtr, Vector2.getCPtr(position), duration);
736 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
740 /// Scrolls View to position specified (contents will scroll to this position).
742 /// <param name="position">The position to scroll to.</param>
743 /// <param name="duration">The duration of the animation in seconds.</param>
744 /// <param name="alpha">The alpha function to use.</param>
745 [EditorBrowsable(EditorBrowsableState.Never)]
746 public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha)
748 Interop.ScrollView.ScrollTo(SwigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha));
749 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
753 /// Scrolls View to position specified (contents will scroll to this position).
755 /// <param name="position">The position to scroll to.</param>
756 /// <param name="duration">The duration of the animation in seconds.</param>
757 /// <param name="horizontalBias">Whether to bias scrolling to left or right.</param>
758 /// <param name="verticalBias">Whether to bias scrolling to top or bottom.</param>
759 [EditorBrowsable(EditorBrowsableState.Never)]
760 public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias)
762 Interop.ScrollView.ScrollTo(SwigCPtr, Vector2.getCPtr(position), duration, (int)horizontalBias, (int)verticalBias);
763 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
767 /// Scrolls View to position specified (contents will scroll to this position).
769 /// <param name="position">The position to scroll to.</param>
770 /// <param name="duration">The duration of the animation in seconds.</param>
771 /// <param name="alpha">Alpha function to use.</param>
772 /// <param name="horizontalBias">Whether to bias scrolling to left or right.</param>
773 /// <param name="verticalBias">Whether to bias scrolling to top or bottom.</param>
774 [EditorBrowsable(EditorBrowsableState.Never)]
775 public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias)
777 Interop.ScrollView.ScrollTo(SwigCPtr, Vector2.getCPtr(position), duration, AlphaFunction.getCPtr(alpha), (int)horizontalBias, (int)verticalBias);
778 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
782 /// Scrolls View to position specified (contents will scroll to this position).
784 /// <param name="page">The page to scroll to.</param>
785 [EditorBrowsable(EditorBrowsableState.Never)]
786 public void ScrollTo(uint page)
788 Interop.ScrollView.ScrollTo(SwigCPtr, page);
789 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
793 /// Scrolls View to position specified (contents will scroll to this position).
795 /// <param name="page">The page to scroll to.</param>
796 /// <param name="duration">The duration of the animation in seconds.</param>
797 [EditorBrowsable(EditorBrowsableState.Never)]
798 public void ScrollTo(uint page, float duration)
800 Interop.ScrollView.ScrollTo(SwigCPtr, page, duration);
801 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
805 /// Scrolls View to position specified (contents will scroll to this position).
807 /// <param name="page">The page to scroll to.</param>
808 /// <param name="duration">The duration of the animation in seconds.</param>
809 /// <param name="bias">Whether to bias scrolling to left or right.</param>
810 [EditorBrowsable(EditorBrowsableState.Never)]
811 public void ScrollTo(uint page, float duration, DirectionBias bias)
813 Interop.ScrollView.ScrollTo(SwigCPtr, page, duration, (int)bias);
814 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
818 /// Scrolls View to position specified (contents will scroll to this position).
820 /// <param name="view">The view to center in on (via Scrolling).</param>
821 [EditorBrowsable(EditorBrowsableState.Never)]
822 public void ScrollTo(View view)
824 Interop.ScrollView.ScrollToView(SwigCPtr, View.getCPtr(view));
825 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
829 /// Scrolls View to position specified (contents will scroll to this position).
831 /// <param name="view">The view to center in on (via Scrolling).</param>
832 /// <param name="duration">The duration of the animation in seconds.</param>
833 [EditorBrowsable(EditorBrowsableState.Never)]
834 public void ScrollTo(View view, float duration)
836 Interop.ScrollView.ScrollToViewDuration(SwigCPtr, View.getCPtr(view), duration);
837 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
841 /// Scrolls View to the nearest snap points as specified by the Rulers.<br />
842 /// If already at snap points, then will return false, and not scroll.<br />
844 /// <returns>True if Snapping necessary.</returns>
845 [EditorBrowsable(EditorBrowsableState.Never)]
846 public bool ScrollToSnapPoint()
848 bool ret = Interop.ScrollView.ScrollToSnapPoint(SwigCPtr);
849 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
854 /// Applies Effect to ScrollView.
856 /// <param name="effect">The effect to apply to scroll view.</param>
857 [EditorBrowsable(EditorBrowsableState.Never)]
858 public void ApplyEffect(ScrollViewEffect effect)
860 Interop.ScrollView.ApplyEffect(SwigCPtr, ScrollViewEffect.getCPtr(effect));
861 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
865 /// Removes Effect from ScrollView.
867 /// <param name="effect">The effect to remove.</param>
868 [EditorBrowsable(EditorBrowsableState.Never)]
869 public void RemoveEffect(ScrollViewEffect effect)
871 Interop.ScrollView.RemoveEffect(SwigCPtr, ScrollViewEffect.getCPtr(effect));
872 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
876 /// Remove All Effects from ScrollView.
878 [EditorBrowsable(EditorBrowsableState.Never)]
879 public void RemoveAllEffects()
881 Interop.ScrollView.RemoveAllEffects(SwigCPtr);
882 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
886 /// Binds view to this ScrollView.
887 /// Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
889 /// <param name="child">The view to add to this ScrollView.</param>
890 [EditorBrowsable(EditorBrowsableState.Never)]
891 public void BindView(View child)
893 Interop.ScrollView.BindActor(SwigCPtr, View.getCPtr(child));
894 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
898 /// Unbinds view to this ScrollView.
899 /// Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
901 /// <param name="child">The view to remove to this ScrollView.</param>
902 [EditorBrowsable(EditorBrowsableState.Never)]
903 public void UnbindView(View child)
905 Interop.ScrollView.UnbindActor(SwigCPtr, View.getCPtr(child));
906 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
910 /// Allows the user to constrain the scroll view in a particular direction.
912 /// <param name="direction">The axis to constrain the scroll-view to.</param>
913 /// <param name="threshold">The threshold to apply around the axis.</param>
914 [EditorBrowsable(EditorBrowsableState.Never)]
915 public void SetScrollingDirection(Radian direction, Radian threshold)
917 Interop.ScrollView.SetScrollingDirection(SwigCPtr, Radian.getCPtr(direction), Radian.getCPtr(threshold));
918 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
922 /// Allows the user to constrain the scroll view in a particular direction.
924 /// <param name="direction">The axis to constrain the scroll-view to.</param>
925 [EditorBrowsable(EditorBrowsableState.Never)]
926 public void SetScrollingDirection(Radian direction)
928 Interop.ScrollView.SetScrollingDirection(SwigCPtr, Radian.getCPtr(direction));
929 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
933 /// Removes a direction constraint from the scroll view.
935 /// <param name="direction">The axis to constrain the scroll-view to.</param>
936 [EditorBrowsable(EditorBrowsableState.Never)]
937 public void RemoveScrollingDirection(Radian direction)
939 Interop.ScrollView.RemoveScrollingDirection(SwigCPtr, Radian.getCPtr(direction));
940 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
946 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
947 [EditorBrowsable(EditorBrowsableState.Never)]
948 public void SetRulerX(RulerPtr ruler)
950 Interop.ScrollView.SetRulerX(SwigCPtr, RulerPtr.getCPtr(ruler));
956 /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
957 [EditorBrowsable(EditorBrowsableState.Never)]
958 public void SetRulerY(RulerPtr ruler)
960 Interop.ScrollView.SetRulerY(SwigCPtr, RulerPtr.getCPtr(ruler));
963 internal void ApplyConstraintToChildren(Constraint constraint)
965 Interop.ScrollView.ApplyConstraintToChildren(SwigCPtr, constraint.SwigCPtr);
966 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
972 /// <param name="type">the dispose type</param>
973 [EditorBrowsable(EditorBrowsableState.Never)]
974 protected override void Dispose(DisposeTypes type)
981 //Release your own unmanaged resources here.
982 //You should not access any managed member here except static instance.
983 //because the execution order of Finalizes is non-deterministic.
985 if (this != null && scrollViewSnapStartedCallbackDelegate != null)
987 ScrollViewSnapStartedSignal snapStarted = this.SnapStartedSignal();
988 snapStarted?.Disconnect(scrollViewSnapStartedCallbackDelegate);
989 snapStarted?.Dispose();
995 /// This will not be public opened.
996 [EditorBrowsable(EditorBrowsableState.Never)]
997 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
999 Interop.ScrollView.DeleteScrollView(swigCPtr);
1003 /// This should be internal, do not use.
1005 [EditorBrowsable(EditorBrowsableState.Never)]
1006 #pragma warning disable CA1716, CA1052, CA1034 // Identifiers should not match keywords
1007 public new class Property
1008 #pragma warning restore CA1716, CA1052, CA1034 // Identifiers should not match keywords
1011 /// This should be internal, do not use.
1013 [EditorBrowsable(EditorBrowsableState.Never)]
1014 public static readonly int WrapEnabled = Interop.ScrollView.WrapEnabledGet();
1016 /// This should be internal, do not use.
1018 [EditorBrowsable(EditorBrowsableState.Never)]
1019 public static readonly int PanningEnabled = Interop.ScrollView.PanningEnabledGet();
1021 /// This should be internal, do not use.
1023 [EditorBrowsable(EditorBrowsableState.Never)]
1024 public static readonly int AxisAutoLockEnabled = Interop.ScrollView.AxisAutoLockEnabledGet();
1026 /// This should be internal, do not use.
1028 [EditorBrowsable(EditorBrowsableState.Never)]
1029 public static readonly int WheelScrollDistanceStep = Interop.ScrollView.WheelScrollDistanceStepGet();
1031 /// This should be internal, do not use.
1033 [EditorBrowsable(EditorBrowsableState.Never)]
1034 public static readonly int ScrollMode = Interop.ScrollView.ScrollModeGet();
1036 /// This should be internal, do not use.
1038 [EditorBrowsable(EditorBrowsableState.Never)]
1039 public static readonly int ScrollPosition = Interop.ScrollView.ScrollPositionGet();
1041 /// This should be internal, do not use.
1043 [EditorBrowsable(EditorBrowsableState.Never)]
1044 public static readonly int ScrollPrePosition = Interop.ScrollView.ScrollPrePositionGet();
1046 /// This should be internal, do not use.
1048 [EditorBrowsable(EditorBrowsableState.Never)]
1049 public static readonly int ScrollPrePositionX = Interop.ScrollView.ScrollPrePositionXGet();
1051 /// This should be internal, do not use.
1053 [EditorBrowsable(EditorBrowsableState.Never)]
1054 public static readonly int ScrollPrePositionY = Interop.ScrollView.ScrollPrePositionYGet();
1056 /// This should be internal, do not use.
1058 [EditorBrowsable(EditorBrowsableState.Never)]
1059 public static readonly int ScrollPrePositionMax = Interop.ScrollView.ScrollPrePositionMaxGet();
1061 /// This should be internal, do not use.
1063 [EditorBrowsable(EditorBrowsableState.Never)]
1064 public static readonly int ScrollPrePositionMaxX = Interop.ScrollView.ScrollPrePositionMaxXGet();
1066 /// This should be internal, do not use.
1068 [EditorBrowsable(EditorBrowsableState.Never)]
1069 public static readonly int ScrollPrePositionMaxY = Interop.ScrollView.ScrollPrePositionMaxYGet();
1071 /// This should be internal, do not use.
1073 [EditorBrowsable(EditorBrowsableState.Never)]
1074 public static readonly int OvershootX = Interop.ScrollView.OvershootXGet();
1076 /// This should be internal, do not use.
1078 [EditorBrowsable(EditorBrowsableState.Never)]
1079 public static readonly int OvershootY = Interop.ScrollView.OvershootYGet();
1081 /// This should be internal, do not use.
1083 [EditorBrowsable(EditorBrowsableState.Never)]
1084 public static readonly int ScrollFinal = Interop.ScrollView.ScrollFinalGet();
1086 /// This should be internal, do not use.
1088 [EditorBrowsable(EditorBrowsableState.Never)]
1089 public static readonly int ScrollFinalX = Interop.ScrollView.ScrollFinalXGet();
1091 /// This should be internal, do not use.
1093 [EditorBrowsable(EditorBrowsableState.Never)]
1094 public static readonly int ScrollFinalY = Interop.ScrollView.ScrollFinalYGet();
1096 /// This should be internal, do not use.
1098 [EditorBrowsable(EditorBrowsableState.Never)]
1099 public static readonly int WRAP = Interop.ScrollView.WrapGet();
1101 /// This should be internal, do not use.
1103 [EditorBrowsable(EditorBrowsableState.Never)]
1104 public static readonly int PANNING = Interop.ScrollView.PanningGet();
1106 /// This should be internal, do not use.
1108 [EditorBrowsable(EditorBrowsableState.Never)]
1109 public static readonly int SCROLLING = Interop.ScrollView.ScrollingGet();
1111 /// This should be internal, do not use.
1113 [EditorBrowsable(EditorBrowsableState.Never)]
1114 public static readonly int ScrollDomainSize = Interop.ScrollView.ScrollDomainSizeGet();
1116 /// This should be internal, do not use.
1118 [EditorBrowsable(EditorBrowsableState.Never)]
1119 public static readonly int ScrollDomainSizeX = Interop.ScrollView.ScrollDomainSizeXGet();
1121 /// This should be internal, do not use.
1123 [EditorBrowsable(EditorBrowsableState.Never)]
1124 public static readonly int ScrollDomainSizeY = Interop.ScrollView.ScrollDomainSizeYGet();
1126 /// This should be internal, do not use.
1128 [EditorBrowsable(EditorBrowsableState.Never)]
1129 public static readonly int ScrollDomainOffset = Interop.ScrollView.ScrollDomainOffsetGet();
1131 /// This should be internal, do not use.
1133 [EditorBrowsable(EditorBrowsableState.Never)]
1134 public static readonly int ScrollPositionDelta = Interop.ScrollView.ScrollPositionDeltaGet();
1136 /// This should be internal, do not use.
1138 [EditorBrowsable(EditorBrowsableState.Never)]
1139 public static readonly int StartPagePosition = Interop.ScrollView.StartPagePositionGet();