Merge "Spannable-Core: Add SpannableString and ForegroundColorSpan" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-label-impl.h
index f4dac1d..b935c84 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/actors/actor-devel.h>
 #include <dali/devel-api/atspi-interfaces/hypertext.h>
 #include <dali/devel-api/atspi-interfaces/text.h>
 #include <dali/public-api/object/property-map.h>
@@ -124,6 +125,24 @@ public:
    */
   Vector<Vector2> GetTextPosition(const uint32_t startIndex, const uint32_t endIndex) const;
 
+  /**
+   * @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) const;
+
+  /**
+   * @brief Get the character 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) const;
+
 private: // From Control
   /**
    * @copydoc Control::OnInitialize()
@@ -165,6 +184,16 @@ private: // From Control
    */
   void OnPropertySet(Property::Index index, const Property::Value& propertyValue) override;
 
+  /**
+   * @copydoc Control::OnSceneConnection()
+   */
+  void OnSceneConnection(int depth) override;
+
+  /**
+   * @copydoc Control::OnSceneDisconnection()
+   */
+  void OnSceneDisconnection() override;
+
   // From ControlInterface
 
   /**
@@ -247,6 +276,7 @@ private: // Data
 
   int  mRenderingBackend;
   bool mTextUpdateNeeded : 1;
+  bool mLastAutoScrollEnabled : 1;
 
 protected:
   /**