Merge "Add the paragraph's direction to all lines." into new_text
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / layouts / layout-parameters.h
index 9fa4dde..a370c02 100644 (file)
@@ -33,6 +33,8 @@ namespace Toolkit
 namespace Text
 {
 
+struct BidirectionalLineInfoRun;
+
 /**
  * @brief Struct used to pass parameters.
  */
@@ -42,6 +44,7 @@ struct LayoutParameters
    * Constructor with the needed parameters to layout the text.
    *
    * @param[in] boundingBox The size of the box containing the text.
+   * @param[in] textBuffer The text buffer.
    * @param[in] lineBreakInfoBuffer The line break info.
    * @param[in] wordBreakInfoBuffer The word break info.
    * @param[in] totalNumberOfGlyphs The number of glyphs.
@@ -50,6 +53,7 @@ struct LayoutParameters
    * @param[in] charactersPerGlyphBuffer Vector with the number of characters that forms each glyph.
    */
   LayoutParameters( const Vector2& boundingBox,
+                    const Character* const textBuffer,
                     const LineBreakInfo* const lineBreakInfoBuffer,
                     const WordBreakInfo* const wordBreakInfoBuffer,
                     Length totalNumberOfGlyphs,
@@ -57,21 +61,31 @@ struct LayoutParameters
                     const CharacterIndex* const glyphsToCharactersBuffer,
                     const Length* const charactersPerGlyphBuffer )
   : boundingBox( boundingBox ),
+    textBuffer( textBuffer ),
     lineBreakInfoBuffer( lineBreakInfoBuffer ),
     wordBreakInfoBuffer( wordBreakInfoBuffer ),
     totalNumberOfGlyphs( totalNumberOfGlyphs ),
     glyphsBuffer( glyphsBuffer ),
     glyphsToCharactersBuffer( glyphsToCharactersBuffer ),
-    charactersPerGlyphBuffer( charactersPerGlyphBuffer )
+    charactersPerGlyphBuffer( charactersPerGlyphBuffer ),
+    charactersToGlyphsBuffer( NULL ),
+    glyphsPerCharacterBuffer( NULL ),
+    lineBidirectionalInfoRunsBuffer( NULL ),
+    numberOfBidirectionalInfoRuns( 0u )
   {}
 
   Vector2                     boundingBox;
+  const Character* const      textBuffer;
   const LineBreakInfo* const  lineBreakInfoBuffer;
   const WordBreakInfo* const  wordBreakInfoBuffer;
   Length                      totalNumberOfGlyphs;
   const GlyphInfo* const      glyphsBuffer;
   const CharacterIndex* const glyphsToCharactersBuffer;
   const Length* const         charactersPerGlyphBuffer;
+  GlyphIndex*                 charactersToGlyphsBuffer;        ///< The character to glyph conversion table.
+  Length*                     glyphsPerCharacterBuffer;        ///< The number of glyphs per character.
+  BidirectionalLineInfoRun*   lineBidirectionalInfoRunsBuffer; ///< Bidirectional conversion tables per line.
+  Length                      numberOfBidirectionalInfoRuns;   ///< The number of lines with bidirectional info.
 };
 
 } // namespace Text