Merge "Support the underline and its attributes in span tag" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / markup-processor-underline.h
1 #ifndef DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_UNDERLINE_H
2 #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_UNDERLINE_H
3
4 /*
5  * Copyright (c) 2022 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 namespace Text
26 {
27 struct Tag;
28 struct Attribute;
29 struct UnderlinedCharacterRun;
30
31 /**
32  * @brief Fill the underlined character run with the type attribute value.
33  *
34  * @param[in] attribute the type attribute.
35  * @param[out] underlinedCharacterRun The underlined character run
36  */
37 void ProcessTypeAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
38
39 /**
40  * @brief Fill the underlined character run with the dash-gap attribute value.
41  *
42  * @param[in] attribute the dash-gap attribute.
43  * @param[out] underlinedCharacterRun The underlined character run
44  */
45 void ProcessDashGapAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
46
47 /**
48  * @brief Fill the underlined character run with the dash-width attribute value.
49  *
50  * @param[in] attribute the dash-width attribute.
51  * @param[out] underlinedCharacterRun The underlined character run
52  */
53 void ProcessDashWidthAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
54
55 /**
56  * @brief Fill the underlined character run with the height attribute value.
57  *
58  * @param[in] attribute the height attribute.
59  * @param[out] underlinedCharacterRun The underlined character run
60  */
61 void ProcessHeightAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
62
63 /**
64  * @brief Fill the underlined character run with the color attribute value.
65  *
66  * @param[in] attribute the color attribute.
67  * @param[out] underlinedCharacterRun The underlined character run
68  */
69 void ProcessColorAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
70
71 /**
72  * @brief Retrieves the underline run info from the tag and sets it to the underline run.
73  *
74  * @param[in] tag The underline tag and its attributes.
75  * @param[in,out] underlinedCharacterRun The underlined character run
76  */
77 void ProcessUnderlineTag(const Tag& tag, UnderlinedCharacterRun& underlinedCharacterRun);
78
79 } // namespace Text
80
81 } // namespace Toolkit
82
83 } // namespace Dali
84
85 #endif // DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_UNDERLINE_H