Merge "Fix TableView::GetNextKeyboardFocusableActor function by returning a valid...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / visuals / primitive-visual-properties.h
1 #ifndef DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H
3
4 /*
5  * Copyright (c) 2016 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 // INTERNAL INCLUDES
22 #include <dali-toolkit/public-api/toolkit-property-index-ranges.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 /**
31  * @addtogroup dali_toolkit_visuals
32  * @{
33  */
34
35 namespace PrimitiveVisual
36 {
37
38 namespace Property
39 {
40
41 enum
42 {
43   /**
44    * @brief The specific shape to render.
45    * @details Name "shape", type Shape::Type (Property::INTEGER) or Property::STRING.
46    * @SINCE_1_1.45
47    * @note Optional. If not specified, the default is Shape::SPHERE.
48    * @see Shape::Type
49    */
50   SHAPE = VISUAL_PROPERTY_START_INDEX,
51
52   /**
53    * @brief The color of the shape.
54    * @details Name "mixColor", type Property::VECTOR4.
55    * @SINCE_1_2_4
56    * @note Optional. If not specified, the default is Vector4(0.5, 0.5, 0.5, 1.0).
57    * @note Applies to ALL shapes.
58    */
59   MIX_COLOR,
60
61   /**
62    * @brief The number of slices as you go around the shape.
63    * @details Name "slices", type Property::INTEGER.
64    * For spheres and conical frustrums, this determines how many divisions there are as you go around the object.
65    * @SINCE_1_1.45
66    * @note Optional. If not specified, the default is 128.
67    * @note Applies to:
68    *      - Shape::SPHERE
69    *      - Shape::CONICAL_FRUSTRUM
70    *      - Shape::CONE
71    *      - Shape::CYLINDER
72    * @note The range is from 1 to 255.
73    */
74   SLICES,
75
76   /**
77    * @brief The number of stacks as you go down the shape.
78    * @details Name "stacks", type Property::INTEGER.
79    * For spheres, 'stacks' determines how many layers there are as you go down the object.
80    * @SINCE_1_1.45
81    * @note Optional. If not specified, the default is 128.
82    * @note Applies to:
83    *      - Shape::SPHERE
84    * @note The range is from 1 to 255.
85    */
86   STACKS,
87
88   /**
89    * @brief The scale of the radius of the top circle of a conical frustrum.
90    * @details Name "scaleTopRadius", type Property::FLOAT.
91    * @SINCE_1_1.45
92    * @note Optional. If not specified, the default is 1.0f.
93    * @note Applies to:
94    *      - Shape::CONICAL_FRUSTRUM
95    * @note Only values greater than or equal to 0.0f are accepted.
96    */
97   SCALE_TOP_RADIUS,
98
99   /**
100    * @brief The scale of the radius of the bottom circle of a conical frustrum.
101    * @details Name "scaleBottomRadius", type Property::FLOAT.
102    * @SINCE_1_1.45
103    * @note Optional. If not specified, the default is 1.5f.
104    * @note Applies to:
105    *      - Shape::CONICAL_FRUSTRUM
106    *      - Shape::CONE
107    * @note Only values greater than or equal to 0.0f are accepted.
108    */
109   SCALE_BOTTOM_RADIUS,
110
111   /**
112    * @brief The scale of the height of a conic.
113    * @details Name "scaleHeight", type Property::FLOAT.
114    * @SINCE_1_1.45
115    * @note Optional. If not specified, the default is 3.0f.
116    * @note Applies to:
117    *      - Shape::CONICAL_FRUSTRUM
118    *      - Shape::CONE
119    *      - Shape::CYLINDER
120    * @note Only values greater than or equal to 0.0f are accepted.
121    */
122   SCALE_HEIGHT,
123
124   /**
125    * @brief The scale of the radius of a cylinder.
126    * @details Name "scaleRadius", type Property::FLOAT.
127    * @SINCE_1_1.45
128    * @note Optional. If not specified, the default is 1.0f.
129    * @note Applies to:
130    *      - Shape::CYLINDER
131    * @note Only values greater than or equal to 0.0f are accepted.
132    */
133   SCALE_RADIUS,
134
135   /**
136    * @brief The dimensions of a cuboid. Scales in the same fashion as a 9-patch image.
137    * @details Name "scaleDimensions", type Property::VECTOR3.
138    * @SINCE_1_1.45
139    * @note Optional. If not specified, the default is Vector3::ONE.
140    * @note Applies to:
141    *      - Shape::CUBE
142    *      - Shape::OCTAHEDRON
143    *      - Shape::BEVELLED_CUBE
144    * @note Each vector3 parameter should be greater than or equal to 0.0f.
145    */
146   SCALE_DIMENSIONS,
147
148   /**
149    * @brief Determines how bevelled the cuboid should be, based off the smallest dimension.
150    * @details Name "bevelPercentage", type Property::FLOAT.
151    * Bevel percentage ranges from 0.0 to 1.0. It affects the ratio of the outer face widths to the width of the overall cube.
152    * @SINCE_1_1.45
153    * @note Optional. If not specified, the default is 0.0f (no bevel).
154    * @note Applies to:
155    *      - Shape::BEVELLED_CUBE
156    * @note The range is from 0.0f to 1.0f.
157    */
158   BEVEL_PERCENTAGE,
159
160   /**
161    * @brief Defines how smooth the bevelled edges should be.
162    * @details Name "bevelSmoothness", type Property::FLOAT.
163    * @SINCE_1_1.45
164    * @note Optional. If not specified, the default is 0.0f (sharp edges).
165    * @note Applies to:
166    *      - Shape::BEVELLED_CUBE
167    * @note The range is from 0.0f to 1.0f.
168    */
169   BEVEL_SMOOTHNESS,
170
171   /**
172    * @brief The position, in stage space, of the point light that applies lighting to the model.
173    * @details Name "lightPosition", type Property::VECTOR3.
174    * This is based off the stage's dimensions, so using the width and height of the stage halved will correspond to the center,
175    * and using all zeroes will place the light at the top left corner.
176    * @SINCE_1_1.45
177    * @note Optional. If not specified, the default is an offset outwards from the center of the screen.
178    * @note Applies to ALL shapes.
179    */
180   LIGHT_POSITION,
181 };
182
183 } // namespace Property
184
185 namespace Shape
186 {
187
188 /**
189  * @brief The primitive shape to render.
190  */
191 enum Type
192 {
193   SPHERE, ///< A perfectly round geometrical object in three-dimensional space. @SINCE_1_1.45
194   CONICAL_FRUSTRUM, ///< The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_1.45
195   CONE, ///< Equivalent to a conical frustrum with top radius of zero. @SINCE_1_1.45
196   CYLINDER, ///< Equivalent to a conical frustrum with equal radii for the top and bottom circles. @SINCE_1_1.45
197   CUBE, ///< Equivalent to a bevelled cube with a bevel percentage of zero. @SINCE_1_1.45
198   OCTAHEDRON, ///< Equivalent to a bevelled cube with a bevel percentage of one. @SINCE_1_1.45
199   BEVELLED_CUBE, ///< A cube/cuboid with all edges flattened to some degree. @SINCE_1_1.45
200 };
201 }
202
203 } // namespace PrimitiveVisual
204
205 /**
206  * @}
207  */
208
209 } // namespace Toolkit
210
211 } // namespace Dali
212
213 #endif // DALI_TOOLKIT_PRIMITIVE_VISUAL_PROPERTIES_H