Renaming of enum values for coding standards compliance.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / scroll-view / scroll-view.h
1 #ifndef DALI_TOOLKIT_SCROLL_VIEW_H
2 #define DALI_TOOLKIT_SCROLL_VIEW_H
3
4 /*
5  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/animation/alpha-function.h>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 namespace Internal DALI_INTERNAL
34 {
35 class ScrollView;
36 }
37 /**
38  * @addtogroup dali_toolkit_controls_scroll_view
39  * @{
40  */
41
42 /**
43  * @brief Enumeration for how axes/rotation or scale are clamped.
44  * @SINCE_1_0.0
45  */
46 enum ClampState
47 {
48   NOT_CLAMPED,   ///< The quantity isn't clamped @SINCE_1_9.28
49   CLAMPED_TO_MIN, ///< The quantity is clamped to the min value @SINCE_1_9.28
50   CLAMPED_TO_MAX  ///< The quantity is clamped to the max value @SINCE_1_9.28
51 };
52
53 /**
54  * @brief A 2 dimensional clamp.
55  * @SINCE_1_0.0
56  */
57 struct ClampState2D
58 {
59   ClampState x; ///< The clamp state of the x axis
60   ClampState y; ///< The clamp state of the y axis
61 };
62
63 /**
64  * @brief Enumeration for the snap type.
65  * @SINCE_1_0.0
66  */
67 enum SnapType
68 {
69   SNAP,  ///< SNAP @SINCE_1_9.28
70   FLICK  ///< FLICK @SINCE_1_9.28
71 };
72
73 /**
74  * @brief Enumeration for DirectionBias types.
75  * @SINCE_1_0.0
76  */
77 enum DirectionBias
78 {
79   DIRECTION_BIAS_LEFT  = -1,  ///< Bias scroll snap to Left @SINCE_1_9.28
80   DIRECTION_BIAS_NONE  =  0,  ///< Don't bias scroll snap @SINCE_1_9.28
81   DIRECTION_BIAS_RIGHT =  1   ///< Bias scroll snap to Right @SINCE_1_9.28
82 };
83
84 /**
85  * @brief Used for specifying minimum/maximum extents of a ruler.
86  * @SINCE_1_0.0
87  */
88 class DALI_TOOLKIT_API RulerDomain
89 {
90 public:
91
92   /**
93    * @brief Creates Ruler domain allowing a point to traverse between min and max extents.
94    *
95    * @SINCE_1_0.0
96    * @param[in] min Minimum extent (point cannot traverse less than this)
97    * @param[in] max Maximum extent (point cannot traverse greater than this)
98    * @param[in] enabled Whether domain has been enabled or not
99    */
100   explicit RulerDomain(float min, float max, bool enabled = true);
101
102 public:
103
104   float min;    ///< Minimum extent (point cannot traverse less than this)
105   float max;    ///< Maximum extent (point cannot traverse greater than this)
106   bool enabled; ///< Whether domain has been enabled or not.
107
108   /**
109    * @brief Clamps value (x) from (min) to (max).
110    *
111    * An optional length parameter can be specified to suggest that the
112    * subject is not a point but a line to that should be clamped.
113    *
114    * @SINCE_1_0.0
115    * @param[in] x X point to be clamped between (min) and (max) extents
116    * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
117    * @param[in] scale Scaling parameter which treats domain as scaled in calculations
118    * @return The clamped value
119    */
120   float Clamp(float x, float length = 0.0f, float scale = 1.0f) const;
121
122   /**
123    * @brief Clamps value (x) from (min) to (max).
124    *
125    * An optional length parameter can be specified to suggest that the
126    * subject is not a point but a line to that should be clamped.
127    *
128    * @SINCE_1_0.0
129    * @param[in] x X point to be clamped between (min) and (max) extents
130    * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
131    * @param[in] scale Scaling parameter which treats domain as scaled in calculations
132    * @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
133    * @return The clamped value
134    */
135   float Clamp(float x, float length, float scale, ClampState &clamped) const;
136
137   /**
138    * @brief Returns (max-min) size of ruler.
139    *
140    * @SINCE_1_0.0
141    * @return The size of the ruler from min to max
142    */
143   float GetSize() const;
144
145 };
146
147 // Forward declare future extension interface
148 class RulerExtension;
149
150 /**
151  * @brief Abstracts class to define scroll axes.
152  *
153  * It can specify whether they are traversable,
154  * where their snap points are and their domain.
155  * @SINCE_1_0.0
156  */
157 class DALI_TOOLKIT_API Ruler : public RefObject
158 {
159 public:
160   /**
161    * @brief Enumeration for the type of the ruler.
162    * @SINCE_1_0.0
163    */
164   enum RulerType {
165     FIXED,  ///< A fixed ruler @SINCE_1_9.28
166     FREE    ///< A free ruler @SINCE_1_9.28
167   };
168
169 public:
170
171   /**
172    * @brief Constructs ruler, enabled by default, with limitless domain.
173    * @SINCE_1_0.0
174    */
175   Ruler();
176
177   /**
178    * @brief Snaps (x) in accordance to the ruler settings.
179    *
180    * @SINCE_1_0.0
181    * @param[in] x The input value on the ruler to be snapped
182    * @param[in] bias (optional) The biasing employed for snapping
183    * 0 floor input (floor x) "Used for Flick Left"
184    * 0.5 round input (floor x + 0.5) "Used for Release"
185    * 1 ceil input (floor x + 1.0) "Used for Flick Right"
186    * @return The position of the one dimensional point passed in once snapped.
187    */
188   virtual float Snap(float x, float bias = 0.5f) const = 0;
189
190   /**
191    * @brief Returns position from page, based on whatever the ruler
192    * defines as a page.
193    *
194    * If (wrap) is true, then will set volume to the number of
195    * times page has exceeded the domain's volume (volume being the
196    * number of pages within the domain), while wrapping the position
197    * within the domain.
198    *
199    * @SINCE_1_0.0
200    * @param[in] page The page index
201    * @param[out] volume The overflow volume when the page exceeds the domain (wrap must be enabled)
202    * @param[in] wrap Enable wrap mode
203    * @return The position representing this page point
204    */
205   virtual float GetPositionFromPage(unsigned int page, unsigned int &volume, bool wrap) const = 0;
206
207   /**
208    * @brief Returns page from position, based on whatever the ruler
209    * defines as a page.
210    *
211    * If (wrap) is true, then will return a page wrapped within the domain.
212    *
213    * @SINCE_1_0.0
214    * @param[in] position The position on the domain
215    * @param[in] wrap Enable wrap mode
216    * @return The page where this position resides
217    */
218   virtual unsigned int GetPageFromPosition(float position, bool wrap) const = 0;
219
220   /**
221    * @brief Returns the total number of pages within this Ruler.
222    *
223    * @SINCE_1_0.0
224    * @return The number of pages in the Ruler
225    */
226   virtual unsigned int GetTotalPages() const = 0;
227
228   /**
229    * @brief Gets the extension interface of the Ruler.
230    *
231    * @SINCE_1_0.0
232    * @return The extension interface of the Ruler
233    */
234   virtual RulerExtension* GetExtension() { return NULL; }
235
236 public:
237
238   /**
239    * @brief Gets the ruler type.
240    *
241    * @SINCE_1_0.0
242    * @return The ruler type
243    */
244   Ruler::RulerType GetType() const;
245
246   /**
247    * @brief Returns whether this axis has been enabled or not.
248    *
249    * @SINCE_1_0.0
250    * @return true if axis is enabled
251    */
252   bool IsEnabled() const;
253
254   /**
255    * @brief Enables ruler (ruler must be enabled in order to traverse along it).
256    * @SINCE_1_0.0
257    */
258   void Enable();
259
260   /**
261    * @brief Disables ruler.
262    * @SINCE_1_0.0
263    */
264   void Disable();
265
266   /**
267    * @brief Sets the Domain.
268    *
269    * @SINCE_1_0.0
270    * @param[in] domain Ruler domain object
271    */
272   void SetDomain(RulerDomain domain);
273
274   /**
275    * @brief Gets the Domain.
276    *
277    * @SINCE_1_0.0
278    * @return The domain
279    */
280   const RulerDomain &GetDomain() const;
281
282   /**
283    * @brief Disables Domain (minimum/maximum extents for this axis).
284    * @SINCE_1_0.0
285    */
286   void DisableDomain();
287
288   /**
289    * @brief Clamps value (x) from (min) to (max).
290    *
291    * An optional length parameter can be specified to suggest that the
292    * subject is not a point but a line that should be clamped.
293    *
294    * @SINCE_1_0.0
295    * @param[in] x X point to be clamped between (min) and (max) extents
296    * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
297    * @param[in] scale Scaling parameter which treats domain as scaled in calculations
298    * @return The clamped value
299    */
300   float Clamp(float x, float length = 0.0f, float scale = 1.0f) const;
301
302
303   /**
304    * @brief Clamps value (x) from (min) to (max).
305    *
306    * An optional length parameter can be specified to suggest that the
307    * subject is not a point but a line to that should be clamped.
308    *
309    * @SINCE_1_0.0
310    * @param[in] x X point to be clamped between (min) and (max) extents
311    * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
312    * @param[in] scale Scaling parameter which treats domain as scaled in calculations
313    * @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
314    * @return The clamped value
315    */
316   float Clamp(float x, float length, float scale, ClampState &clamped) const;
317
318   /**
319    * @brief Snaps and Clamps (x) in accordance to ruler settings.
320    *
321    * @SINCE_1_0.0
322    * @param[in] x X value to be snapped in accordance to ruler snap value,
323    *            and clamped in accordance to the ruler's domain (if set)
324    * @param[in] bias (optional) The biasing employed for snapping
325    *            0 floor input (floor x) "Used for Flick Left"
326    *            0.5 round input (floor x + 0.5) "Used for Release"
327    *            1 ceil input (floor x + 1.0) "Used for Flick Right"
328    * @param[in] length (optional) The Length of the line from (x) to (x + length)
329    *            to be clamped
330    * @param[in] scale Scaling parameter which treats domain as scaled in calculations
331    * @return The clamped value after snapping
332    */
333   float SnapAndClamp(float x, float bias = 0.5f, float length = 0.0f, float scale = 1.0f) const;
334
335   /**
336    * @brief Snaps and Clamps (x) in accordance to ruler settings.
337    *
338    * @SINCE_1_0.0
339    * @param[in] x X value to be snapped in accordance to ruler snap value,
340    *            and clamped in accordance to the ruler's domain (if set)
341    * @param[in] bias (optional) The biasing employed for snapping
342    * 0 floor input (floor x) "Used for Flick Left"
343    * 0.5 round input (floor x + 0.5) "Used for Release"
344    * 1 ceil input (floor x + 1.0) "Used for Flick Right"
345    * @param[in] length (optional) The Length of the line from (x) to (x + length)
346    * to be clamped
347    * @param[in] scale Scaling parameter which treats domain as scaled in calculations
348    * @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
349    * @return The clamped value after snapping
350    */
351   float SnapAndClamp(float x, float bias, float length, float scale, ClampState &clamped) const;
352
353 protected:
354
355   /**
356    * @brief Destructor - A reference counted object may only be deleted by calling Unreference().
357    * @SINCE_1_0.0
358    */
359   virtual ~Ruler();
360
361 protected:
362
363   RulerType mType;               ///< Type of Ruler (FIXED or FREE).
364   bool mEnabled;                 ///< If the ruler is enabled.
365   RulerDomain mDomain;           ///< The domain of the ruler.
366
367 };
368
369 typedef IntrusivePtr<Ruler> RulerPtr; ///< Pointer to Dali::Toolkit::Ruler object @SINCE_1_0.0
370
371 /**
372  * @brief Concrete implementation of Ruler that has no snapping and has one single page.
373  * @SINCE_1_0.0
374  */
375 class DALI_TOOLKIT_API DefaultRuler : public Ruler
376 {
377 public:
378   /**
379    * @brief DefaultRuler constructor.
380    * @SINCE_1_0.0
381    */
382   DefaultRuler();
383
384   /**
385    * @copydoc Toolkit::Ruler::Snap
386    */
387   virtual float Snap(float x, float bias) const;
388
389   /**
390    * @copydoc Toolkit::Ruler::GetPositionFromPage
391    */
392   virtual float GetPositionFromPage(unsigned int page, unsigned int &volume, bool wrap) const;
393
394   /**
395    * @copydoc Toolkit::Ruler::GetPageFromPosition
396    */
397   virtual unsigned int GetPageFromPosition(float position, bool wrap) const;
398
399   /**
400    * @copydoc Toolkit::Ruler::GetTotalPages
401    */
402   virtual unsigned int GetTotalPages() const;
403 };
404
405 /**
406  * @brief Concrete implementation of Ruler that has fixed snapping.
407  * @SINCE_1_0.0
408  */
409 class DALI_TOOLKIT_API FixedRuler : public Ruler
410 {
411 public:
412   /**
413    * @brief Constructor.
414    *
415    * @SINCE_1_0.0
416    * @param[in] spacing The spacing between each interval on this ruler
417    */
418   FixedRuler(float spacing = 1.0f);
419
420   /**
421    * @copydoc Toolkit::Ruler::Snap
422    */
423   virtual float Snap(float x, float bias) const;
424
425   /**
426    * @copydoc Toolkit::Ruler::GetPositionFromPage
427    */
428   virtual float GetPositionFromPage(unsigned int page, unsigned int &volume, bool wrap) const;
429
430   /**
431    * @copydoc Toolkit::Ruler::GetPageFromPosition
432    */
433   virtual unsigned int GetPageFromPosition(float position, bool wrap) const;
434
435   /**
436    * @copydoc Toolkit::Ruler::GetTotalPages
437    */
438   virtual unsigned int GetTotalPages() const;
439
440 private:
441   float mSpacing; ///< The spacing between each interval
442 };
443
444 class ScrollViewEffect;
445 class ScrollView;
446
447 /**
448  * @brief ScrollView contains actors that can be scrolled manually (via touch)
449  * or automatically.
450  *
451  * Signals
452  * | %Signal Name      | Method                     |
453  * |-------------------|----------------------------|
454  * | snap-started      | @ref SnapStartedSignal()   |
455  * @SINCE_1_0.0
456  */
457 class DALI_TOOLKIT_API ScrollView : public Scrollable
458 {
459
460 public:
461
462   /**
463    * @brief Clamps signal event's data.
464    * @SINCE_1_0.0
465    */
466   struct ClampEvent
467   {
468     ClampState2D scale;       ///< Clamp information for scale axes
469     ClampState2D position;    ///< Clamp information for position axes
470     ClampState   rotation;    ///< Clamp information for rotation
471   };
472
473   /**
474    * @brief Snaps signal event's data.
475    * @SINCE_1_0.0
476    */
477   struct SnapEvent
478   {
479     SnapType type;    ///< Current snap commencing
480     Vector2 position; ///< Target snap position
481     float duration;   ///< Duration of snap animation.
482   };
483
484   /**
485    * @brief Enumeration for the start and end property ranges for this control.
486    * @SINCE_1_0.0
487    */
488   enum PropertyRange
489   {
490     PROPERTY_START_INDEX = Toolkit::Scrollable::PROPERTY_END_INDEX + 1,                        ///< @SINCE_1_1.18
491     PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000,                                        ///< Reserve property indices, @SINCE_1_1.18
492
493     ANIMATABLE_PROPERTY_START_INDEX = Toolkit::Scrollable::ANIMATABLE_PROPERTY_END_INDEX + 1,
494     ANIMATABLE_PROPERTY_END_INDEX   = ANIMATABLE_PROPERTY_START_INDEX + 1000                   ///< Reserve animatable property indices @SINCE_1_0.0
495   };
496
497   /**
498    * @brief Enumeration for the instance of properties belonging to the ScrollView class.
499    * @SINCE_1_0.0
500    */
501   struct Property
502   {
503     /**
504      * @brief Enumeration for the instance of properties belonging to the ScrollView class.
505      * @SINCE_1_0.0
506      */
507     enum
508     {
509       ///////////////////////////////////////////////////////////////////////////////
510       // Event side (non-animatable) properties
511       ///////////////////////////////////////////////////////////////////////////////
512
513       /**
514        * @brief Whether wrapping is enabled.
515        * @details Name "wrapEnabled", type Property::BOOLEAN.
516        * @SINCE_1_1.18
517        * @see SetWrapMode()
518        */
519       WRAP_ENABLED = PROPERTY_START_INDEX,
520
521       /**
522        * @brief Whether panning is enabled.
523        * @details Name "panningEnabled", type Property::BOOLEAN.
524        * @SINCE_1_1.18
525        * @see SetScrollSensitive()
526        */
527       PANNING_ENABLED,
528
529       /**
530        * @brief Whether the Axis Auto Lock mode for panning within the ScrollView is enabled.
531        * @details Name "axisAutoLockEnabled", type Property::BOOLEAN.
532        * @SINCE_1_1.18
533        * @see SetAxisAutoLock()
534        */
535       AXIS_AUTO_LOCK_ENABLED,
536
537       /**
538        * @brief The step of scroll distance in actor coordinates for each wheel event received in free panning mode.
539        * @details Name "wheelScrollDistanceStep", type Property::VECTOR2.
540        * @SINCE_1_1.18
541        * @see SetWheelScrollDistanceStep()
542        */
543       WHEEL_SCROLL_DISTANCE_STEP,
544
545       /**
546        * @brief The scroll mode.
547        * @details Name "scrollMode", type Property::MAP.
548        * The scroll mode map is a frontend for the Ruler helper class, containing the following keys:
549        *
550        * | %Property Name       | Type     | Required | Description                                                                                                                           |
551        * |----------------------|----------|----------|---------------------------------------------------------------------------------------------------------------------------------------|
552        * | xAxisScrollEnabled   | BOOLEAN  | No       | True if the content can be scrolled in X axis or false if not.                                                                        |
553        * | xAxisSnapToInterval  | FLOAT    | No       | When set, causes scroll view to snap to multiples of the value of the interval in the X axis while flicking. (by default no snapping) |
554        * | xAxisScrollBoundary  | FLOAT    | No       | When set, causes scroll view unable to scroll beyond the value of the boundary in the X axis (by default no boundary)                 |
555        * | yAxisScrollEnabled   | BOOLEAN  | No       | True if the content can be scrolled in Y axis or false if not.                                                                        |
556        * | yAxisSnapToInterval  | FLOAT    | No       | When set, causes scroll view to snap to multiples of the value of the interval in the Y axis while flicking. (by default no snapping) |
557        * | yAxisScrollBoundary  | FLOAT    | No       | When set, causes scroll view unable to scroll beyond the value of the boundary in the Y axis (by default no boundary)                 |
558        *
559        * Alternatively, one can use the keys defined in the Dali::Toolkit::ScrollMode::Type enumeration.
560        * @SINCE_1_2.60
561        */
562       SCROLL_MODE,
563
564       ///////////////////////////////////////////////////////////////////////////////
565       // Animatable Properties
566       ///////////////////////////////////////////////////////////////////////////////
567
568       /**
569        * @brief The current scroll position.
570        * @details Name "scrollPosition", type Property::VECTOR2.
571        * @SINCE_1_0.0
572        */
573       SCROLL_POSITION = ANIMATABLE_PROPERTY_START_INDEX,
574
575       /**
576        * @brief The position before we set the clamp at scroll boundaries.
577        * @details Name "scrollPrePosition", type Property::VECTOR2.
578        * @SINCE_1_0.0
579        */
580       SCROLL_PRE_POSITION,
581
582       /**
583        * @brief The X component of SCROLL_PRE_POSITION.
584        * @details Name "scrollPrePositionX", type Property::FLOAT.
585        * @SINCE_1_0.0
586        */
587       SCROLL_PRE_POSITION_X,
588
589       /**
590        * @brief The Y component of SCROLL_PRE_POSITION.
591        * @details Name "scrollPrePositionY", type Property::VECTOR2.
592        * @SINCE_1_0.0
593        */
594       SCROLL_PRE_POSITION_Y,
595
596       /**
597        * @brief The maximum value that SCROLL_PRE_POSITION can be.
598        * @details Name "scrollPrePositionMax", type Property::VECTOR2.
599        * @SINCE_1_0.0
600        */
601       SCROLL_PRE_POSITION_MAX,
602
603       /**
604        * @brief The X component of SCROLL_PRE_POSITION_MAX.
605        * @details Name "scrollPrePositionMaxX", type Property::FLOAT.
606        * @SINCE_1_0.0
607        */
608       SCROLL_PRE_POSITION_MAX_X,
609
610       /**
611        * @brief The Y component of SCROLL_PRE_POSITION_MAX.
612        * @details Name "scrollPrePositionMaxY", type Property::FLOAT.
613        * @SINCE_1_0.0
614        */
615       SCROLL_PRE_POSITION_MAX_Y,
616
617       /**
618        * @brief The amount that we can scroll beyond the boundary along the X axis.
619        * @details Name "overshootX", type Property::FLOAT.
620        * @SINCE_1_0.0
621        */
622       OVERSHOOT_X,
623
624       /**
625        * @brief The amount that we can scroll beyond the boundary along the Y axis.
626        * @details Name "overshootY", type Property::FLOAT.
627        * @SINCE_1_0.0
628        */
629       OVERSHOOT_Y,
630
631       /**
632        * @brief The position after the overshoot value has been considered in the calculation.
633        * @details Name "scrollFinal", type Property::VECTOR2.
634        * @SINCE_1_0.0
635        */
636       SCROLL_FINAL,
637
638       /**
639        * @brief The X component of SCROLL_FINAL.
640        * @details Name "scrollFinalX", type Property::FLOAT.
641        * @SINCE_1_0.0
642        */
643       SCROLL_FINAL_X,
644
645       /**
646        * @brief The Y component of SCROLL_FINAL.
647        * @details Name "scrollFinalY", type Property::FLOAT.
648        * @SINCE_1_0.0
649        */
650       SCROLL_FINAL_Y,
651
652       /**
653        * @brief Whether scrolling wraps.
654        * @details Name "wrap", type Property::BOOLEAN.
655        * @SINCE_1_0.0
656        */
657       WRAP,
658
659       /**
660        * @brief Whether we are currently panning.
661        * @details Name "panning", type Property::BOOLEAN.
662        * @SINCE_1_0.0
663        */
664       PANNING,
665
666       /**
667        * @brief Whether we are currently scrolling.
668        * @details Name "scrolling", type Property::BOOLEAN.
669        * @SINCE_1_0.0
670        */
671       SCROLLING,
672
673       /**
674        * @brief The size of the scrolling domain.
675        * @details Name "scrollDomainSize", type Property::VECTOR2.
676        * @SINCE_1_0.0
677        */
678       SCROLL_DOMAIN_SIZE,
679
680       /**
681        * @brief The X component of SCROLL_DOMAIN_SIZE.
682        * @details Name "scrollDomainSizeX", type Property::FLOAT.
683        * @SINCE_1_0.0
684        */
685       SCROLL_DOMAIN_SIZE_X,
686
687       /**
688        * @brief The Y component of SCROLL_DOMAIN_SIZE.
689        * @details Name "scrollDomainSizeY", type Property::FLOAT.
690        * @SINCE_1_0.0
691        */
692       SCROLL_DOMAIN_SIZE_Y,
693
694       /**
695        * @brief The offset of the scroll domain.
696        * @details Name "scrollDomainOffset", type Property::VECTOR2.
697        * @SINCE_1_0.0
698        */
699       SCROLL_DOMAIN_OFFSET,
700
701       /**
702        * @brief The delta in the position when scrolling.
703        * @details Name "scrollPositionDelta", type Property::VECTOR2.
704        * @SINCE_1_0.0
705        */
706       SCROLL_POSITION_DELTA,
707
708       /**
709        * @brief The starting page position.
710        * @details Name "startPagePosition", type Property::VECTOR3.
711        * @SINCE_1_0.0
712        */
713       START_PAGE_POSITION,
714     };
715   };
716
717   // Typedefs
718
719   typedef Signal< void ( const SnapEvent& ) > SnapStartedSignalType; ///< SnapStarted signal type @SINCE_1_0.0
720
721 public:
722
723   /**
724    * @brief Creates an empty ScrollView handle.
725    * @SINCE_1_0.0
726    */
727   ScrollView();
728
729   /**
730    * @brief Copy constructor.
731    *
732    * Creates another handle that points to the same real object.
733    *
734    * @SINCE_1_0.0
735    * @param[in] handle Handle to copy from
736    */
737   ScrollView( const ScrollView& handle );
738
739   /**
740    * @brief Move constructor
741    * @SINCE_1_9.23
742    *
743    * @param[in] rhs A reference to the moved handle
744    */
745   ScrollView( ScrollView&& rhs );
746
747   /**
748    * @brief Assignment operator.
749    *
750    * Changes this handle to point to another real object.
751    * @SINCE_1_0.0
752    * @param[in] handle The handle to copy from
753    * @return A reference to this
754    */
755   ScrollView& operator=( const ScrollView& handle );
756
757   /**
758    * @brief Move assignment
759    * @SINCE_1_9.23
760    *
761    * @param[in] rhs A reference to the moved handle
762    * @return A reference to this
763    */
764   ScrollView& operator=( ScrollView&& rhs );
765
766   /**
767    * @brief Destructor.
768    *
769    * This is non-virtual since derived Handle types must not contain data or virtual methods.
770    * @SINCE_1_0.0
771    */
772   ~ScrollView();
773
774   /**
775    * @brief Creates an initialized ScrollView.
776    *
777    * @SINCE_1_0.0
778    * @return A handle to a newly allocated Dali resource
779    */
780   static ScrollView New();
781
782   /**
783    * @brief Downcasts a handle to ScrollView handle.
784    *
785    * If handle points to a ScrollView, the downcast produces valid handle.
786    * If not, the returned handle is left uninitialized.
787    *
788    * @SINCE_1_0.0
789    * @param[in] handle Handle to an object
790    * @return A handle to a ScrollView or an uninitialized handle
791    */
792   static ScrollView DownCast( BaseHandle handle );
793
794 public:
795
796   /**
797    * @brief Gets snap-animation's AlphaFunction.
798    *
799    * @SINCE_1_0.0
800    * @return Current easing alpha function of the snap animation
801    */
802   AlphaFunction GetScrollSnapAlphaFunction() const;
803
804   /**
805    * @brief Sets snap-animation's AlphaFunction.
806    *
807    * @SINCE_1_0.0
808    * @param[in] alpha Easing alpha function of the snap animation
809    */
810   void SetScrollSnapAlphaFunction(AlphaFunction alpha);
811
812   /**
813    * @brief Gets flick-animation's AlphaFunction.
814    *
815    * @SINCE_1_0.0
816    * @return Current easing alpha function of the flick animation
817    */
818   AlphaFunction GetScrollFlickAlphaFunction() const;
819
820   /**
821    * @brief Sets flick-animation's AlphaFunction.
822    *
823    * @SINCE_1_0.0
824    * @param[in] alpha Easing alpha function of the flick animation
825    */
826   void SetScrollFlickAlphaFunction(AlphaFunction alpha);
827
828   /**
829    * @brief Gets the time for the scroll snap-animation.
830    *
831    * This animation occurs when the user drags, and releases.
832    *
833    * @SINCE_1_0.0
834    * @return The time in seconds for the animation to take
835    */
836   float GetScrollSnapDuration() const;
837
838   /**
839    * @brief Sets the time for the scroll snap-animation.
840    *
841    * This animation occurs when the user drags, and releases.
842    *
843    * @SINCE_1_0.0
844    * @param[in] time The time in seconds for the animation to take
845    */
846   void SetScrollSnapDuration(float time);
847
848   /**
849    * @brief Gets the time for the scroll flick-animation.
850    *
851    * This animation occurs when the user flicks scroll view.
852    *
853    * @SINCE_1_0.0
854    * @return The time in seconds for the animation to take
855    */
856   float GetScrollFlickDuration() const;
857
858   /**
859    * @brief Sets the time for the scroll flick-animation.
860    *
861    * This animation occurs when the user flicks scroll view.
862    *
863    * @SINCE_1_0.0
864    * @param[in] time The time in seconds for the animation to take
865    */
866   void SetScrollFlickDuration(float time);
867
868   /**
869    * @brief Sets X axis ruler.
870    *
871    * Defines how scrolling horizontally is snapped, and
872    * the boundary (domain) in which the ScrollView can pan.
873    *
874    * @SINCE_1_0.0
875    * @param[in] ruler The ruler to be used for the X axis
876    */
877   void SetRulerX(RulerPtr ruler);
878
879   /**
880    * @brief Sets Y axis ruler.
881    *
882    * Defines how scrolling vertically is snapped, and the boundary
883    * (domain) in which the ScrollView can pan.
884    *
885    * @SINCE_1_0.0
886    * @param[in] ruler The ruler to be used for the Y axis
887    */
888   void SetRulerY(RulerPtr ruler);
889
890   /**
891    * @brief Sets scroll sensitivity of pan gesture.
892    *
893    * @SINCE_1_0.0
894    * @param[in] sensitive @c true to enable scroll, @c false to disable scrolling
895    * @note Unlike Actor::Property::SENSITIVE, this determines whether this ScrollView
896    * should react (e.g. pan), without disrupting the sensitivity of its children.
897    *
898    */
899   void SetScrollSensitive(bool sensitive);
900
901   /**
902    * @brief Sets maximum overshoot amount.
903    *
904    * The final overshoot value is within 0.0f to 1.0f, but the maximum
905    * overshoot is in pixels (e.g. if you scroll 75 pixels beyond the
906    * edge of a scrollable area and the maximum overshoot is 100 then
907    * the final overshoot value will be 0.75f).
908    *
909    * @SINCE_1_0.0
910    * @param[in] overshootX The maximum number of horizontally scrolled pixels before overshoot X reaches 1.0f
911    * @param[in] overshootY The maximum number of vertically scrolled pixels before overshoot Y reaches 1.0f
912    */
913   void SetMaxOvershoot(float overshootX, float overshootY);
914
915   /**
916    * @brief Sets Snap Overshoot animation's AlphaFunction.
917    *
918    * @SINCE_1_0.0
919    * @param[in] alpha Easing alpha function of the overshoot snap animation
920    */
921   void SetSnapOvershootAlphaFunction(AlphaFunction alpha);
922
923   /**
924    * @brief Sets Snap Overshoot animation's Duration.
925    *
926    * @SINCE_1_0.0
927    * @param[in] duration The duration of the overshoot snap animation
928    * @note Set duration to 0 seconds to disable Animation.
929    *
930    */
931   void SetSnapOvershootDuration(float duration);
932
933   /**
934    * @brief Enables or Disables Actor Auto-Snap mode.
935    *
936    * When Actor Auto-Snap mode has been enabled, ScrollView will automatically
937    * snap to the closest actor (The closest actor will appear in the center of
938    * the ScrollView).
939    *
940    * @SINCE_1_0.0
941    * @param[in] enable Enables (true), or disables (false) Actor AutoSnap
942    */
943   void SetActorAutoSnap(bool enable);
944
945   /**
946    * @brief Enables or Disables Wrap mode for ScrollView contents.
947    *
948    * When enabled, the ScrollView contents are wrapped over the X/Y Domain.
949    *
950    * @SINCE_1_0.0
951    * @param[in] enable Enables (true), or disables (false) Wrap Mode
952    * @note You must apply a position constraint that causes Wrapping
953    * to all children.
954    *
955    */
956   void SetWrapMode(bool enable);
957
958   /**
959    * @brief Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted.
960    *
961    * @SINCE_1_0.0
962    * @return Current scroll update distance
963    */
964   int GetScrollUpdateDistance() const;
965
966   /**
967    * @brief Sets the distance needed to scroll for ScrollUpdatedSignal to be emitted.
968    *
969    * The scroll update distance tells ScrollView how far to move before ScrollUpdatedSignal the informs application.
970    * Each time the ScrollView crosses this distance the signal will be emitted.
971    *
972    * @SINCE_1_0.0
973    * @param[in] distance The distance for ScrollView to move before emitting update signal
974    */
975   void SetScrollUpdateDistance(int distance);
976
977   /**
978    * @brief Returns state of Axis Auto Lock mode.
979    *
980    * @SINCE_1_0.0
981    * @return Whether Axis Auto Lock mode has been enabled or not
982    */
983   bool GetAxisAutoLock() const;
984
985   /**
986    * @brief Enables or Disables Axis Auto Lock mode for panning within the ScrollView.
987    *
988    * When enabled, any pan gesture that appears mostly horizontal or mostly
989    * vertical, will be automatically restricted to horizontal only or vertical
990    * only panning, until the pan gesture has completed.
991    *
992    * @SINCE_1_0.0
993    * @param[in] enable Enables (true), or disables (false) AxisAutoLock mode
994    */
995   void SetAxisAutoLock(bool enable);
996
997   /**
998    * @brief Gets the gradient threshold at which a panning gesture
999    * should be locked to the Horizontal or Vertical axis.
1000    *
1001    * @SINCE_1_0.0
1002    * @return The gradient, a value between 0.0 and 1.0f
1003    */
1004   float GetAxisAutoLockGradient() const;
1005
1006   /**
1007    * @brief Sets the gradient threshold at which a panning gesture should be locked to the
1008    * Horizontal or Vertical axis.
1009    *
1010    * By default, this is 0.36 (0.36:1) which means angles less than 20
1011    * degrees to an axis will lock to that axis.
1012    *
1013    * @SINCE_1_0.0
1014    * @param[in] gradient A value between 0.0 and 1.0 (auto-lock for all angles)
1015    * @note Specifying a value of 1.0 (the maximum value accepted) indicates that
1016    * all panning gestures will auto-lock either to the horizontal or vertical axis.
1017    *
1018    */
1019   void SetAxisAutoLockGradient(float gradient);
1020
1021   /**
1022    * @brief Gets the friction coefficient setting for ScrollView when
1023    * flicking in free panning mode.
1024    *
1025    * This is a value in stage-diagonals per second^2.
1026    * stage-diagonal = Length( stage.width, stage.height )
1027    * @SINCE_1_0.0
1028    * @return Friction coefficient is returned
1029    */
1030   float GetFrictionCoefficient() const;
1031
1032   /**
1033    * @brief Sets the friction coefficient for ScrollView when flicking
1034    * in free panning mode.
1035    *
1036    * This is a value in stage-diagonals per second^2.
1037    * stage-diagonal = Length( stage.width, stage.height ).
1038    * example:
1039    * A stage 480x800 in size has a diagonal length of 933.
1040    * Friction coefficient of 1.0 means the swipe velocity will
1041    * reduce by 1.0 * 933 pixels/sec^2.
1042    * @SINCE_1_0.0
1043    * @param[in] friction Friction coefficient must be greater than 0.0 (default = 1.0)
1044    */
1045   void SetFrictionCoefficient(float friction);
1046
1047   /**
1048    * @brief Gets the flick speed coefficient for ScrollView when
1049    * flicking in free panning mode.
1050    *
1051    * This is a constant which multiplies the input touch
1052    * flick velocity to determine the actual velocity at
1053    * which to move the scrolling area.
1054    * @SINCE_1_0.0
1055    * @return The flick speed coefficient is returned
1056    */
1057   float GetFlickSpeedCoefficient() const;
1058
1059   /**
1060    * @brief Sets the flick speed coefficient for ScrollView when
1061    * flicking in free panning mode.
1062    *
1063    * This is a constant which multiplies the input touch
1064    * flick velocity to determine the actual velocity at
1065    * which to move the scrolling area.
1066    * @SINCE_1_0.0
1067    * @param[in] speed The flick speed coefficient (default = 1.0)
1068    */
1069   void SetFlickSpeedCoefficient(float speed);
1070
1071   /**
1072    * @brief Returns the minimum pan distance required for a flick gesture in pixels.
1073    *
1074    * @SINCE_1_0.0
1075    * @return Minimum pan distance vector with separate x and y distance
1076    */
1077   Vector2 GetMinimumDistanceForFlick() const;
1078
1079   /**
1080    * @brief Sets the minimum pan distance required for a flick in pixels.
1081    *
1082    * 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.
1083    *
1084    * @SINCE_1_0.0
1085    * @param[in] distance The minimum pan distance for a flick
1086    */
1087   void SetMinimumDistanceForFlick( const Vector2& distance );
1088
1089   /**
1090    * @brief Returns the minimum pan speed required for a flick gesture in pixels per second.
1091    *
1092    * @SINCE_1_0.0
1093    * @return Minimum pan speed
1094    */
1095   float GetMinimumSpeedForFlick() const;
1096
1097   /**
1098    * @brief Sets the minimum pan speed required for a flick in pixels per second.
1099    *
1100    * @SINCE_1_0.0
1101    * @param[in] speed The minimum pan speed for a flick
1102    */
1103   void SetMinimumSpeedForFlick( float speed );
1104
1105   /**
1106    * @brief Gets the maximum flick speed setting for ScrollView when
1107    * flicking in free panning mode.
1108    *
1109    * This is a value in stage-diagonals per second.
1110    * stage-diagonal = Length( stage.width, stage.height )
1111    * @SINCE_1_0.0
1112    * @return Maximum flick speed is returned
1113    */
1114   float GetMaxFlickSpeed() const;
1115
1116   /**
1117    * @brief Sets the maximum flick speed for the ScrollView when
1118    * flicking in free panning mode.
1119    *
1120    * This is a value in stage-diagonals per second.
1121    * stage-diagonal = Length( stage.width, stage.height )
1122    * example:
1123    * A stage 480x800 in size has a diagonal length of 933.
1124    * Max Flick speed of 1.0 means the maximum velocity of
1125    * a swipe can be 1.0 * 933 pixels/sec.
1126    * @SINCE_1_0.0
1127    * @param[in] speed Maximum flick speed (default = 3.0)
1128    */
1129   void SetMaxFlickSpeed(float speed);
1130
1131   /**
1132    * @brief Gets the step of scroll distance in actor coordinates for
1133    * each wheel event received in free panning mode.
1134    *
1135    * @SINCE_1_0.0
1136    * @return The step of scroll distance(pixel) in X and Y axes
1137    */
1138   Vector2 GetWheelScrollDistanceStep() const;
1139
1140   /**
1141    * @brief Sets the step of scroll distance in actor coordinates for
1142    * each wheel event received in free panning mode.
1143    *
1144    * @SINCE_1_0.0
1145    * @param[in] step The step of scroll distance(pixel) in X and Y axes
1146    *
1147    * @note If snap points are defined in the rulers, it will always
1148    * scroll to the next snap point towards the scroll direction while
1149    * receiving the wheel events.
1150    *
1151    */
1152   void SetWheelScrollDistanceStep(Vector2 step);
1153
1154   /**
1155    * @brief Retrieves current scroll position.
1156    *
1157    * @SINCE_1_0.0
1158    * @return The current scroll position
1159    */
1160   Vector2 GetCurrentScrollPosition() const;
1161
1162   /**
1163    * @brief Retrieves current scroll page based on ScrollView
1164    * dimensions being the size of one page, and all pages laid out in
1165    * a grid fashion, increasing from left to right until the end of
1166    * the X-domain.
1167    *
1168    * @SINCE_1_0.0
1169    * @note Pages start from 0 as the first page, not 1.
1170    *
1171    * @return The Current page
1172    */
1173   unsigned int GetCurrentPage() const;
1174
1175   /**
1176    * @brief Scrolls View to position specified (contents will scroll to this position).
1177    *
1178    * Position 0,0 is the origin. Increasing X scrolls contents left, while
1179    * increasing Y scrolls contents up.
1180    * - If Rulers have been applied to the axes, then the contents will scroll until
1181    * reaching the domain boundary.
1182    * @SINCE_1_0.0
1183    * @param[in] position The position to scroll to
1184    * @note Contents will not snap to ruler snap points.
1185    *
1186    */
1187   void ScrollTo(const Vector2& position);
1188
1189   /**
1190    * @brief Scrolls View to position specified (contents will scroll to this position).
1191    *
1192    * Position 0,0 is the origin. Increasing X scrolls contents left, while
1193    * increasing Y scrolls contents up.
1194    * - If Rulers have been applied to the axes, then the contents will scroll until
1195    * reaching the domain boundary.
1196    * @SINCE_1_0.0
1197    * @param[in] position The position to scroll to
1198    * @param[in] duration The duration of the animation in seconds
1199    * @note Contents will not snap to ruler snap points.
1200    *
1201    */
1202   void ScrollTo(const Vector2& position, float duration);
1203
1204   /**
1205    * @brief Scrolls View to position specified (contents will scroll to this position).
1206    *
1207    * Position 0,0 is the origin. Increasing X scrolls contents left, while
1208    * increasing Y scrolls contents up.
1209    * - If Rulers have been applied to the axes, then the contents will scroll until
1210    * reaching the domain boundary.
1211    * @SINCE_1_0.0
1212    * @param[in] position The position to scroll to
1213    * @param[in] duration The duration of the animation in seconds
1214    * @param[in] alpha The alpha function to use
1215    * @note Contents will not snap to ruler snap points.
1216    *
1217    */
1218   void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha);
1219
1220   /**
1221    * @brief Scrolls View to position specified (contents will scroll to this position).
1222    *
1223    * Position 0,0 is the origin. Increasing X scrolls contents left, while
1224    * increasing Y scrolls contents up.
1225    * - If Rulers have been applied to the axes, then the contents will scroll until
1226    * reaching the domain boundary.
1227    * @SINCE_1_0.0
1228    * @param[in] position The position to scroll to
1229    * @param[in] duration The duration of the animation in seconds
1230    * @param[in] horizontalBias Whether to bias scrolling to left or right
1231    * @param[in] verticalBias Whether to bias scrolling to top or bottom
1232    * @note Contents will not snap to ruler snap points.
1233    * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in
1234    * wrap mode, the application developer can decide whether to scroll left or right
1235    * to get to the target page.
1236    *
1237    */
1238   void ScrollTo(const Vector2& position, float duration,
1239                 DirectionBias horizontalBias, DirectionBias verticalBias);
1240
1241   /**
1242    * @brief Scrolls View to position specified (contents will scroll to this position).
1243    *
1244    * Position 0,0 is the origin. Increasing X scrolls contents left, while
1245    * increasing Y scrolls contents up.
1246    * - If Rulers have been applied to the axes, then the contents will scroll until
1247    * reaching the domain boundary.
1248    * @SINCE_1_0.0
1249    * @param[in] position The position to scroll to
1250    * @param[in] duration The duration of the animation in seconds
1251    * @param[in] horizontalBias Whether to bias scrolling to left or right
1252    * @param[in] verticalBias Whether to bias scrolling to top or bottom
1253    * @param[in] alpha Alpha function to use
1254    * @note Contents will not snap to ruler snap points.
1255    * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in
1256    * wrap mode, the application developer can decide whether to scroll left or right
1257    * to get to the target page.
1258    *
1259    */
1260   void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha,
1261                 DirectionBias horizontalBias, DirectionBias verticalBias);
1262
1263   /**
1264    * @brief Scrolls View to page currently based on assumption that each page is
1265    * "(page) * ScrollViewSize.width, 0".
1266    *
1267    * @SINCE_1_0.0
1268    * @param[in] page The page to scroll to
1269    * @note Should probably be upgraded so that page is an abstract class, that can be
1270    * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be
1271    * orchestrated in a 2D grid fashion, or variable width.
1272    *
1273    */
1274   void ScrollTo(unsigned int page);
1275
1276   /**
1277    * @brief Scrolls View to page currently based on assumption that each page is
1278    * "(page) * ScrollViewSize.width, 0".
1279    *
1280    * @SINCE_1_0.0
1281    * @param[in] page The page to scroll to
1282    * @param[in] duration The duration of the animation in seconds
1283    * @note Should probably be upgraded so that page is an abstract class, that can be
1284    * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be
1285    * orchestrated in a 2D grid fashion, or variable width.
1286    *
1287    */
1288   void ScrollTo(unsigned int page, float duration);
1289
1290   /**
1291    * @brief Scrolls View to page currently based on assumption that each page is
1292    * "(page) * ScrollViewSize.width, 0".
1293    *
1294    * @SINCE_1_0.0
1295    * @param[in] page The page to scroll to
1296    * @param[in] duration The duration of the animation in seconds
1297    * @param[in] bias Whether to bias scrolling to left or right
1298    * @note Should probably be upgraded so that page is an abstract class, that can be
1299    * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be
1300    * orchestrated in a 2D grid fashion, or variable width.
1301    * A biasing parameter is provided such that in scenarios with 2 pages in wrap mode,
1302    * the application developer can decide whether to scroll left or right to get to
1303    * the target page.
1304    *
1305    */
1306   void ScrollTo(unsigned int page, float duration, DirectionBias bias);
1307
1308   /**
1309    * @brief Scrolls View such that actor appears in the center of the ScrollView.
1310    *
1311    * @SINCE_1_0.0
1312    * @param[in] actor The actor to center in on (via Scrolling)
1313    * @note Actor must be a direct child of ScrollView, otherwise will
1314    * cause an assertion failure.
1315    */
1316   void ScrollTo(Actor& actor);
1317
1318   /**
1319    * @brief Scrolls View such that actor appears in the center of the ScrollView.
1320    *
1321    * @SINCE_1_0.0
1322    * @param[in] actor The actor to center in on (via Scrolling)
1323    * @param[in] duration The duration of the animation in seconds
1324    * @note Actor must be a direct child of ScrollView, otherwise will
1325    * cause an assertion failure.
1326    */
1327   void ScrollTo(Actor& actor, float duration);
1328
1329   /**
1330    * @brief Scrolls View to the nearest snap points as specified by the Rulers.
1331    *
1332    * If already at snap points, then will return false, and not scroll.
1333    *
1334    * @SINCE_1_0.0
1335    * @return True if Snapping necessary
1336    */
1337   bool ScrollToSnapPoint();
1338
1339   /**
1340    * @brief Applies a constraint that will affect the children of ScrollView.
1341    *
1342    * @SINCE_1_0.0
1343    * @param[in] constraint The constraint to apply
1344    * @note This affects all existing and future Actors that are added to scrollview.
1345    */
1346   void ApplyConstraintToChildren(Constraint constraint);
1347
1348   /**
1349    * @brief Removes all constraints that will affect the children of ScrollView.
1350    *
1351    * @SINCE_1_0.0
1352    * @note This removes all constraints from actors that have been added
1353    * to scrollview.
1354    */
1355   void RemoveConstraintsFromChildren();
1356
1357   /**
1358    * @brief Applies Effect to ScrollView.
1359    *
1360    * @SINCE_1_0.0
1361    * @param[in] effect The effect to apply to scroll view
1362    */
1363   void ApplyEffect(ScrollViewEffect effect);
1364
1365   /**
1366    * @brief Removes Effect from ScrollView.
1367    *
1368    * @SINCE_1_0.0
1369    * @param[in] effect The effect to remove
1370    */
1371   void RemoveEffect(ScrollViewEffect effect);
1372
1373   /**
1374    * @brief Remove All Effects from ScrollView.
1375    * @SINCE_1_0.0
1376    */
1377   void RemoveAllEffects();
1378
1379   /**
1380    * @brief Binds actor to this ScrollView.
1381    *
1382    * Once an actor is bound to a ScrollView, it will be subject to
1383    * that ScrollView's properties.
1384    *
1385    * @SINCE_1_0.0
1386    * @param[in] child The actor to add to this ScrollView
1387    */
1388   void BindActor(Actor child);
1389
1390   /**
1391    * @brief Unbinds Actor from this ScrollView.
1392    *
1393    * Once Unbound, this ScrollView will not affect the actor.
1394    * @SINCE_1_0.0
1395    * @param[in] child The actor to be unbound
1396    * @note This does not remove the child from the ScrollView container
1397    *
1398    */
1399   void UnbindActor(Actor child);
1400
1401   /**
1402    * @brief Allows the user to constrain the scroll view in a particular direction.
1403    *
1404    * @SINCE_1_0.0
1405    * @param[in] direction The axis to constrain the scroll-view to.
1406    *                      Usually set to PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired).
1407    * @param[in] threshold The threshold to apply around the axis
1408    * @note If no threshold is specified, then the default threshold of PI * 0.25 radians (or 45 degrees) is used.
1409    */
1410   void SetScrollingDirection( Radian direction, Radian threshold = PanGestureDetector::DEFAULT_THRESHOLD );
1411
1412   /**
1413    * @brief Removes a direction constraint from the scroll view.
1414    *
1415    * @SINCE_1_0.0
1416    * @param[in] direction The axis to stop constraining to.
1417    *                      Usually will be PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired).
1418    */
1419   void RemoveScrollingDirection( Radian direction );
1420
1421 public: // Signals
1422
1423   /**
1424    * @brief Signal emitted when the ScrollView has started to snap or flick (it tells the target
1425    * position, scale, rotation for the snap or flick).
1426    *
1427    * A callback of the following type may be connected:
1428    * @code
1429    *   void YourCallbackName(const SnapEvent& event);
1430    * @endcode
1431    * @SINCE_1_0.0
1432    * @return The signal to connect to
1433    * @pre The Object has been initialized.
1434    */
1435   SnapStartedSignalType& SnapStartedSignal();
1436
1437 public: // Not intended for application developers
1438
1439   /// @cond internal
1440   /**
1441    * @brief Creates a handle using the Toolkit::Internal implementation.
1442    *
1443    * @SINCE_1_0.0
1444    * @param[in] implementation The Control implementation
1445    */
1446   DALI_INTERNAL ScrollView(Internal::ScrollView& implementation);
1447
1448   /**
1449    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
1450    *
1451    * @SINCE_1_0.0
1452    * @param[in] internal A pointer to the internal CustomActor
1453    */
1454   explicit DALI_INTERNAL ScrollView( Dali::Internal::CustomActor* internal );
1455   /// @endcond
1456 };
1457
1458 /**
1459  * @}
1460  */
1461 } // namespace Toolkit
1462
1463 } // namespace Dali
1464
1465 #endif // DALI_TOOLKIT_SCROLL_VIEW_H