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-field-devel.h;h=10d79e85d0fcff764344d0c20208d49f6a477e46;hp=f9f13dd5416bdf379738d967dc1589a8497d0b2e;hb=d44300a6f74767fb66b96d5583a60779a50c4c65;hpb=646440beeb663fc5efcccadeba73dd46016ed1b3 diff --git a/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h b/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h index f9f13dd..10d79e8 100644 --- a/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h +++ b/dali-toolkit/devel-api/controls/text-controls/text-field-devel.h @@ -205,6 +205,14 @@ enum * @endcode */ INPUT_FILTER, + + /** + * @brief The enumerations used to specify whether to position the ellipsis at the END, START or MIDDLE of the text. + * @details Name "EllipsisPosition", type [Type](@ref Dali::Toolkit::DevelText::EllipsisPosition::Type) (Property::INTEGER), or Property::STRING. Read/Write + * @note Default is EllipsisPosition::END. + * @see DevelText::EllipsisPosition + */ + ELLIPSIS_POSITION, }; } // namespace Property @@ -239,6 +247,26 @@ using AnchorClickedSignalType = Signal; DALI_TOOLKIT_API AnchorClickedSignalType& AnchorClickedSignal(TextField textField); /** + * @brief cursor position changed signal type. + * + * @note Signal + * - uint32_t : old position. + */ +using CursorPositionChangedSignalType = Signal; + +/** + * @brief This signal is emitted when the cursor position has been changed. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName(TextField textField, uint32_t oldPosition); + * @endcode + * @param[in] textField The instance of TextField. + * @return The signal to connect to. + */ +DALI_TOOLKIT_API CursorPositionChangedSignalType& CursorPositionChangedSignal(TextField textField); + +/** * @brief Input filtered signal type. */ using InputFilteredSignalType = Signal; @@ -270,6 +298,44 @@ using InputFilteredSignalType = Signal; + +/** + * @brief This signal is emitted when the selection has been changed. + * + * A callback of the following type may be connected: + * @code + * void YourCallbackName( TextField textField, uint32_t oldStart, uint32_t oldEnd); + * @endcode + * @param[in] textField The instance of TextField. + * @return The signal to connect to + */ +DALI_TOOLKIT_API SelectionChangedSignalType& SelectionChangedSignal(TextField textField); + +/** + * @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( TextField textField); + * @endcode + * @param[in] textField The instance of TextField. + * @return The signal to connect to + */ +DALI_TOOLKIT_API SelectionClearedSignalType& SelectionClearedSignal(TextField textField); + +/** * @brief Select the whole text of TextField. * * @param[in] textField The instance of TextField. @@ -283,6 +349,44 @@ DALI_TOOLKIT_API void SelectWholeText(TextField textField); */ DALI_TOOLKIT_API void SelectNone(TextField textField); +/** + * @brief Select the text from start index to end index of TextField. + * @note + * The selection index is based on the cursor index. + * + * text H e l l o + * index 0 1 2 3 4 5 + * if textField.SelectText(1, 4); is executed, "ell" is selected. + * + * @param[in] textField The instance of TextField. + * @param[in] start The start index of the text to select. (The starting point of start index is 0.) + * @param[in] end The end index of the text to select. (If end index > text's length, the end index is set to the length of the text.) + */ +DALI_TOOLKIT_API void SelectText(TextField textField, const uint32_t start, const uint32_t end); + +/** + * @brief Copy and return the selected text of TextField. + * + * @param[in] textField The instance of TextField. + * @return The copied text. + */ +DALI_TOOLKIT_API std::string CopyText(TextField textField); + +/** + * @brief Cut and return the selected text of TextField. + * + * @param[in] textField The instance of TextField. + * @return The cut text. + */ +DALI_TOOLKIT_API std::string CutText(TextField textField); + +/** + * @brief Paste the most recent clipboard text item into the TextField. + * + * @param[in] textField The instance of TextField. + */ +DALI_TOOLKIT_API void PasteText(TextField textField); + } // namespace DevelTextField } // namespace Toolkit