Extending Text Styles - Adding Dashed/Double Underline
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-style-properties-devel.h
1 #ifndef DALI_TOOLKIT_TEXT_STYLE_PROPERTIES_DEVEL_H
2 #define DALI_TOOLKIT_TEXT_STYLE_PROPERTIES_DEVEL_H
3
4 /*
5  * Copyright (c) 2020 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 namespace Dali
22 {
23 namespace Toolkit
24 {
25 /**
26  * @addtogroup dali_toolkit_controls
27  * @{
28  */
29
30 namespace DevelText
31 {
32 namespace Shadow
33 {
34 /**
35  * @brief Used by Text controls to show different styles of text.
36  *
37  */
38 namespace Property
39 {
40 enum
41 {
42   /**
43    * @brief The color of the shadow.
44    * @details Name "color", type Property::STRING or Property::VECTOR4.
45    * @note Optional. If not provided the default color (BLACK) is used.
46    */
47   COLOR,
48
49   /**
50    * @brief The offset in pixels of the shadow.
51    * @details Name "offset", type Property::STRING or Property::VECTOR2. i.e "3.0 3.0" or Vector2( 3.f, 3.f )
52    * @note Optional. If not provided then the shadow is not enabled.
53    */
54   OFFSET,
55
56   /**
57    * @brief The radius of the Gaussian blur for the soft shadow.
58    * @details Name "blurRadius", type Property::STRING or Property::FLOAT. i.e "5.0" or 5.f
59    * @note Optional. If not provided then the soft shadow is not enabled.
60    */
61   BLUR_RADIUS
62 };
63
64 } // namespace Property
65
66 } // namespace Shadow
67
68 namespace Underline
69 {
70 namespace Property
71 {
72 enum
73 {
74   /**
75    * @brief Whether the underline is enabled.
76    * @details Name "enable", type Property::STRING or Property::BOOLEAN. i.e. "true", "false", true or false
77    * @note Optional. By default is disabled.
78    */
79   ENABLE,
80
81   /**
82    * @brief The color of the underline.
83    * @details Name "color", type Property::STRING or Property::VECTOR4
84    * @note Optional. If not provided then the color of the text is used.
85    */
86   COLOR,
87
88   /**
89    * @brief The height in pixels of the underline.
90    * @details Name "height", type Property::STRING or Property::FLOAT. i.e. "1.0" or 1.f
91    * @note Optional. If not provided then the default height is used (1 pixel).
92    */
93   HEIGHT,
94
95   /**
96    * @brief The type of the underline.
97    * @details Name "type", type Property::STRING or type Text::Underline::Type. i.e "dashed" or Text::Underline::DASHED
98    *          Values "SOLID", "DASHED", "DOUBLE" , default SOLID.
99    * @note Optional. If not provided then the default type is used (solid underline).
100    */
101   TYPE,
102
103   /**
104    * @brief The width in pixels of the dashes of the dashed underline. Only valid when "DASHED" underline type is used.
105    * @details Name "dashWidth", type Property::STRING or Property::FLOAT. e.g. "1.0" or 1.f
106    * @note Optional. If not provided then the default width is used (1 pixel).
107    */
108   DASH_WIDTH,
109
110   /**
111    * @brief The gap in pixels between the dashes of the dashed underline. Only valid when "DASHED" underline type is used.
112    * @details Name "dashGap", type Property::STRING or Property::FLOAT. e.g. "1.0" or 1.f
113    * @note Optional. If not provided then the default gap is used (1 pixel).
114    */
115   DASH_GAP
116 };
117
118 } // namespace Property
119
120 } // namespace Underline
121
122 namespace Outline
123 {
124 namespace Property
125 {
126 enum
127 {
128   /**
129    * @brief The color of the outline.
130    * @details Name "color", type Property::STRING or Property::VECTOR4
131    * @note Optional. If not provided the default color (WHITE) is used.
132    */
133   COLOR,
134
135   /**
136    * @brief The width in pixels of the outline.
137    * @details Name "width", type Property::STRING or Property::FLOAT i.e. "1.0" or 1.f
138    * @note Optional. If not provided then the outline is not enabled.
139    */
140   WIDTH
141 };
142
143 } // namespace Property
144
145 } // namespace Outline
146
147 namespace Background
148 {
149 namespace Property
150 {
151 enum
152 {
153   /**
154    * @brief Whether to paint the text's background.
155    * @details Name "enable", type Property::STRING or Property::BOOLEAN i.e. "true", "false", true or false
156    * @note Optional. By default is disabled.
157    */
158   ENABLE,
159
160   /**
161    * @brief The color of the background.
162    * @details Name "color", type Property::STRING or Property::VECTOR4
163    * @note Optional. If not provided the default color (CYAN) is used.
164    */
165   COLOR
166 };
167
168 } // namespace Property
169
170 } // namespace Background
171
172 namespace Strikethrough
173 {
174 namespace Property
175 {
176 enum
177 {
178   /**
179    * @brief Whether the strikethrough is enabled.
180    * @details Name "enable", type Property::STRING or Property::BOOLEAN. i.e. "true", "false", true or false
181    * @note Optional. By default is disabled.
182    */
183   ENABLE,
184
185   /**
186    * @brief The color of the strikethrough.
187    * @details Name "color", type Property::STRING or Property::VECTOR4
188    * @note Optional. If not provided then the default color is black.
189    */
190   COLOR,
191
192   /**
193    * @brief The height in pixels of the strikethrough.
194    * @details Name "height", type Property::STRING or Property::FLOAT. i.e. "1.0" or 1.f
195    * @note Optional. If not provided then the default height is used (1 pixel).
196    */
197   HEIGHT
198 };
199
200 } // namespace Property
201
202 } // namespace Strikethrough
203
204 } // namespace DevelText
205
206 /**
207  * @}
208  */
209
210 } // namespace Toolkit
211
212 } // namespace Dali
213
214 #endif // DALI_TOOLKIT_TEXT_STYLE_PROPERTIES_DEVEL_H