Add TextFitArray to text label
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / controller / text-controller.h
index 4932cec..9276807 100644 (file)
@@ -435,6 +435,20 @@ public: // Configure the text controller.
   bool IsTextFitEnabled() const;
 
   /**
+   * @brief Sets current line size.
+   *
+   * @param[in] lineSize line size value to store the MinLineSize set by user when TextFitArray is enabled.
+   */
+  void SetCurrentLineSize(float lineSize);
+
+  /**
+   * @brief Retrieves the current line size.
+   *
+   * @return The current line size
+   */
+  float GetCurrentLineSize() const;
+
+  /**
    * @brief Sets minimum size valid for text fit.
    *
    * @param[in] minimum size value.
@@ -522,6 +536,34 @@ public: // Configure the text controller.
   void SetTextFitLineSize(float lineSize);
 
   /**
+   * @brief Enable or disable the text fit array.
+   *
+   * @param[in] enabled Whether to enable the text fit array.
+   */
+  void SetTextFitArrayEnabled(bool enabled);
+
+  /**
+   * @brief Whether the text fit array is enabled or not.
+   *
+   * @return True if the text fit array is enabled.
+   */
+  bool IsTextFitArrayEnabled() const;
+
+  /**
+   * @brief Sets the text fit array.
+   *
+   * @param[in] fitOptions The list of text fit options.
+   */
+  void SetTextFitArray(std::vector<Toolkit::DevelTextLabel::FitOption>& fitOptions);
+
+  /**
+   * @brief Retrieve the text fit array.
+   *
+   * @return The list of text fit options.
+   */
+  std::vector<Toolkit::DevelTextLabel::FitOption>& GetTextFitArray();
+
+  /**
    * @brief Sets disabled color opacity.
    *
    * @param[in] opacity The color opacity value in disabled state.
@@ -1595,6 +1637,11 @@ public: // Queries & retrieves.
   void FitPointSizeforLayout(Size layoutSize);
 
   /**
+   * @brief Calculates the point size for text for given layout() using fit array.
+   */
+  void FitArrayPointSizeforLayout(Size layoutSize);
+
+  /**
    * @brief Checks if the point size fits within the layout size.
    *
    * @return Whether the point size fits within the layout size.