2d766623ae9662f9a20a94ceab1064abc34131a8
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / visual-factory / devel-visual-properties.h
1 #ifndef DALI_TOOLKIT_DEVEL_VISUAL_PROPERTIES_H
2 #define DALI_TOOLKIT_DEVEL_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 #include <dali-toolkit/public-api/visuals/visual-properties.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 namespace Visual
32 {
33
34 // Mirror of public API Property namespace with addition of enums that are not yet
35 // public. A namespace alias is used below to reduce implementation cruft.
36
37 namespace DevelProperty
38 {
39
40 enum Type
41 {
42   TYPE   = Dali::Toolkit::Visual::Property::TYPE,
43   SHADER = Dali::Toolkit::Visual::Property::SHADER,
44
45   /**
46    * @brief The transform used by the visual.
47    * @details Name "transform", type Property::Map.
48
49    * @note Optional.
50    * @see DevelProperty::Transform::Property
51    */
52   TRANSFORM = SHADER+1//Dali::Toolkit::Visual::Property::SHADER+1
53 };
54
55 namespace Transform
56 {
57
58 namespace Property
59 {
60
61 enum Type
62 {
63   /**
64    * @brief Offset of the visual. It can be either relative (percentage of the parent)
65    * or absolute (in world units).
66    * @details Name "offset", type Property::VECTOR2
67    */
68   OFFSET,
69
70   /**
71    * @brief Size of the visual. It can be either relative (percentage of the parent)
72    * or absolute (in world units).
73    * @details Name "size", type Property::VECTOR2
74    */
75   SIZE,
76
77   /**
78    * @brief The origin of the visual within its control area.
79    * @details Name "origin", type Align::Type (Property::INTEGER) or Property::STRING.
80    * @see Toolkit::Align
81    */
82   ORIGIN,
83
84   /**
85    * @brief The anchor-point of the visual
86    * @details Name "anchorPoint", type Align::Type (Property::INTEGER) or Property::STRING.
87    * @see Toolkit::Align
88    */
89   ANCHOR_POINT,
90
91   /**
92    * @brief Indicates which components of the offset and size are relative
93    * (percentage of the parent) or absolute (in world units).
94    * 0 indicates the component is relative, and 1 absolute.
95    * @details Name "offsetSizeMode", type Property::VECTOR4
96    */
97   OFFSET_SIZE_MODE
98 };
99
100 } //namespace Property
101
102 } //namespace Transform
103
104 } // namespace DevelProperty
105
106 } // namespace Visual
107
108 namespace VisualProperty = Visual::DevelProperty;
109
110 } // namespace Toolkit
111
112 } // namespace Dali
113
114
115 #endif // DALI_TOOLKIT_DEVEL_VISUAL_PROPERTIES_H