X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-toolkit%2Finternal%2Ftext%2Flogical-model-impl.h;h=1bed3428bb48377bad20310297fb10635de85d02;hb=d7bf9a0c46a7900e7c066711463babd639154f73;hp=9f2fa31c00223d0ed9c37ad50819908843c539e2;hpb=73696fd1c7d5f263261a7114159aab66ead484ff;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 9f2fa31..1bed342 100644 --- a/dali-toolkit/internal/text/logical-model-impl.h +++ b/dali-toolkit/internal/text/logical-model-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_LOGICAL_MODEL_IMPL_H__ -#define __DALI_TOOLKIT_TEXT_LOGICAL_MODEL_IMPL_H__ +#ifndef DALI_TOOLKIT_TEXT_LOGICAL_MODEL_IMPL_H +#define DALI_TOOLKIT_TEXT_LOGICAL_MODEL_IMPL_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -24,23 +24,24 @@ #include // INTERNAL INCLUDES +#include #include #include #include -#include +#include #include +#include #include #include +#include +#include namespace Dali { - namespace Toolkit { - namespace Text { - class LogicalModel; typedef IntrusivePtr LogicalModelPtr; struct InputStyle; @@ -54,7 +55,6 @@ struct InputStyle; class LogicalModel : public RefObject { public: - /** * @brief Create a new instance of a LogicalModel. * @@ -71,7 +71,7 @@ public: * * @return The character's script. */ - Script GetScript( CharacterIndex characterIndex ) const; + Script GetScript(CharacterIndex characterIndex) const; // Bidirectional support interface. @@ -84,7 +84,7 @@ public: * * @return The character's direction. */ - CharacterDirection GetCharacterDirection( CharacterIndex characterIndex ) const; + CharacterDirection GetCharacterDirection(CharacterIndex characterIndex) const; // Visual <--> Logical conversion tables. @@ -98,7 +98,7 @@ public: * * @return The logical cursor index. */ - CharacterIndex GetLogicalCursorIndex( CharacterIndex visualCursorIndex ); + CharacterIndex GetLogicalCursorIndex(CharacterIndex visualCursorIndex); /** * @brief Retrieves the logical character index for the given visual character index. @@ -110,7 +110,7 @@ public: * * @return The logical character index. */ - CharacterIndex GetLogicalCharacterIndex( CharacterIndex visualCharacterIndex ); + CharacterIndex GetLogicalCharacterIndex(CharacterIndex visualCharacterIndex); /** * @brief Fetch the bidirectional line info for the given character. @@ -121,7 +121,7 @@ public: * * @return @e true if the given @e character is in a bidirectional line. */ - bool FetchBidirectionalLineInfo( CharacterIndex characterIndex ); + bool FetchBidirectionalLineInfo(CharacterIndex characterIndex); /** * @brief Retrieves the last fetched bidirectional line info. @@ -138,7 +138,7 @@ public: * @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 ); + void UpdateTextStyleRuns(CharacterIndex index, int numberOfCharacters); /** * @brief Retrieves the text's style for the given character index. @@ -146,7 +146,7 @@ public: * @param[in] index The character index. * @param[out] style The text's style in the given style. */ - void RetrieveStyle( CharacterIndex index, InputStyle& style ); + void RetrieveStyle(CharacterIndex index, InputStyle& style); /** * @brief Clears the font description runs. @@ -163,8 +163,8 @@ public: * @param[in] startIndex The character from where the paragraph info is set. * @param[in] numberOfCharacters The number of characters. */ - void CreateParagraphInfo( CharacterIndex startIndex, - Length numberOfCharacters ); + void CreateParagraphInfo(CharacterIndex startIndex, + Length numberOfCharacters); /** * @brief Find the paragraphs which contains the given characters. @@ -173,45 +173,58 @@ public: * @param[in] numberOfCharacters The number of characters of the run. * @param[out] paragraphs Indices to the paragraphs which contain the characters. */ - void FindParagraphs( CharacterIndex index, - Length numberOfCharacters, - Vector& paragraphs ); + void FindParagraphs(CharacterIndex index, + Length numberOfCharacters, + Vector& paragraphs); -protected: + // Embedded images + + /** + * @brief Clears the embedded images. + */ + void ClearEmbeddedImages(); + + /** + * @brief Clears the anchors. + */ + void ClearAnchors(); +protected: /** * @brief A reference counted object may only be deleted by calling Unreference(). */ virtual ~LogicalModel(); private: - /** * @brief Private constructor. */ LogicalModel(); // Undefined - LogicalModel( const LogicalModel& handle ); + LogicalModel(const LogicalModel& handle); // Undefined - LogicalModel& operator=( const LogicalModel& handle ); + LogicalModel& operator=(const LogicalModel& handle); public: - Vector mText; Vector mScriptRuns; Vector mFontRuns; Vector mColorRuns; + Vector mBackgroundColorRuns; Vector mFontDescriptionRuns; Vector mLineBreakInfo; - Vector mWordBreakInfo; Vector mParagraphInfo; Vector mBidirectionalParagraphInfo; - Vector mCharacterDirections; ///< For each character, whether is right to left. ( @e flase is left to right, @e true right to left ). + Vector mCharacterDirections; ///< For each character, whether is right to left. ( @e flase is left to right, @e true right to left ). Vector mBidirectionalLineInfo; + Vector mEmbeddedItems; + Vector mAnchors; + Vector mUnderlinedCharacterRuns; ///< The underlined character run from markup-processor + Vector mStrikethroughCharacterRuns; ///< The strikethrough character run from markup-processor - BidirectionalLineRunIndex mBidirectionalLineIndex; ///< The last fetched bidirectional line info. + BidirectionalLineRunIndex mBidirectionalLineIndex; ///< The last fetched bidirectional line info. }; } // namespace Text @@ -220,4 +233,4 @@ public: } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_LOGICAL_MODEL_IMPL_H__ +#endif // DALI_TOOLKIT_TEXT_LOGICAL_MODEL_IMPL_H