1 #ifndef DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_UNDERLINE_H
2 #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_UNDERLINE_H
5 * Copyright (c) 2022 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/public-api/common/dali-vector.h>
25 #include <dali-toolkit/internal/text/underlined-character-run.h>
37 * @brief Fill the underlined character run with the type attribute value.
39 * @param[in] attribute the type attribute.
40 * @param[out] underlinedCharacterRun The underlined character run
42 void ProcessTypeAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
45 * @brief Fill the underlined character run with the dash-gap attribute value.
47 * @param[in] attribute the dash-gap attribute.
48 * @param[out] underlinedCharacterRun The underlined character run
50 void ProcessDashGapAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
53 * @brief Fill the underlined character run with the dash-width attribute value.
55 * @param[in] attribute the dash-width attribute.
56 * @param[out] underlinedCharacterRun The underlined character run
58 void ProcessDashWidthAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
61 * @brief Fill the underlined character run with the height attribute value.
63 * @param[in] attribute the height attribute.
64 * @param[out] underlinedCharacterRun The underlined character run
66 void ProcessHeightAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
69 * @brief Fill the underlined character run with the color attribute value.
71 * @param[in] attribute the color attribute.
72 * @param[out] underlinedCharacterRun The underlined character run
74 void ProcessColorAttribute(const Attribute& attribute, UnderlinedCharacterRun& underlinedCharacterRun);
77 * @brief Retrieves the underline run info from the tag and sets it to the underline run.
79 * @param[in] tag The underline tag and its attributes.
80 * @param[in,out] underlinedCharacterRun The underlined character run
82 void ProcessUnderlineTag(const Tag& tag, UnderlinedCharacterRun& underlinedCharacterRun);
85 * @brief Override the run's attributes which contained in the previous run. This is to handle the nested tags.
87 * @param[in,out] underlinedCharacterRuns The list of underlined character run
89 void OverrideNestedUnderlinedCharacterRuns(Vector<UnderlinedCharacterRun>& underlinedCharacterRuns);
93 } // namespace Toolkit
97 #endif // DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_UNDERLINE_H