Update Actors' public header comments
[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) 2015 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 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 Actor position inheritance mode.
45  * @SINCE_1_0.0
46  */
47 enum PositionInheritanceMode
48 {
49   INHERIT_PARENT_POSITION,                 ///< Actor will inherit its parent position. This is the default @SINCE_1_0.0
50   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
51   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
52   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
53 };
54
55 /**
56  * @brief Dimensions for layout
57  * @SINCE_1_0.0
58  */
59 namespace Dimension
60 {
61 enum Type
62 {
63   WIDTH  = 0x1,       ///< Width dimension @SINCE_1_0.0
64   HEIGHT = 0x2,       ///< Height dimension @SINCE_1_0.0
65
66   ALL_DIMENSIONS = 0x3  ///< Mask to cover all flags @SINCE_1_0.0
67 };
68
69 enum Meta
70 {
71   DIMENSION_COUNT = 2  ///< Number of dimensions - update this if adding new dimension @SINCE_1_0.0
72 };
73 }
74
75 /**
76  * @brief Size negotiation resize policies
77  * @SINCE_1_0.0
78  */
79 namespace ResizePolicy
80 {
81 enum Type
82 {
83   FIXED,                 ///< Size is fixed as set by SetSize @SINCE_1_0.0
84   USE_NATURAL_SIZE,      ///< Size is to use the actor's natural size @SINCE_1_0.0
85   FILL_TO_PARENT,        ///< Size is to fill up to the actor's parent's bounds. Aspect ratio is not maintained. @SINCE_1_0.0
86   SIZE_RELATIVE_TO_PARENT,        ///< The actors size will be ( ParentSize * SizeRelativeToParentFactor ). @SINCE_1_0.0
87   SIZE_FIXED_OFFSET_FROM_PARENT,  ///< The actors size will be ( ParentSize + SizeRelativeToParentFactor ). @SINCE_1_0.0
88   FIT_TO_CHILDREN,       ///< Size will adjust to wrap around all children @SINCE_1_0.0
89   DIMENSION_DEPENDENCY,  ///< One dimension is dependent on the other @SINCE_1_0.0
90   USE_ASSIGNED_SIZE      ///< The size will be assigned to the actor @SINCE_1_0.0
91 };
92 const Type DEFAULT = USE_NATURAL_SIZE; ///< Default resize policy
93 }
94
95 /**
96  * @brief Policies to determine how an actor should resize itself when having its size set in size negotiation
97  * @SINCE_1_0.0
98  */
99 namespace SizeScalePolicy
100 {
101 enum Type
102 {
103   USE_SIZE_SET,                ///< Use the size that was set @SINCE_1_0.0
104   FIT_WITH_ASPECT_RATIO,       ///< Fit within the size set maintaining natural size aspect ratio @SINCE_1_0.0
105   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
106 };
107 }
108
109 /**
110  * @brief Horizontal alignment types.
111  * @SINCE_1_0.0
112  */
113 namespace HorizontalAlignment
114 {
115 enum Type
116 {
117   LEFT,         ///< Align horizontally left @SINCE_1_0.0
118   CENTER,       ///< Align horizontally center @SINCE_1_0.0
119   RIGHT         ///< Align horiztonally right @SINCE_1_0.0
120 };
121 }
122
123 /**
124  * @brief Vertical alignment types.
125  * @SINCE_1_0.0
126  */
127 namespace VerticalAlignment
128 {
129 enum Type
130 {
131   TOP,          ///< Align vertically top @SINCE_1_0.0
132   CENTER,       ///< Align vertically center @SINCE_1_0.0
133   BOTTOM        ///< Align vertically bottom @SINCE_1_0.0
134 };
135 }
136
137 /**
138  * @}
139  */
140 } // namespace Dali
141
142 #endif // __DALI_ACTOR_ENUMERATIONS_H__