1 #ifndef __DALI_ACTOR_ENUMERATIONS_H__
2 #define __DALI_ACTOR_ENUMERATIONS_H__
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <dali/public-api/common/dali-common.h>
26 * @addtogroup dali_core_actors
31 * @brief Actor color mode.
36 USE_OWN_COLOR, ///< Actor will use its own color
37 USE_PARENT_COLOR, ///< Actor will use its parent color
38 USE_OWN_MULTIPLY_PARENT_COLOR, ///< Actor will blend its color with its parents color.
39 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.
43 * @brief Actor position inheritance mode.
45 enum PositionInheritanceMode
47 INHERIT_PARENT_POSITION, ///< Actor will inherit its parent position. This is the default
48 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.
49 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.
50 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.
54 * @brief Dimensions for layout
60 WIDTH = 0x1, ///< Width dimension
61 HEIGHT = 0x2, ///< Height dimension
63 ALL_DIMENSIONS = 0x3 ///< Mask to cover all flags
68 DIMENSION_COUNT = 2 ///< Number of dimensions - update this if adding new dimension
73 * @brief Size negotiation resize policies
75 namespace ResizePolicy
79 FIXED, ///< Size is fixed as set by SetSize
80 USE_NATURAL_SIZE, ///< Size is to use the actor's natural size
81 FILL_TO_PARENT, ///< Size is to fill up to the actor's parent's bounds. Aspect ratio not maintained.
82 SIZE_RELATIVE_TO_PARENT, ///< The actors size will be ( ParentSize * SizeRelativeToParentFactor ).
83 SIZE_FIXED_OFFSET_FROM_PARENT, ///< The actors size will be ( ParentSize + SizeRelativeToParentFactor ).
84 FIT_TO_CHILDREN, ///< Size will adjust to wrap around all children
85 DIMENSION_DEPENDENCY, ///< One dimension is dependent on the other
86 USE_ASSIGNED_SIZE ///< The size will be assigned to the actor
88 const Type DEFAULT = USE_NATURAL_SIZE; ///< Default resize policy
92 * @brief Policies to determine how an actor should resize itself when having its size set in size negotiation
94 namespace SizeScalePolicy
98 USE_SIZE_SET, ///< Use the size that was set
99 FIT_WITH_ASPECT_RATIO, ///< Fit within the size set maintaining natural size aspect ratio
100 FILL_WITH_ASPECT_RATIO ///< Fill up the size set maintaining natural size aspect ratio. May exceed size bounds in one dimension.
105 * @brief Different types of alignment.
107 namespace HorizontalAlignment
111 LEFT, ///< Align horizontally left
112 CENTER, ///< Align horizontally center
113 RIGHT ///< Align horiztonally right
117 namespace VerticalAlignment
121 TOP, ///< Align vertically top
122 CENTER, ///< Align vertically center
123 BOTTOM ///< Align vertically bottom
132 #endif // __DALI_ACTOR_ENUMERATIONS_H__