Fix gcc-13 compile error (std::vector include)
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / controls / text-controls / text-label-devel.h
index a96092f..379fba5 100644 (file)
@@ -18,6 +18,9 @@
  *
  */
 
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
+
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 
@@ -205,6 +208,33 @@ enum Type
 
 } // namespace Property
 
+struct FitOption
+{
+  FitOption(float pointSize = 0.0f, float minLineSize = 0.0f)
+  : mPointSize(pointSize), mMinLineSize(minLineSize) {}
+
+  float GetPointSize() const
+  {
+    return mPointSize;
+  }
+  float GetMinLineSize() const
+  {
+    return mMinLineSize;
+  }
+  void SetPointSize(float pointSize)
+  {
+    mPointSize = pointSize;
+  }
+  void SetMinLineSize(float minLineSize)
+  {
+    mMinLineSize = minLineSize;
+  }
+
+private:
+  float mPointSize   = 0.0f;
+  float mMinLineSize = 0.0f;
+};
+
 /**
  * @brief Get the rendered size of a specific text range.
  * if the requested text is at multilines, multiple sizes will be returned for each text located in a separate line.
@@ -240,6 +270,30 @@ DALI_TOOLKIT_API Vector<Vector2> GetTextPosition(TextLabel textLabel, const uint
 DALI_TOOLKIT_API Rect<> GetTextBoundingRectangle(TextLabel textLabel, uint32_t startIndex, uint32_t endIndex);
 
 /**
+ * @brief Set text fit array to text label.
+ *
+ * @param[in] textLabel The instance of TextLabel.
+ * @param[in] enable Whether the text fit array is enabled or not.
+ * @param[in] fitOptions list of the fit options.
+ */
+DALI_TOOLKIT_API void SetTextFitArray(TextLabel textLabel, const bool enable, std::vector<FitOption>& fitOptions);
+
+/**
+ * @brief Get the text fit array of text label.
+ *
+ * @param[in] textLabel The instance of TextLabel.
+ * @return list of the fit options.
+ */
+DALI_TOOLKIT_API std::vector<FitOption>& GetTextFitArray(TextLabel textLabel);
+
+/**
+ * @brief Whether the text fit array is enabled or not.
+ *
+ * @return True if the text fit array is enabled.
+ */
+DALI_TOOLKIT_API bool IsTextFitArrayEnabled(TextLabel textLabel);
+
+/**
  * @brief Anchor clicked signal type.
  *
  * @note Signal