Remove deprecated APIs in Tizen 3.0
[platform/core/uifw/dali-core.git] / dali / public-api / actors / actor-enumerations.h
1 #ifndef DALI_ACTOR_ENUMERATIONS_H
2 #define DALI_ACTOR_ENUMERATIONS_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 #include <dali/public-api/common/dali-common.h>
22
23 namespace Dali
24 {
25 /**
26  * @addtogroup dali_core_actors
27  * @{
28  */
29
30 /**
31  * @brief Enumeration for Actor color mode.
32  *
33  * @SINCE_1_0.0
34  */
35 enum ColorMode
36 {
37   USE_OWN_COLOR,                 ///< Actor will use its own color @SINCE_1_0.0
38   USE_PARENT_COLOR,              ///< Actor will use its parent color @SINCE_1_0.0
39   USE_OWN_MULTIPLY_PARENT_COLOR, ///< Actor will blend its color with its parents color. @SINCE_1_0.0
40   USE_OWN_MULTIPLY_PARENT_ALPHA  ///< Actor will blend its alpha with its parents alpha. This means when parent fades in or out child does as well. This is the default. @SINCE_1_0.0
41 };
42
43 /**
44  * @brief Enumeration for layout Dimensions.
45  * @SINCE_1_0.0
46  */
47 namespace Dimension
48 {
49
50 /**
51  * @brief Enumeration for Dimension types.
52  * @SINCE_1_0.0
53  */
54 enum Type
55 {
56   WIDTH  = 0x1,       ///< Width dimension @SINCE_1_0.0
57   HEIGHT = 0x2,       ///< Height dimension @SINCE_1_0.0
58
59   ALL_DIMENSIONS = 0x3  ///< Mask to cover all flags @SINCE_1_0.0
60 };
61
62 /**
63  * @brief Enumeration for Dimension number.
64  * @SINCE_1_0.0
65  */
66 enum Meta
67 {
68   DIMENSION_COUNT = 2  ///< Number of dimensions - update this if adding new dimension @SINCE_1_0.0
69 };
70
71 } // namespace Dimension
72
73 /**
74  * @brief Enumeration for size negotiation resize policies.
75  * @SINCE_1_0.0
76  */
77 namespace ResizePolicy
78 {
79
80 /**
81  * @brief Enumeration for ResizePolicy types.
82  * @SINCE_1_0.0
83  */
84 enum Type
85 {
86   FIXED,                 ///< Size is fixed as set by SetSize @SINCE_1_0.0
87   USE_NATURAL_SIZE,      ///< Size is to use the actor's natural size @SINCE_1_0.0 @see Actor::GetNaturalSize()
88   FILL_TO_PARENT,        ///< Size is to fill up to the actor's parent's bounds. Aspect ratio is not maintained. @SINCE_1_0.0
89   SIZE_RELATIVE_TO_PARENT,        ///< The actors size will be ( ParentSize * SizeRelativeToParentFactor ). @SINCE_1_0.0
90   SIZE_FIXED_OFFSET_FROM_PARENT,  ///< The actors size will be ( ParentSize + SizeRelativeToParentFactor ). @SINCE_1_0.0
91   FIT_TO_CHILDREN,       ///< Size will adjust to wrap around all children @SINCE_1_0.0
92   DIMENSION_DEPENDENCY,  ///< One dimension is dependent on the other @SINCE_1_0.0
93   USE_ASSIGNED_SIZE      ///< The size will be assigned to the actor @SINCE_1_0.0
94 };
95 const Type DEFAULT = USE_NATURAL_SIZE; ///< Default resize policy
96
97 } // namespace ResizePolicy
98
99 /**
100  * @brief Enumeration for policies to determine how an actor should resize itself when having its size set in size negotiation.
101  * @SINCE_1_0.0
102  */
103 namespace SizeScalePolicy
104 {
105
106 /**
107  * @brief Enumeration for SizeScalePolicy types.
108  * @SINCE_1_0.0
109  */
110 enum Type
111 {
112   USE_SIZE_SET,                ///< Use the size that was set @SINCE_1_0.0
113   FIT_WITH_ASPECT_RATIO,       ///< Fit within the size set maintaining natural size aspect ratio @SINCE_1_0.0
114   FILL_WITH_ASPECT_RATIO       ///< Fill up the size set maintaining natural size aspect ratio. May exceed size bounds in one dimension. @SINCE_1_0.0
115 };
116
117 } // namespace SizeScalePolicy
118
119 /**
120  * @brief Enumeration for horizontal alignment types.
121  * @SINCE_1_0.0
122  */
123 namespace HorizontalAlignment
124 {
125
126 /**
127  * @brief Enumeration for HorizontalAlignment types.
128  * @SINCE_1_0.0
129  */
130 enum Type
131 {
132   LEFT,         ///< Align horizontally left @SINCE_1_0.0
133   CENTER,       ///< Align horizontally center @SINCE_1_0.0
134   RIGHT         ///< Align horizontally right @SINCE_1_0.0
135 };
136
137 } // namespace HorizontalAlignment
138
139 /**
140  * @brief Enumeration for vertical alignment types.
141  * @SINCE_1_0.0
142  */
143 namespace VerticalAlignment
144 {
145
146 /**
147  * @brief Enumeration for VerticalAlignment types.
148  * @SINCE_1_0.0
149  */
150 enum Type
151 {
152   TOP,          ///< Align vertically top @SINCE_1_0.0
153   CENTER,       ///< Align vertically center @SINCE_1_0.0
154   BOTTOM        ///< Align vertically bottom @SINCE_1_0.0
155 };
156
157 } // namespace VerticalAlignment
158
159 /**
160  * @brief Enumeration for ClippingMode describing how this Actor's children will be clipped against it.
161  * @SINCE_1_2_5
162  */
163 namespace ClippingMode
164 {
165 /**
166  * @brief Enumeration for ClippingMode types.
167  * @SINCE_1_2_5
168  */
169 enum Type
170 {
171   DISABLED,                     ///< This Actor will not clip its children. @SINCE_1_2_5
172   CLIP_CHILDREN,                ///< This Actor will clip itself and all children to within the pixel areas of this actors renderers. @SINCE_1_2_5
173   CLIP_TO_BOUNDING_BOX          ///< This Actor will clip itself and all children to within a screen-aligned rectangle encompassing its boundaries. @SINCE_1_2.61
174 };
175
176 } // namespace ClippingMode
177
178 /**
179  * @brief Enumeration for the direction of the layout.
180  * @SINCE_1_2.60
181  */
182 namespace LayoutDirection
183 {
184
185 /**
186  * @brief Enumeration for the LayoutDirection types.
187  * @SINCE_1_2.60
188  */
189 enum Type
190 {
191   LEFT_TO_RIGHT,   ///< Layout direction is from Left to Right direction. @SINCE_1_2.60
192   RIGHT_TO_LEFT    ///< Layout direction is from Right to Left direction. @SINCE_1_2.60
193 };
194
195 } // namespace LayoutDirection
196
197 /**
198  * @}
199  */
200 } // namespace Dali
201
202 #endif // DALI_ACTOR_ENUMERATIONS_H