Fixed regression with Actor::COLOR property in TextLabel
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / logical-model-impl.h
index 269247f..7a28ba6 100644 (file)
@@ -26,7 +26,9 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/bidirectional-line-info-run.h>
 #include <dali-toolkit/internal/text/bidirectional-paragraph-info-run.h>
+#include <dali-toolkit/internal/text/color-run.h>
 #include <dali-toolkit/internal/text/font-run.h>
+#include <dali-toolkit/internal/text/font-description-run.h>
 #include <dali-toolkit/internal/text/script-run.h>
 
 namespace Dali
@@ -38,12 +40,9 @@ namespace Toolkit
 namespace Text
 {
 
-struct BidirectionalLineInfoRun;
-struct BidirectionalParagraphInfoRun;
-struct FontRun;
 class LogicalModel;
 typedef IntrusivePtr<LogicalModel> LogicalModelPtr;
-struct ScriptRun;
+struct InputStyle;
 
 /**
  * @brief A logical text model contains layout independent information.
@@ -110,6 +109,27 @@ public:
    */
   CharacterIndex GetLogicalCharacterIndex( CharacterIndex visualCharacterIndex ) const;
 
+  /**
+   * @brief Updates the text's style runs with the added or removed text.
+   *
+   * @param[in] index The character's index.
+   * @param[in] numberOfCharacters The number of characters added or removed. If the value is negative the characters are removed.
+   */
+  void UpdateTextStyleRuns( CharacterIndex index, int numberOfCharacters );
+
+  /**
+   * @brief Retrieves the text's style for the given character index.
+   *
+   * @param[in] index The character index.
+   * @param[out] style The text's style in the given style.
+   */
+  void RetrieveStyle( CharacterIndex index, InputStyle& style );
+
+  /**
+   * @brief Clears the font description runs.
+   */
+  void ClearFontDescriptionRuns();
+
 protected:
 
   /**
@@ -135,6 +155,8 @@ public:
   Vector<Character>                     mText;
   Vector<ScriptRun>                     mScriptRuns;
   Vector<FontRun>                       mFontRuns;
+  Vector<ColorRun>                      mColorRuns;
+  Vector<FontDescriptionRun>            mFontDescriptionRuns;
   Vector<LineBreakInfo>                 mLineBreakInfo;
   Vector<WordBreakInfo>                 mWordBreakInfo;
   Vector<BidirectionalParagraphInfoRun> mBidirectionalParagraphInfo;