X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-view.h;h=7cccf19d47fee2c197709324fc9be5a71086dd6d;hp=e600940041c82a3e7a40935deb10f4337ccc2f20;hb=020b07151378db83ab8e12eb3e2d51db0ed69996;hpb=5359a575636e678baf178dab5209b587be1a7551 diff --git a/dali-toolkit/internal/text/text-view.h b/dali-toolkit/internal/text/text-view.h old mode 100755 new mode 100644 index e600940..7cccf19 --- a/dali-toolkit/internal/text/text-view.h +++ b/dali-toolkit/internal/text/text-view.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_TEXT_VIEW_H /* - * Copyright (c) 2019 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. @@ -19,25 +19,23 @@ */ // INTERNAL INCLUDES +#include +#include #include #include namespace Dali { - namespace Toolkit { - namespace Text { - /** * @brief View provides an interface between the Text layout engine and rendering back-end. */ class View : public ViewInterface { public: - /** * @brief Create a new instance of a View. */ @@ -53,7 +51,14 @@ public: * * @param[in] visualModel The visual model used by the View. */ - void SetVisualModel( VisualModelPtr visualModel ); + void SetVisualModel(VisualModelPtr visualModel); + + /** + * @brief Set the logical model. + * + * @param[in] logicalModel The logical model used by the View. + */ + void SetLogicalModel(LogicalModelPtr logicalModel); /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetControlSize() @@ -73,11 +78,11 @@ public: /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetGlyphs() */ - virtual Length GetGlyphs( GlyphInfo* glyphs, - Vector2* glyphPositions, - float& minLineOffset, - GlyphIndex glyphIndex, - Length numberOfGlyphs ) const; + virtual Length GetGlyphs(GlyphInfo* glyphs, + Vector2* glyphPositions, + float& minLineOffset, + GlyphIndex glyphIndex, + Length numberOfGlyphs) const; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetColors() @@ -100,6 +105,11 @@ public: const ColorIndex* const GetBackgroundColorIndices() const override; /** + * @copydoc Dali::Toolkit::Text::ViewInterface::IsMarkupBackgroundColorSet() + */ + bool const IsMarkupBackgroundColorSet() const; + + /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetTextColor() */ const Vector4& GetTextColor() const override; @@ -125,11 +135,46 @@ public: bool IsUnderlineEnabled() const override; /** + * @copydoc Dali::Toolkit::Text::ViewInterface::IsMarkupUnderlineSet() + */ + bool const IsMarkupUnderlineSet() const; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetHyphens() + */ + const GlyphInfo* GetHyphens() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetHyphens() + */ + const Length* GetHyphenIndices() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetHyphens() + */ + Length GetHyphensCount() const override; + + /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineHeight() */ float GetUnderlineHeight() const override; /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineType() + */ + Text::Underline::Type GetUnderlineType() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetDashedUnderlineWidth() + */ + float GetDashedUnderlineWidth() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetDashedUnderlineGap() + */ + float GetDashedUnderlineGap() const override; + + /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfUnderlineRuns() */ Length GetNumberOfUnderlineRuns() const override; @@ -137,9 +182,9 @@ public: /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineRuns() */ - virtual void GetUnderlineRuns( GlyphRun* underlineRuns, - UnderlineRunIndex index, - Length numberOfRuns ) const; + virtual void GetUnderlineRuns(UnderlinedGlyphRun* underlineRuns, + UnderlineRunIndex index, + Length numberOfRuns) const; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetOutlineColor() @@ -151,16 +196,111 @@ public: */ uint16_t GetOutlineWidth() const override; -private: + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetEllipsisPosition() + */ + DevelText::EllipsisPosition::Type GetEllipsisPosition() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::IsTextElideEnabled() + */ + bool IsTextElideEnabled() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetStartIndexOfElidedGlyphs() + */ + GlyphIndex GetStartIndexOfElidedGlyphs() const override; + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetEndIndexOfElidedGlyphs() + */ + GlyphIndex GetEndIndexOfElidedGlyphs() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetFirstMiddleIndexOfElidedGlyphs() + */ + GlyphIndex GetFirstMiddleIndexOfElidedGlyphs() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetSecondMiddleIndexOfElidedGlyphs() + */ + GlyphIndex GetSecondMiddleIndexOfElidedGlyphs() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetStrikethroughColor() + */ + const Vector4& GetStrikethroughColor() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::IsStrikethroughEnabled() + */ + bool IsStrikethroughEnabled() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::IsMarkupStrikethroughSet() + */ + bool const IsMarkupStrikethroughSet() const; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetStrikethroughHeight() + */ + float GetStrikethroughHeight() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfStrikethroughRuns() + */ + Length GetNumberOfStrikethroughRuns() const; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetStrikethroughRuns() + */ + void GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns, + StrikethroughRunIndex index, + Length numberOfRuns) const; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfBoundedParagraphRuns() + */ + virtual Length GetNumberOfBoundedParagraphRuns() const; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetBoundedParagraphRuns() + */ + virtual const Vector& GetBoundedParagraphRuns() const; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfCharacterSpacingGlyphRuns() + */ + Length GetNumberOfCharacterSpacingGlyphRuns() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetCharacterSpacingGlyphRuns() + */ + const Vector& GetCharacterSpacingGlyphRuns() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetCharacterSpacing() + */ + const float GetCharacterSpacing() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetTextBuffer() + */ + const Character* GetTextBuffer() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetGlyphsToCharacters() + */ + const Vector& GetGlyphsToCharacters() const override; + +private: // Undefined - View( const View& handle ); + View(const View& handle); // Undefined - View& operator=( const View& handle ); + View& operator=(const View& handle); private: - struct Impl; Impl* mImpl; };