Support RelativeLineHeight in TextEditor/TextLabel
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / layouts / layout-engine.h
index 46cc972..6b78e87 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_LAYOUT_ENGINE_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,6 +28,9 @@
 #include <dali-toolkit/internal/text/metrics.h>
 #include <dali-toolkit/public-api/text/text-enumerations.h>
 
+//DEVEL INCLUDE
+#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
+
 namespace Dali
 {
 namespace Toolkit
@@ -104,13 +107,15 @@ public:
    * @param[out] layoutSize The size of the text after it has been laid-out.
    * @param[in] elideTextEnabled Whether the text elide is enabled.
    * @param[in,out] isAutoScrollEnabled If the isAutoScrollEnabled is true and the height of the text exceeds the boundaries of the control the text is elided and the isAutoScrollEnabled is set to false to disable the autoscroll
+   * @param[in] ellipsisPosition The location of the text ellipsis
    *
    * @return \e true if the text has been re-laid-out. \e false means the given width is too small to layout even a single character.
    */
-  bool LayoutText(Parameters& layoutParameters,
-                  Size&       layoutSize,
-                  bool        elideTextEnabled,
-                  bool&       isAutoScrollEnabled);
+  bool LayoutText(Parameters&                       layoutParameters,
+                  Size&                             layoutSize,
+                  bool                              elideTextEnabled,
+                  bool&                             isAutoScrollEnabled,
+                  DevelText::EllipsisPosition::Type ellipsisPosition);
 
   /**
    * @brief Aligns the laid out lines.
@@ -161,6 +166,20 @@ public:
    */
   float GetDefaultLineSize() const;
 
+  /**
+   * @brief Sets relative line size to the original line size.
+   *
+   * @param[in] relativeLineSize The relative line size.
+   */
+  void SetRelativeLineSize(float relativeLineSize);
+
+  /**
+   * @brief Retrieves the relative line size.
+   *
+   * @return The relative line size.
+   */
+  float GetRelativeLineSize() const;
+
 private:
   // Undefined
   Engine(const Engine& handle);