X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Ftext-controls%2Ftext-editor-devel.h;h=196cc3b1a056dde824913a788f5a9e453faea272;hp=345368d608a8bfb14ae781224421b6c4d95132a0;hb=aaa8f34f5cbfdb73d82d3b145ff76ccc077f6365;hpb=1faaaa8fca69253fdb9a0db54d37c8552f86ee43 diff --git a/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h b/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h index 345368d..196cc3b 100644 --- a/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h +++ b/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -178,6 +178,14 @@ enum Type FONT_SIZE_SCALE, /** + * @brief True to enable the font size scale or false to disable. + * @details Name "enableFontSizeScale", type Property::BOOLEAN. + * @note The default value is true. + * If false, font size scale is not apppied. + */ + ENABLE_FONT_SIZE_SCALE, + + /** * @brief The position for primary cursor. * @details Name "primaryCursorPosition", type Property::INTEGER. */ @@ -274,6 +282,18 @@ enum Type * @note If the font size is larger than the line size, it works with the font size. */ MIN_LINE_SIZE, + + /** + * @brief A horizontal line through the text center. + * @details Name "strikethrough", type Property::MAP. + */ + STRIKETHROUGH, + + /** + * @brief The strikethrough parameters of the new input text. + * @details Name "inputStrikethrough", type Property::MAP. + */ + INPUT_STRIKETHROUGH, }; } // namespace Property @@ -397,6 +417,40 @@ using SelectionChangedSignalType = Signal; DALI_TOOLKIT_API SelectionChangedSignalType& SelectionChangedSignal(TextEditor textEditor); /** + * @brief selection cleared signal type. + */ +using SelectionClearedSignalType = Signal; + +/** + * @brief This signal is emitted when the selection has been cleared. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName( TextEditor textEditor); + * @endcode + * @param[in] textEditor The instance of TextEditor. + * @return The signal to connect to + */ +DALI_TOOLKIT_API SelectionClearedSignalType& SelectionClearedSignal(TextEditor textEditor); + +/** + * @brief selection start signal type. + */ +using SelectionStartedSignalType = Signal; + +/** + * @brief This signal is emitted when the selection start. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName( TextEditor textEditor); + * @endcode + * @param[in] textEditor The instance of TextEditor. + * @return The signal to connect to + */ +DALI_TOOLKIT_API SelectionStartedSignalType& SelectionStartedSignal(TextEditor textEditor); + +/** * @brief Select the whole text of TextEditor. * * @param[in] textEditor The instance of TextEditor. @@ -434,6 +488,30 @@ DALI_TOOLKIT_API void SelectText(TextEditor textEditor, const uint32_t start, co DALI_TOOLKIT_API void ScrollBy(TextEditor textEditor, Vector2 scroll); /** + * @brief Get the rendered size of a specific text range. + * if the requested text is at multilines, multiple sizes will be returned for each text located in a separate line. + * if a line contains characters with different directions, multiple sizes will be returned for each block of contiguous characters with the same direction. + * + * @param[in] textEditor The instance of TextEditor. + * @param[in] startIndex start index of the text requested to calculate size for. + * @param[in] endIndex end index(included) of the text requested to calculate size for. + * @return list of sizes of the reuested text. + */ +DALI_TOOLKIT_API Vector GetTextSize(TextEditor textEditor, const uint32_t startIndex, const uint32_t endIndex); + +/** + * @brief Get the top/left rendered position of a specific text range. + * if the requested text is at multilines, multiple positions will be returned for each text located in a separate line. + * if a line contains characters with different directions, multiple positions will be returned for each block of contiguous characters with the same direction. + * + * @param[in] textEditor The instance of TextEditor. + * @param[in] startIndex start index of the text requested to get position to. + * @param[in] endIndex end index(included) of the text requested to get position to. + * @return list of positions of the requested text. + */ +DALI_TOOLKIT_API Vector GetTextPosition(TextEditor textEditor, const uint32_t startIndex, const uint32_t endIndex); + +/** * @brief Copy and return the selected text of TextEditor. * * @param[in] textEditor The instance of TextEditor.