X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Ftext-controls%2Ftext-editor-devel.h;h=9aab35f7971b0f230003d67af02f9424f933bded;hb=HEAD;hp=74c19df44a615f64b0565d473b669d8478de2b0c;hpb=478e477e07fde916953748d2cd4befc0326bfc34;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 74c19df..1831327 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,61 @@ 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, + + /** + * @brief The spaces between characters in Pixels. + * @details Name "characterSpacing", type Property::FLOAT. + * @note + * A positive value will make the characters far apart (expanded) and a negative value will bring them closer (condensed). + * The default value is 0.f which does nothing. + */ + CHARACTER_SPACING, + + /** + * @brief the relative height of the line (a factor that will be multiplied by text height). + * @details Name "relativeLineSize", type Property::FLOAT. + * @note If the value is less than 1, the lines could to be overlapped. + */ + RELATIVE_LINE_SIZE, + + /** + * @brief The line vertical alignment. + * @details Name "verticalAlignment", type Property::STRING or type VerticalAlignment::Type (Property::INTEGER). + * Values "TOP", "CENTER", "BOTTOM", default TOP. + * @note Return type is Property::STRING + */ + VERTICAL_ALIGNMENT, + + /** + * @brief Sets the selection popup style + * @details Name "selectionPopupStyle", type Property::MAP. + * @see Dali::Toolkit::TextSelectionPopup::Property + */ + SELECTION_POPUP_STYLE, + + /** + * @brief Whether to trim the xBearing of first glyph of the text. + * @details Name "removeFrontInset", type Property::BOOLEAN. + */ + REMOVE_FRONT_INSET, + + /** + * @brief Whether to trim the advance of last glyph of the text. + * @details Name "removeBackInset", type Property::BOOLEAN. + */ + REMOVE_BACK_INSET, }; } // namespace Property @@ -414,6 +477,23 @@ using SelectionClearedSignalType = Signal; 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. @@ -475,6 +555,16 @@ DALI_TOOLKIT_API Vector GetTextSize(TextEditor textEditor, const uint32 DALI_TOOLKIT_API Vector GetTextPosition(TextEditor textEditor, const uint32_t startIndex, const uint32_t endIndex); /** + * @brief Gets the bounding box of a specific text range. + * + * @param[in] textEditor The instance of textEditor. + * @param[in] startIndex start index of the text requested to get bounding box to. + * @param[in] endIndex end index(included) of the text requested to get bounding box to. + * @return bounding box of the requested text. + */ +DALI_TOOLKIT_API Rect<> GetTextBoundingRectangle(TextEditor textEditor, uint32_t startIndex, uint32_t endIndex); + +/** * @brief Copy and return the selected text of TextEditor. * * @param[in] textEditor The instance of TextEditor. @@ -497,6 +587,39 @@ DALI_TOOLKIT_API std::string CutText(TextEditor textEditor); */ DALI_TOOLKIT_API void PasteText(TextEditor textEditor); +/** + * @brief Set removing front inset to text label. + * + * @param[in] textEditor The instance of TextLabel. + * @param[in] remove Whether front inset of text label has to be removed or not. + */ +DALI_TOOLKIT_API void SetRemoveFrontInset(TextEditor textEditor, const bool remove); + +/** + * @brief Whether front inset of text label is removed or not. + * + * @param[in] textEditor The instance of TextLabel. + * @return True if the front inset of text label is removed. + */ +DALI_TOOLKIT_API bool IsRemoveFrontInset(TextEditor textEditor); + +/** + * @brief Set removing back inset to text label. + * + * @param[in] textEditor The instance of TextLabel. + * @param[in] remove Whether back inset of text label has to be removed or not. + */ +DALI_TOOLKIT_API void SetRemoveBackInset(TextEditor textEditor, const bool remove); + +/** + * @brief Whether back inset of text label is removed or not. + * + * @param[in] textEditor The instance of TextLabel. + * @return True if the back inset of text label is removed. + */ +DALI_TOOLKIT_API bool IsRemoveBackInset(TextEditor textEditor); + + } // namespace DevelTextEditor } // namespace Toolkit