[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / controller / text-controller-relayouter.h
index ca4e666..3f7c3b9 100644 (file)
@@ -64,6 +64,14 @@ struct Controller::Relayouter
   static void FitPointSizeforLayout(Controller& controller, const Size& layoutSize);
 
   /**
+   * @brief Calculates the point size for text for given layout() using text fit array.
+   *
+   * @param[in] controller A reference to the controller class
+   * @param[in] layoutSize The layout size
+   */
+  static void FitArrayPointSizeforLayout(Controller& controller, const Size& layoutSize);
+
+  /**
    * @brief Called by the Controller to get the height for a particular width.
    *
    * @param[in] controller A reference to the controller class
@@ -89,12 +97,25 @@ struct Controller::Relayouter
    * @param[in] size The size to set
    * @param[in] operationsRequired The operations we need to do
    * @param[in/out] layoutSize The Layout size which can be updated depending on the result of the performed operations
-   * @return
+   * @return whether view updated after relayout
    */
 
   static bool DoRelayout(Controller::Impl& impl, const Size& size, OperationsMask operationsRequired, Size& layoutSize);
 
   /**
+   * @brief Called by the Controller to do certain operations when relayouting.
+   *
+   * @param[in] impl A reference to the controller impl class
+   * @param[in] size The size to set
+   * @param[in] operationsRequired The operations we need to do
+   * @param[in/out] layoutSize The Layout size which can be updated depending on the result of the performed operations
+   * @param[out] layoutTooSmall True if layout is too small to render one glyph, else false.
+   * @return whether view updated after relayout
+   */
+
+  static bool DoRelayout(Controller::Impl& impl, const Size& size, OperationsMask operationsRequired, Size& layoutSize, bool& layoutTooSmall);
+
+  /**
    * @brief Called by the Controller to calculate the veritcal offset give the control size.
    *
    * @param[in] impl A reference to the controller impl class
@@ -128,6 +149,11 @@ private:
   static void DoRelayoutHorizontalAlignment(Controller::Impl& impl, const Size& size, const CharacterIndex startIndex, const Length requestedNumberOfCharacters);
 };
 
+inline bool compareByPointSize(Toolkit::DevelTextLabel::FitOption& lhs, Toolkit::DevelTextLabel::FitOption& rhs)
+{
+  return lhs.GetPointSize() < rhs.GetPointSize();
+}
+
 } // namespace Text
 
 } // namespace Toolkit