TextModel - Shape the given number of characters inside a text.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / visual-model-impl.h
index 52d2d31..eb2e5a0 100644 (file)
@@ -27,6 +27,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/line-run.h>
+#include <dali-toolkit/internal/text/color-run.h>
 
 namespace Dali
 {
@@ -65,16 +66,20 @@ public:
    *
    * @pre The glyphs per character table needs to be created first.
    *
+   * @param[in] startIndex The character from where the conversion table is created.
    * @param[in] numberOfCharacters The number of characters.
    */
-  void CreateCharacterToGlyphTable( Length numberOfCharacters = 0u );
+  void CreateCharacterToGlyphTable( CharacterIndex startIndex,
+                                    Length numberOfCharacters );
 
   /**
    * @brief Creates an array containing the number of glyphs per character.
    *
+   * @param[in] startIndex The character from where the table is created.
    * @param[in] numberOfCharacters The number of characters.
    */
-  void CreateGlyphsPerCharacterTable( Length numberOfCharacters = 0u );
+  void CreateGlyphsPerCharacterTable( CharacterIndex startIndex,
+                                      Length numberOfCharacters );
 
   /**
    * @brief Retrieves glyphs in the given buffer.
@@ -301,6 +306,7 @@ public:
   Vector<Vector2>        mGlyphPositions;       ///< For each glyph, the position.
   Vector<LineRun>        mLines;                ///< The laid out lines.
   Vector<GlyphRun>       mUnderlineRuns;        ///< Runs of glyphs that are underlined.
+  Vector<ColorGlyphRun>  mColorRuns;            ///< Runs of glyphs with the same color.
 
   Vector2                mControlSize;           ///< The size of the UI control the decorator is adding it's decorations to.
   Vector4                mTextColor;            ///< The text color