[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / text / text-visual.h
index 1b1930d..0d5e5f8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_VISUAL_H
 
 /*
 #define DALI_TOOLKIT_INTERNAL_TEXT_VISUAL_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 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.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -116,6 +116,16 @@ public:
   };
 
   /**
   };
 
   /**
+   * @brief Set the text to be always rendered
+   * @param[in] visual The text visual.
+   * @param[in] requireRender Whether to text always rendered.
+   */
+  static void SetRequireRender(Toolkit::Visual::Base visual, bool requireRender)
+  {
+    GetVisualObject(visual).SetRequireRender(requireRender);
+  };
+
+  /**
    * @brief Instantly updates the renderer
    * @param[in] visual The text visual.
    */
    * @brief Instantly updates the renderer
    * @param[in] visual The text visual.
    */
@@ -239,7 +249,7 @@ private:
   /**
    * @brief Removes the text's renderer.
    */
   /**
    * @brief Removes the text's renderer.
    */
-  void RemoveRenderer(Actor& actor);
+  void RemoveRenderer(Actor& actor, bool removeDefaultRenderer);
 
   /**
    * @brief Create a texture in textureSet and add it.
 
   /**
    * @brief Create a texture in textureSet and add it.
@@ -293,6 +303,12 @@ private:
   Shader GetTextShader(VisualFactoryCache& factoryCache, const TextVisualShaderFeature::FeatureBuilder& featureBuilder);
 
   /**
   Shader GetTextShader(VisualFactoryCache& factoryCache, const TextVisualShaderFeature::FeatureBuilder& featureBuilder);
 
   /**
+   * @brief Set the text to be always rendered
+   * @param[in] requireRender Whether to text always rendered.
+   */
+  void SetRequireRender(bool requireRender);
+
+  /**
    * @brief Retrieve the TextVisual object.
    * @param[in] visual A handle to the TextVisual
    * @return The TextVisual object
    * @brief Retrieve the TextVisual object.
    * @param[in] visual A handle to the TextVisual
    * @return The TextVisual object
@@ -315,9 +331,12 @@ private:
   WeakHandle<Actor> mControl;                          ///< The control where the renderer is added.
   Constraint        mColorConstraint{};                ///< Color constraint
   Constraint        mOpacityConstraint{};              ///< Opacity constraint
   WeakHandle<Actor> mControl;                          ///< The control where the renderer is added.
   Constraint        mColorConstraint{};                ///< Color constraint
   Constraint        mOpacityConstraint{};              ///< Opacity constraint
+  Property::Index   mHasMultipleTextColorsIndex;       ///< The index of uHasMultipleTextColors proeprty.
   Property::Index   mAnimatableTextColorPropertyIndex; ///< The index of animatable text color property registered by the control.
   Property::Index   mTextColorAnimatableIndex;         ///< The index of uTextColorAnimatable property.
   Property::Index   mAnimatableTextColorPropertyIndex; ///< The index of animatable text color property registered by the control.
   Property::Index   mTextColorAnimatableIndex;         ///< The index of uTextColorAnimatable property.
+  Property::Index   mTextRequireRenderPropertyIndex;   ///< The index of requireRender property.
   bool              mRendererUpdateNeeded : 1;         ///< The flag to indicate whether the renderer needs to be updated.
   bool              mRendererUpdateNeeded : 1;         ///< The flag to indicate whether the renderer needs to be updated.
+  bool              mTextRequireRender : 1;            ///< The flag to indicate whether the text needs to be rendered.
   RendererContainer mRendererList;
 };
 
   RendererContainer mRendererList;
 };