X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fbidirectional-support.h;h=c29f4010255052dea463d80ed02223170fb7fb58;hb=b5b75a20279ee1671b8a78228583cf5114536fb0;hp=72b147abe7cb0078897d44c9ce67a4bb440aebe5;hpb=06e563f8a982e25a0efe2d91c794657dc8e4bc4a;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/bidirectional-support.h b/dali-toolkit/internal/text/bidirectional-support.h old mode 100644 new mode 100755 index 72b147a..c29f401 --- a/dali-toolkit/internal/text/bidirectional-support.h +++ b/dali-toolkit/internal/text/bidirectional-support.h @@ -20,6 +20,7 @@ // EXTERNAL INCLUDES #include +#include // INTERNAL INCLUDES #include @@ -36,21 +37,26 @@ namespace Toolkit namespace Text { -class LogicalModel; -class VisualModel; - /** * 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[in] startIndex The character from where the bidirectional info is set. + * @param[in] numberOfCharacters The number of characters. * @param[out] bidirectionalInfo Vector with the bidirectional infor for each paragraph. + * @param[in] matchSystemLanguageDirection Whether match for system language direction or not. + * @param[in] layoutDirection The direction of the system language. */ void SetBidirectionalInfo( const Vector& text, const Vector& scripts, const Vector& lineBreakInfo, - Vector& bidirectionalInfo ); + CharacterIndex startIndex, + Length numberOfCharacters, + Vector& bidirectionalInfo, + bool matchSystemLanguageDirection = false, + Dali::LayoutDirection::Type layoutDirection = LayoutDirection::LEFT_TO_RIGHT ); /** * Sets the visual to logical map tables. @@ -63,10 +69,14 @@ void SetBidirectionalInfo( const Vector& text, * @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] startIndex The character from where the bidirectional info is set. + * @param[in] numberOfCharacters The number of characters. * @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& bidirectionalInfo, + CharacterIndex startIndex, + Length numberOfCharacters, Vector& lineRuns, Vector& lineInfoRuns ); @@ -74,14 +84,20 @@ void ReorderLines( const Vector& bidirectionalInf * @brief Replaces any character in the right to left paragraphs which could be mirrored. * * @param[in] text The text. - * @param[in] mirroredText The mirroredText. + * @param[in] directions Vector with the direction of each paragraph. * @param[in] bidirectionalInfo Vector with the bidirectional infor for each paragraph. + * @param[in] startIndex The character from where the text is mirrored. + * @param[in] numberOfCharacters The number of characters. + * @param[out] mirroredText The mirroredText. * * @return @e true if a character has been replaced. */ bool GetMirroredText( const Vector& text, - Vector& mirroredText, - const Vector& bidirectionalInfo ); + const Vector& directions, + const Vector& bidirectionalInfo, + CharacterIndex startIndex, + Length numberOfCharacters, + Vector& mirroredText ); /** * @brief Retrieves the character's directions. @@ -90,9 +106,15 @@ bool GetMirroredText( const Vector& text, * @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[in] totalNumberOfCharacters The number of characters of the whole text. + * @param[in] startIndex The character from where the direction info is set. + * @param[in] numberOfCharacters The number of characters. * @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& bidirectionalInfo, + Length totalNumberOfCharacters, + CharacterIndex startIndex, + Length numberOfCharacters, Vector& directions ); } // namespace Text