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