DALi Version 1.4.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  * @DEPRECATED_1_1.24 Use SetInheritPosition instead
45  * @brief Enumeration for Actor position inheritance mode.
46  * @SINCE_1_0.0
47  */
48 enum PositionInheritanceMode
49 {
50   INHERIT_PARENT_POSITION,                 ///< Actor will inherit its parent position. This is the default @SINCE_1_0.0
51   USE_PARENT_POSITION,                     ///< Actor will copy its parent position. This is useful if many actors are stacked together in the same place. This option ignores parent origin and anchor point. @SINCE_1_0.0
52   USE_PARENT_POSITION_PLUS_LOCAL_POSITION, ///< Actor will copy its parent position and add local position. This is useful if many actors are stacked together in the same place with an offset.  This option ignores parent origin and anchor point. @SINCE_1_0.0
53   DONT_INHERIT_POSITION                    ///< Actor will not inherit position. Local position is treated as world position. This is useful if a constraint is used to override local position or if an actor is positioned globally. This option ignores parent origin, anchor point and local position. @SINCE_1_0.0
54 };
55
56 /**
57  * @brief Enumeration for layout Dimensions.
58  * @SINCE_1_0.0
59  */
60 namespace Dimension
61 {
62
63 /**
64  * @brief Enumeration for Dimension types.
65  * @SINCE_1_0.0
66  */
67 enum Type
68 {
69   WIDTH  = 0x1,       ///< Width dimension @SINCE_1_0.0
70   HEIGHT = 0x2,       ///< Height dimension @SINCE_1_0.0
71
72   ALL_DIMENSIONS = 0x3  ///< Mask to cover all flags @SINCE_1_0.0
73 };
74
75 /**
76  * @brief Enumeration for Dimension number.
77  * @SINCE_1_0.0
78  */
79 enum Meta
80 {
81   DIMENSION_COUNT = 2  ///< Number of dimensions - update this if adding new dimension @SINCE_1_0.0
82 };
83
84 } // namespace Dimension
85
86 /**
87  * @brief Enumeration for size negotiation resize policies.
88  * @SINCE_1_0.0
89  */
90 namespace ResizePolicy
91 {
92
93 /**
94  * @brief Enumeration for ResizePolicy types.
95  * @SINCE_1_0.0
96  */
97 enum Type
98 {
99   FIXED,                 ///< Size is fixed as set by SetSize @SINCE_1_0.0
100   USE_NATURAL_SIZE,      ///< Size is to use the actor's natural size @SINCE_1_0.0 @see Actor::GetNaturalSize()
101   FILL_TO_PARENT,        ///< Size is to fill up to the actor's parent's bounds. Aspect ratio is not maintained. @SINCE_1_0.0
102   SIZE_RELATIVE_TO_PARENT,        ///< The actors size will be ( ParentSize * SizeRelativeToParentFactor ). @SINCE_1_0.0
103   SIZE_FIXED_OFFSET_FROM_PARENT,  ///< The actors size will be ( ParentSize + SizeRelativeToParentFactor ). @SINCE_1_0.0
104   FIT_TO_CHILDREN,       ///< Size will adjust to wrap around all children @SINCE_1_0.0
105   DIMENSION_DEPENDENCY,  ///< One dimension is dependent on the other @SINCE_1_0.0
106   USE_ASSIGNED_SIZE      ///< The size will be assigned to the actor @SINCE_1_0.0
107 };
108 const Type DEFAULT = USE_NATURAL_SIZE; ///< Default resize policy
109
110 } // namespace ResizePolicy
111
112 /**
113  * @brief Enumeration for policies to determine how an actor should resize itself when having its size set in size negotiation.
114  * @SINCE_1_0.0
115  */
116 namespace SizeScalePolicy
117 {
118
119 /**
120  * @brief Enumeration for SizeScalePolicy types.
121  * @SINCE_1_0.0
122  */
123 enum Type
124 {
125   USE_SIZE_SET,                ///< Use the size that was set @SINCE_1_0.0
126   FIT_WITH_ASPECT_RATIO,       ///< Fit within the size set maintaining natural size aspect ratio @SINCE_1_0.0
127   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
128 };
129
130 } // namespace SizeScalePolicy
131
132 /**
133  * @brief Enumeration for horizontal alignment types.
134  * @SINCE_1_0.0
135  */
136 namespace HorizontalAlignment
137 {
138
139 /**
140  * @brief Enumeration for HorizontalAlignment types.
141  * @SINCE_1_0.0
142  */
143 enum Type
144 {
145   LEFT,         ///< Align horizontally left @SINCE_1_0.0
146   CENTER,       ///< Align horizontally center @SINCE_1_0.0
147   RIGHT         ///< Align horizontally right @SINCE_1_0.0
148 };
149
150 } // namespace HorizontalAlignment
151
152 /**
153  * @brief Enumeration for vertical alignment types.
154  * @SINCE_1_0.0
155  */
156 namespace VerticalAlignment
157 {
158
159 /**
160  * @brief Enumeration for VerticalAlignment types.
161  * @SINCE_1_0.0
162  */
163 enum Type
164 {
165   TOP,          ///< Align vertically top @SINCE_1_0.0
166   CENTER,       ///< Align vertically center @SINCE_1_0.0
167   BOTTOM        ///< Align vertically bottom @SINCE_1_0.0
168 };
169
170 } // namespace VerticalAlignment
171
172 /**
173  * @brief Enumeration for ClippingMode describing how this Actor's children will be clipped against it.
174  * @SINCE_1_2_5
175  */
176 namespace ClippingMode
177 {
178 /**
179  * @brief Enumeration for ClippingMode types.
180  * @SINCE_1_2_5
181  */
182 enum Type
183 {
184   DISABLED,                     ///< This Actor will not clip its children. @SINCE_1_2_5
185   CLIP_CHILDREN,                ///< This Actor will clip itself and all children to within the pixel areas of this actors renderers. @SINCE_1_2_5
186   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
187 };
188
189 } // namespace ClippingMode
190
191 /**
192  * @brief Enumeration for the direction of the layout.
193  * @SINCE_1_2.60
194  */
195 namespace LayoutDirection
196 {
197
198 /**
199  * @brief Enumeration for the LayoutDirection types.
200  * @SINCE_1_2.60
201  */
202 enum Type
203 {
204   LEFT_TO_RIGHT,   ///< Layout direction is from Left to Right direction. @SINCE_1_2.60
205   RIGHT_TO_LEFT    ///< Layout direction is from Right to Left direction. @SINCE_1_2.60
206 };
207
208 } // namespace LayoutDirection
209
210 /**
211  * @}
212  */
213 } // namespace Dali
214
215 #endif // DALI_ACTOR_ENUMERATIONS_H