X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fbidirectional-support.h;h=054f50d8e85ed72c6761337040c860ac838bd26a;hb=75fe6c4a2f784bd52ccf8eb16049317825338a6e;hp=1ca4eca317ac850cdcce8d824c4d0c82e03dab04;hpb=acbe10c62c46a30c58e08d8971a736f04e68dbf8;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 100755 new mode 100644 index 1ca4eca..054f50d --- a/dali-toolkit/internal/text/bidirectional-support.h +++ b/dali-toolkit/internal/text/bidirectional-support.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_BIDIRECTIONAL_SUPPORT_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,8 +19,8 @@ */ // EXTERNAL INCLUDES -#include #include +#include // INTERNAL INCLUDES #include @@ -30,13 +30,10 @@ namespace Dali { - namespace Toolkit { - namespace Text { - /** * Sets the bidirectional info into the logical model. * @@ -46,39 +43,38 @@ namespace Text * @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. + * @param[in] matchLayoutDirection Whether match for layout direction or not. + * @param[in] layoutDirection The direction of the layout. */ -void SetBidirectionalInfo( const Vector& text, - const Vector& scripts, - const Vector& lineBreakInfo, - CharacterIndex startIndex, - Length numberOfCharacters, - Vector& bidirectionalInfo, - bool matchSystemLanguageDirection = false, - Dali::LayoutDirection::Type layoutDirection = LayoutDirection::LEFT_TO_RIGHT ); +void SetBidirectionalInfo(const Vector& text, + const Vector& scripts, + const Vector& lineBreakInfo, + CharacterIndex startIndex, + Length numberOfCharacters, + Vector& bidirectionalInfo, + bool matchLayoutDirection = false, + Dali::LayoutDirection::Type layoutDirection = LayoutDirection::LEFT_TO_RIGHT); /** - * Sets the visual to logical map tables. + * @brief Sets the visual to logical map table for a given line. * - * 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] bidirectionalParagraphInfo The paragraph's bidirectional info. + * @param[out] lineInfoRuns Line runs with the visual to logical conversion maps. + * @param[in] bidiLineIndex Index to the line's bidirectional info. * @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. + * @param[in] startIndexInSecondHalfLine The character from where the bidirectional info is set for the second half of line.. + * @param[in] numberOfCharactersInSecondHalfLine The number of characters for the second half of line.. + * @param[in] direction The direction of the line. */ -void ReorderLines( const Vector& bidirectionalInfo, - CharacterIndex startIndex, - Length numberOfCharacters, - Vector& lineRuns, - Vector& lineInfoRuns ); +void ReorderLine(const BidirectionalParagraphInfoRun& bidirectionalParagraphInfo, + Vector& lineInfoRuns, + BidirectionalLineRunIndex bidiLineIndex, + CharacterIndex startIndex, + Length numberOfCharacters, + CharacterIndex startIndexInSecondHalfLine, + Length numberOfCharactersInSecondHalfLine, + CharacterDirection direction); /** * @brief Replaces any character in the right to left paragraphs which could be mirrored. @@ -92,15 +88,15 @@ void ReorderLines( const Vector& bidirectionalInf * * @return @e true if a character has been replaced. */ -bool GetMirroredText( const Vector& text, - const Vector& directions, - const Vector& bidirectionalInfo, - CharacterIndex startIndex, - Length numberOfCharacters, - Vector& mirroredText ); +bool GetMirroredText(const Vector& text, + const Vector& directions, + const Vector& bidirectionalInfo, + CharacterIndex startIndex, + Length numberOfCharacters, + Vector& mirroredText); /** - * @brief Retrieves the character's directions. + * @brief Retrieves the characters' 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. @@ -111,11 +107,11 @@ bool GetMirroredText( const Vector& text, * @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 ); +void GetCharactersDirection(const Vector& bidirectionalInfo, + Length totalNumberOfCharacters, + CharacterIndex startIndex, + Length numberOfCharacters, + Vector& directions); } // namespace Text