Formatting API
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / scrollable / item-view / default-item-layout-property.h
1 #ifndef DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_H
2 #define DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_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 namespace Dali
22 {
23 namespace Toolkit
24 {
25 /**
26  * @addtogroup dali_toolkit_controls_item_view
27  * @{
28  */
29
30 /**
31  * @brief Default item layout property.
32  * @SINCE_1_2.60
33  */
34 namespace DefaultItemLayoutProperty
35 {
36 /**
37  * @brief The properties of each type of item layout.
38  * @SINCE_1_2.60
39  */
40 enum Property
41 {
42   /**
43   * @brief The type of the Layout.
44   * @details Name "type", type Dali::Toolkit::DefaultItemLayout::Type (Property::INTEGER).
45   * @SINCE_1_2.60
46   * @note Mandatory.
47   */
48   TYPE = 0,
49
50   /**
51   * @brief The size of each item in the Layout.
52   * @details Name "itemSize", type Property::VECTOR3
53   * @SINCE_1_2.60
54   * @note Optional.
55   * @note If not supplied, see ItemLayout::GetDefaultItemSize().
56   */
57   ITEM_SIZE,
58
59   /**
60   * @brief The internal orientation of the Layout.
61   * @details Name "orientation", type Dali::Toolkit::ControlOrientation::Type (Property::INTEGER).
62   * @SINCE_1_2.60
63   * @note Optional.
64   * @note If not supplied, the default is ControlOrientation::Up, The contents of control are in a vertical layout, from top to bottom.
65   */
66   ORIENTATION,
67
68   /**
69   * @brief The number of columns in the GridLayout.
70   * @details Name "gridColumnNumber", type Property::INTEGER.
71   * @SINCE_1_2.60
72   * @note Optional.
73   * @note If not supplied, the default is 4.
74   */
75   GRID_COLUMN_NUMBER,
76
77   /**
78   * @brief The spacing between rows in the GridLayout.
79   * @details Name "gridRowSpacing", type Property::FLOAT.
80   * @SINCE_1_2.60
81   * @note Optional.
82   * @note If not supplied, the default is 20.0f.
83   */
84   GRID_ROW_SPACING,
85
86   /**
87   * @brief The spacing between columns in the GridLayout.
88   * @details Name "gridColumnSpacing", type Property::FLOAT
89   * @SINCE_1_2.60
90   * @note Optional.
91   * @note If not supplied, the default is 20.0f.
92   */
93   GRID_COLUMN_SPACING,
94
95   /**
96   * @brief The margin in the top of the GridLayout.
97   * @details Name "gridTopMargin", type Property::FLOAT
98   * @SINCE_1_2.60
99   * @note Optional.
100   * @note If not supplied, the default is 95.0f.
101   */
102   GRID_TOP_MARGIN,
103
104   /**
105   * @brief The margin in the bottom of the GridLayout.
106   * @details Name "gridBottomMargin", type Property::FLOAT
107   * @SINCE_1_2.60
108   * @note Optional.
109   * @note If not supplied, the default is 20.0f.
110   */
111   GRID_BOTTOM_MARGIN,
112
113   /**
114   * @brief The margin in the left and right of the GridLayout.
115   * @details Name "gridSideMargin", type Property::FLOAT.
116   * @SINCE_1_2.60
117   * @note Optional.
118   * @note If not supplied, the default is 20.0f.
119   */
120   GRID_SIDE_MARGIN,
121
122   /**
123   * @brief The factor used to customise the scroll speed while dragging and swiping the GridLayout.
124   * @details Name "gridScrollSpeedFactor", type Property::FLOAT.
125   * @SINCE_1_2.60
126   * @note Optional.
127   * @note If not supplied, the default is 0.03f.
128   */
129   GRID_SCROLL_SPEED_FACTOR,
130
131   /**
132   * @brief The maximum swipe speed in pixels per second of GridLayout.
133   * @details Name "gridMaximumSwipSpeed", type Property::FLOAT.
134   * @SINCE_1_2.60
135   * @note Optional.
136   * @note If not supplied, the default is 100.0f.
137   */
138   GRID_MAXIMUM_SWIPE_SPEED,
139
140   /**
141   * @brief The duration of the flick animation in seconds of GridLayout.
142   * @details Name "gridItemFlickAnimationDuration", type Property::FLOAT.
143   * @SINCE_1_2.60
144   * @note Optional.
145   * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
146   * @note Must be greater than zero;If not supplied, the default is 0.015f.
147   */
148   GRID_ITEM_FLICK_ANIMATION_DURATION,
149
150   /**
151   * @brief The number of columns in the DepthLayout.
152   * @details Name "depthColumnNumber", type Property::INTEGER.
153   * @SINCE_1_2.60
154   * @note Optional.
155   * @note If not supplied, the default is 3.
156   */
157   DEPTH_COLUMN_NUMBER,
158
159   /**
160   * @brief The number of rows in the DepthLayout.
161   * @details Name "depthRowNumber", type Property::INTEGER.
162   * @SINCE_1_2.60
163   * @note Optional.
164   * @note If not supplied, the default is 26.
165   */
166   DEPTH_ROW_NUMBER,
167
168   /**
169   * @brief The spacing between rows in the DepthLayout.
170   * @details Name "depthRowSpacing", type Property::FLOAT.
171   * @SINCE_1_2.60
172   * @note Optional.
173   * @note If not supplied, the default is 55.0f.
174   */
175   DEPTH_ROW_SPACING,
176
177   /**
178   * @brief The factor used to customise the scroll speed while dragging and swiping the  DepthLayout.
179   * @details Name "depthScrollSpeedFactor", type Property::FLOAT.
180   * @SINCE_1_2.60
181   * @note Optional.
182   * @note If not supplied, the default is 0.02f.
183   */
184   DEPTH_SCROLL_SPEED_FACTOR,
185
186   /**
187   * @brief The maximumSwipSpeed of the DepthLayout.
188   * @details Name "depthMaximumSwipSpeed", type Property::FLOAT.
189   * @SINCE_1_2.60
190   * @note Optional.
191   * @note If not supplied, the default is 50.0f.
192   */
193   DEPTH_MAXIMUM_SWIPE_SPEED,
194
195   /**
196   * @brief The duration of the flick animation in seconds of DepthLayout.
197   * @details Name "depthItemFlickAnimationDuration", type Property::FLOAT.
198   * @SINCE_1_2.60
199   * @note Optional.
200   * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
201   * @note Must be greater than zero; If not supplied, the default is 0.03f.
202   */
203   DEPTH_ITEM_FLICK_ANIMATION_DURATION,
204
205   /**
206   * @brief The tilt angle of DepthLayout.
207   * @details Name "depthTiltAngle",Property::FLOAT
208   * @SINCE_1_2.60
209   * @note Optional.
210   * @note If not supplied, the default is (Math::PI)*0.15f.
211   * @note This is clamped between -45 & 45 degrees.
212   */
213   DEPTH_TILT_ANGLE,
214
215   /**
216   * @brief The tilt angle of the individual items in the DepthLayout.
217   * @details Name "depthItemTiltAngle", type Property::FLOAT.
218   * @SINCE_1_2.60
219   * @note Optional.
220   * @note If not supplied, the default is -(Math::PI)*0.025f.
221   */
222   DEPTH_ITEM_TILT_ANGLE,
223
224   /**
225   * @brief The spacing angle between items in the SpiralLayout.
226   * @details Name "spiralItemSpacing", type Property::FLOAT.
227   * @SINCE_1_2.60
228   * @note Optional.
229   * @note If not supplied, the default is 9.5f.
230   */
231   SPIRAL_ITEM_SPACING,
232
233   /**
234   * @brief The factor used to customise the scroll speed while dragging and swiping the SpiralLayout.
235   * @details Name "spiralScrollSpeedFactor", type Property::FLOAT.
236   * @SINCE_1_2.60
237   * @note Optional.
238   * @note If not supplied, the default is 0.01f.
239   */
240   SPIRAL_SCROLL_SPEED_FACTOR,
241
242   /**
243   * @brief The maximum swipe speed in pixels per second of the SpiralLayout.
244   * @details Name "spiralMaximumSwipSpeed", type Property::FLOAT.
245   * @SINCE_1_2.60
246   * @note Optional.
247   * @note If not supplied, the default is 30.0f.
248   */
249   SPIRAL_MAXIMUM_SWIPE_SPEED,
250
251   /**
252   * @brief The duration of the flick animation in seconds of the SpiralLayout.
253   * @details Name "spiralItemFlickAnimationDuration", type Property::FLOAT.
254   * @SINCE_1_2.60
255   * @note Optional.
256   * @note This is the time taken to animate each item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered by a swipe gesture.
257   * @note Must be greater than zero; If not supplied, the default is 0.1f.
258   */
259   SPIRAL_ITEM_FLICK_ANIMATION_DURATION,
260
261   /**
262   * @brief The vertical distance for one revolution of the SpiralLayout.
263   * @details Name "spiralRevolutionDistance", type Property::FLOAT.
264   * @SINCE_1_2.60
265   * @note Optional.
266   * @note If not supplied, the default is 190.0f.
267   */
268   SPIRAL_REVOLUTION_DISTANCE,
269
270   /**
271   * @brief The alignment of the top-item, when at the beginning of the SpiralLayout.
272   * @details Name "spiralTopItemAlignment", type Property::FLOAT.
273   * @SINCE_1_2.60
274   * @note Optional.
275   * @note When at the beginning of the spiral (with a first-item layout-position of zero).A value of 0 indicates that the top-item is centered in the middle of the layout.
276   * A value of -0.5 or 0.5 indicates that the top-item is centred at the top or bottom of the layout respectively.
277   * @note If not supplied, the default is (-0.125f).
278   */
279   SPIRAL_TOP_ITEM_ALIGNMENT,
280 };
281
282 /**
283  * @}
284  */
285 } // namespace DefaultItemLayoutProperty
286
287 } // namespace Toolkit
288
289 } // namespace Dali
290
291 #endif // DALI_TOOLKIT_DEFAULT_ITEM_LAYOUT_PROPERTY_H