*/
// EXTERNAL INCLUDES
+#include <dali-toolkit/devel-api/text/spanned.h>
#include <dali/devel-api/adaptor-framework/input-method-context.h>
#include <dali/public-api/events/gesture.h>
void GetText(std::string& text) 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
+ *
+ * @param[in] spannedText the text with spans.
+ */
+ void SetSpannedText(const Text::Spanned& spannedText);
+
+ /**
* @brief Replaces any placeholder text previously set.
*
* @param[in] type Different placeholder-text can be shown when the control is active/inactive.
*
* @return A pointer to the text's model.
*/
- const ModelInterface* const GetTextModel() const;
+ const ModelInterface* GetTextModel() const;
/**
* @brief Used to get scrolled distance by user input
Vector<Vector2> GetTextPosition(CharacterIndex startIndex, CharacterIndex endIndex);
/**
+ * @brief Get the line bounding rectangle.
+ * if the requested index is out of range or the line is not yet rendered, a rect of {0, 0, 0, 0} is returned.
+ *
+ * @param[in] lineIndex line index to which we want to calculate the geometry for.
+ * @return bounding rectangle.
+ */
+ Rect<float> GetLineBoundingRectangle(const uint32_t lineIndex);
+
+ /**
+ * @brief Get the char bounding rectangle.
+ * If the text is not yet rendered or the index > text.Count(); a rect of {0, 0, 0, 0} is returned.
+ *
+ * @param[in] charIndex character index to which we want to calculate the geometry for.
+ * @return bounding rectangle.
+ */
+ Rect<float> GetCharacterBoundingRectangle(const uint32_t charIndex);
+
+ /**
+ * @brief Get the character index.
+ * If the text is not yet rendered or the text is empty, -1 is returned.
+ *
+ * @param[in] visualX visual x position.
+ * @param[in] visualY visual y position.
+ * @return character index.
+ */
+ int GetCharacterIndexAtPosition(float visualX, float visualY);
+
+ /**
* @brief Gets the bounding box of a specific text range.
*
* @param[in] startIndex start index of the text requested to get bounding box to.
struct PlaceholderHandler;
struct Relayouter;
struct TextUpdater;
+ struct SpannableHandler;
Impl* mImpl;
};