1 #ifndef DALI_TOOLKIT_TEXT_TEXT_SPANNABLE_H
2 #define DALI_TOOLKIT_TEXT_TEXT_SPANNABLE_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-toolkit/devel-api/text/spanned.h>
23 #include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
24 #include <dali-toolkit/public-api/controls/text-controls/text-field.h>
25 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
34 * @brief Set the @p spannedText into @p textLabel
35 * the spanned text contains content (text) and format (spans with ranges)
36 * the text is copied into text-controller and the spans are applied on ranges
38 * @note the TEXT in @p textLabel will be replaced with text from @p spannedText
39 * and all the applied styles @p textLabel will be replaced the styles from @p spannedText
40 * in-case there are styles were applied from markup-processor will be removed
43 * @param[in] textLabel The instance of TextLabel.
44 * @param[in] spannedText the text with spans.
46 DALI_TOOLKIT_API void SetSpannedText(TextLabel textLabel, const Spanned& spannedText);
49 * @brief Set the @p spannedText into @p textField
50 * the spanned text contains content (text) and format (spans with ranges)
51 * the text is copied into text-controller and the spans are applied on ranges
53 * @note the TEXT in @p textField will be replaced with text from @p spannedText
54 * and all the applied styles @p textField will be replaced the styles from @p spannedText
55 * in-case there are styles were applied from markup-processor will be removed
58 * @param[in] textField The instance of TextField.
59 * @param[in] spannedText the text with spans.
61 DALI_TOOLKIT_API void SetSpannedText(TextField textField, const Spanned& spannedText);
64 * @brief Set the @p spannedText into @p textEditor
65 * the spanned text contains content (text) and format (spans with ranges)
66 * the text is copied into text-controller and the spans are applied on ranges
68 * @note the TEXT in @p textEditor will be replaced with text from @p spannedText
69 * and all the applied styles @p textEditor will be replaced the styles from @p spannedText
70 * in-case there are styles were applied from markup-processor will be removed
73 * @param[in] textEditor The instance of TextEditor.
74 * @param[in] spannedText the text with spans.
76 DALI_TOOLKIT_API void SetSpannedText(TextEditor textEditor, const Spanned& spannedText);
80 } // namespace Toolkit
84 #endif // DALI_TOOLKIT_TEXT_TEXT_SPANNABLE_H