[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / visual-model-impl.h
index 9c0af3a..9dae2cf 100644 (file)
@@ -144,6 +144,15 @@ public:
                         Length&    numberOfLines) const;
 
   /**
+   * @brief Retrieves the line index where the glyph is laid-out.
+   *
+   * @param[in] glyphIndex The glyph's index.
+   *
+   * @return The line index.
+   */
+  LineIndex GetLineOfGlyph(GlyphIndex glyphIndex);
+
+  /**
    * @brief Retrieves the lines where the given range of glyphs is laid out.
    *
    * The size of the @p lines buffer needs to be big enough to copy the @p numberOfLines.
@@ -209,6 +218,20 @@ public:
   const Vector2& GetLayoutSize() const;
 
   /**
+   * @brief Sets the size of height for width.
+   *
+   * @param[in] size The text's height for width size.
+   */
+  void SetHeightForWidth(const Vector2& size);
+
+  /**
+   * @brief Retrieves the height for width size.
+   *
+   * @return The text's height for width size.
+   */
+  const Vector2& GetHeightForWidth() const;
+
+  /**
    * @brief Set the text's color
    *
    * @param[in] textColor The text's color
@@ -661,8 +684,9 @@ public:
   Vector<CharacterSpacingGlyphRun> mCharacterSpacingRuns;   ///< Runs of glyphs that have character-spacing.
 
 private:
-  Size mNaturalSize; ///< Size of the text with no line wrapping.
-  Size mLayoutSize;  ///< Size of the laid-out text considering the layout properties set.
+  Size mNaturalSize;    ///< Size of the text with no line wrapping.
+  Size mLayoutSize;     ///< Size of the laid-out text considering the layout properties set.
+  Size mHeightForWidth; ///< Size of the text last calculated using GetHeightForWidth.
 
   // Caches to increase performance in some consecutive operations.
   LineIndex mCachedLineIndex; ///< Used to increase performance in consecutive calls to GetLineOfGlyph() or GetLineOfCharacter() with consecutive glyphs or characters.