From: Victor Cebollada Date: Thu, 15 Jan 2015 16:32:01 +0000 (+0000) Subject: Bidirectional support interface X-Git-Tag: new_text_0.1~25 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=9b60907d658c71077d733f6431ac45ed3b4ffbae Bidirectional support interface Change-Id: I75e34e13432c242c79ef1327668f782ccc9d675e Signed-off-by: Victor Cebollada --- diff --git a/dali-toolkit/public-api/text/bidirectional-support.cpp b/dali-toolkit/public-api/text/bidirectional-support.cpp index ebff453..02645f4 100644 --- a/dali-toolkit/public-api/text/bidirectional-support.cpp +++ b/dali-toolkit/public-api/text/bidirectional-support.cpp @@ -33,12 +33,26 @@ void SetBidirectionalInfo( const Vector& text, { } +void ReplaceBidirectionalInfo( LogicalModel& model, + CharacterIndex characterIndex, + Length numberOfCharactersToRemove, + Length numberOfCharactersToInsert ) +{ +} + void ReorderLines( const Vector& bidirectionalInfo, const Vector& lineRuns, Vector& lineInfoRuns ) { } +void ReorderLines( LogicalModel& logicalModel, + const VisualModel& visualModel, + CharacterIndex characterIndex, + Length numberOfCharactersToRemove, + Length numberOfCharactersToInsert ) +{ +} } // namespace Text diff --git a/dali-toolkit/public-api/text/bidirectional-support.h b/dali-toolkit/public-api/text/bidirectional-support.h index 178c319..e45fc06 100644 --- a/dali-toolkit/public-api/text/bidirectional-support.h +++ b/dali-toolkit/public-api/text/bidirectional-support.h @@ -47,6 +47,25 @@ void SetBidirectionalInfo( const Vector& text, Vector& bidirectionalInfo ); /** + * Replaces the bidirectional info from the logical model. + * + * @pre The @p model needs to have a text set. + * @pre The @p model needs to have the line break info set. + * + * If the @p numberOfCharactersToRemove is zero, this operation is like an insert. + * If the @p numberOfCharactersToInsert is zero, this operation is like a remove. + * + * @param[in,out] model The text's logical model. + * @param[in] characterIndex Index to the first character. + * @param[in] numberOfCharactersToRemove The number of characters removed from the text. + * @param[in] numberOfCharactersToInsert The number of characters inserted in the text. + */ +void ReplaceBidirectionalInfo( LogicalModel& model, + CharacterIndex characterIndex, + Length numberOfCharactersToRemove, + Length numberOfCharactersToInsert ); + +/** * Sets the visual to logical and logical to visual map tables. * * Any map tables previously set are removed. @@ -63,6 +82,28 @@ void ReorderLines( const Vector& bidirectionalInf const Vector& lineRuns, Vector& lineInfoRuns ); +/** + * Replaces the visual to logical and logical to visual map tables. + * + * @pre The @p logicalModel needs to have a text set. + * @pre The @p logicalModel needs to have the line break info set. + * @pre The @p visualModel needs to have the laid-out lines info set. + * + * If the @p numberOfCharactersToRemove is zero, this operation is like an insert. + * If the @p numberOfCharactersToInsert is zero, this operation is like a remove. + * + * @param[in,out] logicalModel The text's logical model. + * @param[in] visualModel The text's visual model. + * @param[in] characterIndex Index to the first character. + * @param[in] numberOfCharactersToRemove The number of characters removed from the text. + * @param[in] numberOfCharactersToInsert The number of characters inserted in the text. + */ +void ReorderLines( LogicalModel& logicalModel, + const VisualModel& visualModel, + CharacterIndex characterIndex, + Length numberOfCharactersToRemove, + Length numberOfCharactersToInsert ); + } // namespace Text } // namespace Toolkit