1 #ifndef DALI_TOOLKIT_INTERNAL_TEXT_EFFECTS_STYLE_H
2 #define DALI_TOOLKIT_INTERNAL_TEXT_EFFECTS_STYLE_H
5 * Copyright (c) 2021 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.
22 #include <dali-toolkit/internal/text/text-controller.h>
34 DEFAULT, ///< The default text effect style.
35 INPUT ///< The input text effect style.
40 * @brief Parses the shadow properties.
42 * @param[in] shadowProperties The map with the shadow properties.
43 * @param[out] colorDefined Whether the shadow's color is defined.
44 * @param[out] color The shadow's color.
45 * @param[out] offsetDefined Whether the shadow's offset is defined.
46 * @param[out] offset The shadow's offset.
48 bool ParseShadowProperties(const Property::Map& shadowProperties,
55 * @brief Parses the underline properties.
57 * @param[in] underlineProperties The map with the underline properties.
58 * @param[out] enabled Whether the underline is enabled.
59 * @param[out] colorDefined Whether the underline's color is defined.
60 * @param[out] color The underline's color.
61 * @param[out] heightDefined Whether the underline's height is defined.
62 * @param[out] height The underline's height.
64 bool ParseUnderlineProperties(const Property::Map& underlineProperties,
72 * @brief Parses the outline properties.
74 * @param[in] outlineProperties The map with the outline properties.
75 * @param[out] colorDefined Whether the outline's color is defined.
76 * @param[out] color The outline's color.
77 * @param[out] widthDefined Whether the outline's width is defined.
78 * @param[out] width The outline's width.
80 bool ParseOutlineProperties(const Property::Map& outlineProperties,
87 * @brief Parses the background properties.
89 * @param[in] backgroundProperties The map with the background properties.
90 * @param[out] enabled Whether the background is enabled.
91 * @param[out] colorDefined Whether the background color is defined.
92 * @param[out] color The background color.
94 bool ParseBackgroundProperties(const Property::Map& backgroundProperties,
100 * @brief Parses the strikethrough properties.
102 * @param[in] strikethroughProperties The map with the strikethrough properties.
103 * @param[out] enabled Whether the strikethrough is enabled.
104 * @param[out] colorDefined Whether the strikethrough's color is defined.
105 * @param[out] color The strikethrough's color.
106 * @param[out] heightDefined Whether the strikethrough's height is defined.
107 * @param[out] height The strikethrough's height.
109 bool ParseStrikethroughProperties(const Property::Map& strikethroughProperties,
117 * @brief Sets the underline properties.
119 * @param[in] controller The text's controller.
120 * @param[in] value The values of the underline's properties.
121 * @param[in] type Whether the property is for the default underline or the input underline.
123 * @return Whether the underline properties have been updated.
125 bool SetUnderlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
128 * @brief Sets the strikethrough properties.
130 * @param[in] controller The text's controller.
131 * @param[in] value The values of the strikethrough's properties.
132 * @param[in] type Whether the property is for the default strikethrough or the input strikethrough.
134 * @return Whether the strikethrough properties have been updated.
136 bool SetStrikethroughProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
139 * @brief Retrieves the underline's properties.
141 * @param[in] controller The text's controller.
142 * @param[out] value The value of the underline's properties.
143 * @param[in] type Whether the property is for the default underline or the input underline.
145 void GetUnderlineProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
148 * @brief Retrieves the strikethrough's properties.
150 * @param[in] controller The text's controller.
151 * @param[out] value The value of the strikethrough's properties.
152 * @param[in] type Whether the property is for the default strikethrough or the input strikethrough.
154 void GetStrikethroughProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
157 * @brief Sets the shadow properties.
159 * @param[in] controller The text's controller.
160 * @param[in] value The values of the shadow's style.
161 * @param[in] type Whether the property is for the default shadow's style or the input shadow's style.
163 * @return Whether the shadow properties have been updated.
165 bool SetShadowProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
168 * @brief Retrieves the shadow's properties.
170 * @param[in] controller The text's controller.
171 * @param[out] value The value of the shadow's properties.
172 * @param[in] type Whether the property is for the default shadow or the input shadow.
174 void GetShadowProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
177 * @brief Sets the emboss properties.
179 * @param[in] controller The text's controller.
180 * @param[in] value The values of the emboss's properties.
181 * @param[in] type Whether the property is for the default emboss or the input emboss.
183 * @return Whether the emboss properties have been updated.
185 bool SetEmbossProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
188 * @brief Retrieves the emboss's properties.
190 * @param[in] controller The text's controller.
191 * @param[out] value The value of the emboss's properties.
192 * @param[in] type Whether the property is for the default emboss or the input emboss.
194 void GetEmbossProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
197 * @brief Sets the outline properties.
199 * @param[in] controller The text's controller.
200 * @param[in] value The values of the outline's properties.
201 * @param[in] type Whether the property is for the default outline or the input outline.
203 * @return Whether the outline properties have been updated.
205 bool SetOutlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
208 * @brief Retrieves the outline's properties.
210 * @param[in] controller The text's controller.
211 * @param[out] value The value of the outline's properties.
212 * @param[in] type Whether the property is for the default outline or the input outline.
214 void GetOutlineProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
217 * @brief Sets the background properties.
219 * @param[in] controller The text's controller.
220 * @param[in] value The values of the background's properties.
221 * @param[in] type Whether the property is for the default background or the input background.
223 * @return Whether the background properties have been updated.
225 bool SetBackgroundProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
228 * @brief Retrieves the background's properties.
230 * @param[in] controller The text's controller.
231 * @param[out] value The value of the underline's properties.
232 * @param[in] type Whether the property is for the default background or the input background.
234 void GetBackgroundProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
238 } // namespace Toolkit
242 #endif // DALI_TOOLKIT_INTERNAL_TEXT_EFFECTS_STYLE_H