*
*/
-// INTERNAL INCLUDES
+// EXTERNAL INCLUDES
#include <dali/public-api/common/dali-vector.h>
+
+// 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/line-run.h>
+#include <dali-toolkit/internal/text/script-run.h>
namespace Dali
{
* Sets the bidirectional info into the logical model.
*
* @param[in] text Vector of UTF-32 characters.
+ * @param[in] scripts Vector containing the script runs for the whole text.
* @param[in] lineBreakInfo The line break info.
* @param[out] bidirectionalInfo Vector with the bidirectional infor for each paragraph.
*/
void SetBidirectionalInfo( const Vector<Character>& text,
+ const Vector<ScriptRun>& scripts,
const Vector<LineBreakInfo>& lineBreakInfo,
Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo );
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<CharacterRun>& lineRuns,
+ Vector<LineRun>& lineRuns,
Vector<BidirectionalLineInfoRun>& lineInfoRuns );
/**
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