(ScrollView) Move ScrollMode and related properties to Public API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / scroll-view / scroll-mode.h
1 #ifndef DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H
2 #define DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H
3
4 /*
5  * Copyright (c) 2017 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 namespace Dali
21 {
22
23 namespace Toolkit
24 {
25
26 /**
27  * @addtogroup dali_toolkit_controls_scroll_view
28  * @{
29  */
30
31 /**
32  * @brief Properties to use in a Property::MAP when setting a ScrollView's scroll mode.
33  * @SINCE_1_2.60
34  */
35 namespace ScrollMode
36 {
37
38 /**
39  * @brief Properties to use in a Property::MAP when setting a ScrollView's scroll mode.
40  * @SINCE_1_2.60
41  */
42 enum Type
43 {
44   /**
45    * @brief Whether the content can be scrolled along the X axis or not.
46    * @details Name "xAxisScrollEnabled", type Property::BOOLEAN.
47    * @SINCE_1_2.60
48    */
49   X_AXIS_SCROLL_ENABLED,
50
51   /**
52    * @brief When set, causes scroll view to snap to multiples of the
53    * value of the interval while flicking along the X axis.
54    * @details Name "xAxisSnapToInterval", type Property::FLOAT
55    * @SINCE_1_2.60
56    * @note By default, there is no snapping.
57    */
58   X_AXIS_SNAP_TO_INTERVAL,
59
60   /**
61    * @brief When set, the scroll view is unable to scroll beyond the
62    * value of the boundary along the X axis.
63    * @details Name "xAxisScrollBoundary", type Property::FLOAT.
64    * @SINCE_1_2.60
65    * @note By default, there is no boundary.
66    */
67   X_AXIS_SCROLL_BOUNDARY,
68
69   /**
70    * @brief Whether the content can be scrolled along the Y axis or not.
71    * @details Name "yAxisScrollEnabled", type Property::BOOLEAN
72    * @SINCE_1_2.60
73    */
74   Y_AXIS_SCROLL_ENABLED,
75
76   /**
77    * @brief When set, causes scroll view to snap to multiples of the
78    * value of the interval while flicking along the Y axis.
79    * @details Name "yAxisSnapToInterval", type Property::FLOAT.
80    * @SINCE_1_2.60
81    * @note By default, there is no snapping.
82    */
83   Y_AXIS_SNAP_TO_INTERVAL,
84
85   /**
86    * @brief When set, the scroll view is unable to scroll beyond the
87    * value of the boundary along the Y axis.
88    * @details Name "yAxisScrollBoundary", type Property::FLOAT.
89    * @SINCE_1_2.60
90    * @note By default, there is no boundary.
91    */
92   Y_AXIS_SCROLL_BOUNDARY
93 };
94
95 } // ScrollMode
96
97 /**
98  * @}
99  */
100
101 } // namespace Toolkit
102
103 } // namespace Dali
104
105 #endif // DALI_TOOLKIT_SCROLL_VIEW_SCROLL_MODE_H