X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Flogical-model-impl.h;h=7085d797cdea548bf49086776374798f5ae392d4;hb=eefe73d95db6e9be0b518c5b796e1f1a081cce12;hp=269247f127edde7a4a5c02297af75b939cb75f40;hpb=24ab5420ad958de9ba345b504de62881162c754b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/logical-model-impl.h b/dali-toolkit/internal/text/logical-model-impl.h index 269247f..7085d79 100644 --- a/dali-toolkit/internal/text/logical-model-impl.h +++ b/dali-toolkit/internal/text/logical-model-impl.h @@ -26,7 +26,9 @@ // INTERNAL INCLUDES #include #include +#include #include +#include #include namespace Dali @@ -38,12 +40,9 @@ namespace Toolkit namespace Text { -struct BidirectionalLineInfoRun; -struct BidirectionalParagraphInfoRun; -struct FontRun; class LogicalModel; typedef IntrusivePtr LogicalModelPtr; -struct ScriptRun; +struct InputStyle; /** * @brief A logical text model contains layout independent information. @@ -97,9 +96,13 @@ public: * * @param[in] bidirectionalInfo Pointer to a buffer with all the bidirectional info runs. * @param[in] numberOfRuns The number of bidirectional info runs. + * @param[in] startIndex Character index from where the conversion tables are set. + * @param[in] numberOfCharacters The number of characters. */ void SetVisualToLogicalMap( const BidirectionalLineInfoRun* const bidirectionalInfo, - Length numberOfRuns ); + Length numberOfRuns, + CharacterIndex startIndex, + Length numberOfCharacters ); /** * @brief Retrieves the logical character index for the given visual character index. @@ -110,6 +113,29 @@ public: */ CharacterIndex GetLogicalCharacterIndex( CharacterIndex visualCharacterIndex ) const; + // Text style. + + /** + * @brief Updates the text's style runs with the added or removed text. + * + * @param[in] index The character's index. + * @param[in] numberOfCharacters The number of characters added or removed. If the value is negative the characters are removed. + */ + void UpdateTextStyleRuns( CharacterIndex index, int numberOfCharacters ); + + /** + * @brief Retrieves the text's style for the given character index. + * + * @param[in] index The character index. + * @param[out] style The text's style in the given style. + */ + void RetrieveStyle( CharacterIndex index, InputStyle& style ); + + /** + * @brief Clears the font description runs. + */ + void ClearFontDescriptionRuns(); + protected: /** @@ -135,6 +161,8 @@ public: Vector mText; Vector mScriptRuns; Vector mFontRuns; + Vector mColorRuns; + Vector mFontDescriptionRuns; Vector mLineBreakInfo; Vector mWordBreakInfo; Vector mBidirectionalParagraphInfo;