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