X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fcontroller%2Ftext-controller.h;h=4932cec9f29d5a707a4f0e1888a9e7ca1eeea718;hb=f9649c1d7583b0e1af1c91f1f1518323921e6a47;hp=93ffc27300edb3c04e288cd5255744ff582fd2cf;hpb=ee3cc0da8dbf399532ae1f36b85cc1aeb02c940d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/controller/text-controller.h b/dali-toolkit/internal/text/controller/text-controller.h index 93ffc27..4932cec 100644 --- a/dali-toolkit/internal/text/controller/text-controller.h +++ b/dali-toolkit/internal/text/controller/text-controller.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_CONTROLLER_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include #include #include @@ -69,7 +70,7 @@ typedef IntrusivePtr ControllerPtr; * * The text selection popup button callbacks are as well handled via the TextSelectionPopupCallbackInterface interface. */ -class Controller : public RefObject, public Decorator::ControllerInterface, public TextSelectionPopupCallbackInterface, public HiddenText::Observer +class Controller : public RefObject, public Decorator::ControllerInterface, public TextSelectionPopupCallbackInterface, public HiddenText::Observer, public ConnectionTracker { public: // Enumerated types. /** @@ -514,6 +515,13 @@ public: // Configure the text controller. bool IsTextFitChanged() const; /** + * @brief Sets line size valid for text fit. + * + * @param[in] lineSize line size value + */ + void SetTextFitLineSize(float lineSize); + + /** * @brief Sets disabled color opacity. * * @param[in] opacity The color opacity value in disabled state. @@ -754,6 +762,13 @@ public: // Update. void GetText(std::string& text) const; /** + * @brief Retrieves number of characters previously set. + * + * @return A length of string of UTF-32 characters. + */ + Length GetNumberOfCharacters() const; + + /** * @brief Set the @p spannedText * the spanned text contains content (text) and format (spans with ranges) * the text is copied into text-controller and the spans are applied on ranges @@ -829,7 +844,7 @@ public: // Default style & Input style * * @return The default font family. */ - const std::string& GetDefaultFontFamily() const; + std::string GetDefaultFontFamily() const; /** * @brief Sets the placeholder text font family. @@ -842,7 +857,7 @@ public: // Default style & Input style * * @return The placeholder text font family */ - const std::string& GetPlaceholderFontFamily() const; + std::string GetPlaceholderFontFamily() const; /** * @brief Sets the default font weight. @@ -1258,7 +1273,7 @@ public: // Default style & Input style * * @return The emboss's properties string. */ - const std::string& GetDefaultEmbossProperties() const; + std::string GetDefaultEmbossProperties() const; /** * @brief Sets the outline's properties string. @@ -1274,7 +1289,7 @@ public: // Default style & Input style * * @return The outline's properties string. */ - const std::string& GetDefaultOutlineProperties() const; + std::string GetDefaultOutlineProperties() const; /** * @brief Sets the default line spacing. @@ -1350,7 +1365,7 @@ public: // Default style & Input style * * @return The input text's font family name. */ - const std::string& GetInputFontFamily() const; + std::string GetInputFontFamily() const; /** * @brief Sets the input font's weight. @@ -1451,7 +1466,7 @@ public: // Default style & Input style * * @return The shadow's properties string. */ - const std::string& GetInputShadowProperties() const; + std::string GetInputShadowProperties() const; /** * @brief Sets the input underline's properties string. @@ -1467,7 +1482,7 @@ public: // Default style & Input style * * @return The underline's properties string. */ - const std::string& GetInputUnderlineProperties() const; + std::string GetInputUnderlineProperties() const; /** * @brief Sets the input emboss's properties string. @@ -1483,7 +1498,7 @@ public: // Default style & Input style * * @return The emboss's properties string. */ - const std::string& GetInputEmbossProperties() const; + std::string GetInputEmbossProperties() const; /** * @brief Sets input the outline's properties string. @@ -1499,7 +1514,7 @@ public: // Default style & Input style * * @return The outline's properties string. */ - const std::string& GetInputOutlineProperties() const; + std::string GetInputOutlineProperties() const; /** * @brief Sets the input strikethrough's properties string. @@ -1515,7 +1530,7 @@ public: // Default style & Input style * * @return The strikethrough's properties string. */ - const std::string& GetInputStrikethroughProperties() const; + std::string GetInputStrikethroughProperties() const; /** * @brief Set the control's interface. @@ -1986,8 +2001,14 @@ public: // Text-input Event Queuing. /** * @brief Event from Clipboard notifying an Item has been selected for pasting + * + * @param[in] id The id of the data request. + * @param[in] mimeType The mime type of data received. + * @param[in] data The data received. + * @note + * This event is executed by receiving the Clipboard's DataReceivedSignal. */ - void PasteClipboardItemEvent(); + void PasteClipboardItemEvent(uint32_t id, const char* mimeType, const char* data); /** * @brief Return true when text control should clear key input focus when escape key is pressed. @@ -2106,7 +2127,7 @@ private: struct TextUpdater; struct SpannableHandler; - Impl* mImpl; + std::unique_ptr mImpl{nullptr}; }; } // namespace Dali::Toolkit::Text