Add the paragraph's direction to all lines.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / bidirectional-support.h
index 4bdd5e3..f51e5e7 100644 (file)
@@ -72,20 +72,21 @@ void ReplaceBidirectionalInfo( LogicalModel& model,
                                Length numberOfCharactersToInsert );
 
 /**
- * Sets the visual to logical and logical to visual map tables.
+ * Sets the visual to logical map tables.
  *
  * Any map tables previously set are removed.
+ * It sets the paragraph's direction to each line.
  *
  * @pre The @p logicalModel needs to have a text set.
  * @pre The @p logicalModel needs to have the bidirectional info indices for each paragraph set.
  * @pre The @p visualModel needs to have the laid-out lines info set.
  *
  * @param[in] bidirectionalInfo Vector with the bidirectional infor for each paragraph.
- * @param[in] lineRuns The line runs converted to characters.
- * @param[out] lineInfoRuns line runs with the visual to logical and logical to visual conversion maps.
+ * @param[in,out] lineRuns The line runs converted to characters.
+ * @param[out] lineInfoRuns line runs with the visual to logical conversion maps.
  */
 void ReorderLines( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
-                   const Vector<LineRun>& lineRuns,
+                   Vector<LineRun>& lineRuns,
                    Vector<BidirectionalLineInfoRun>& lineInfoRuns );
 
 /**
@@ -110,6 +111,29 @@ void ReorderLines( LogicalModel& logicalModel,
                    Length numberOfCharactersToRemove,
                    Length numberOfCharactersToInsert );
 
+/**
+ * @brief Replaces any character which could be mirrored.
+ *
+ * @param[in] text The text.
+ * @param[in] mirroredText The mirroredText.
+ *
+ * @return @e true if a character has been replaced.
+ */
+bool GetMirroredText( const Vector<Character>& text,
+                      Vector<Character>& mirroredText );
+
+/**
+ * @brief Retrieves the character's directions.
+ *
+ * @pre The @p logicalModel needs to have a text set.
+ * @pre The @p logicalModel needs to have the bidirectional info indices for each paragraph set.
+ *
+ * @param[in] bidirectionalInfo Vector with the bidirectional infor for each paragraph.
+ * @param[out] directions The direction, @e false is left to right and @e true is right to left, of each character of the paragraph.
+ */
+void GetCharactersDirection( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
+                             Vector<CharacterDirection>& directions );
+
 } // namespace Text
 
 } // namespace Toolkit