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=7b14c8c1666f863bb4fbe83b0a91cf3a8b93ecba;hp=43506a5c6c34d9bc8d668133e9b0baaf30e35d7d;hb=29a52105283ce8ced672ed92545daeacf882316a;hpb=820c66e71516e7a25600b8b5de2e84b5d44d8ff3 diff --git a/dali-toolkit/internal/text/text-view.h b/dali-toolkit/internal/text/text-view.h index 43506a5..7b14c8c 100644 --- a/dali-toolkit/internal/text/text-view.h +++ b/dali-toolkit/internal/text/text-view.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_VIEW_H__ -#define __DALI_TOOLKIT_TEXT_VIEW_H__ +#ifndef DALI_TOOLKIT_TEXT_VIEW_H +#define DALI_TOOLKIT_TEXT_VIEW_H /* - * Copyright (c) 2015 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. @@ -24,22 +24,16 @@ namespace Dali { - -struct Vector2; - 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. */ @@ -55,61 +49,192 @@ public: * * @param[in] visualModel The visual model used by the View. */ - void SetVisualModel( VisualModelPtr visualModel ); + void SetVisualModel(VisualModelPtr visualModel); + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetControlSize() + */ + const Vector2& GetControlSize() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetLayoutSize() + */ + const Vector2& GetLayoutSize() const override; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfGlyphs() */ - virtual Length GetNumberOfGlyphs() const; + Length GetNumberOfGlyphs() const override; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetGlyphs() */ - virtual Length GetGlyphs( GlyphInfo* glyphs, - Vector2* glyphPositions, - 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() + */ + const Vector4* const GetColors() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetColorIndices() + */ + const ColorIndex* const GetColorIndices() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetBackgroundColors() + */ + const Vector4* const GetBackgroundColors() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetBackgroundColorIndices() + */ + const ColorIndex* const GetBackgroundColorIndices() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::IsMarkupBackgroundColorSet() + */ + bool const IsMarkupBackgroundColorSet() const; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetTextColor() */ - virtual const Vector4& GetTextColor() const; + const Vector4& GetTextColor() const override; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowOffset() */ - virtual const Vector2& GetShadowOffset() const; + const Vector2& GetShadowOffset() const override; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowColor() */ - virtual const Vector4& GetShadowColor() const; + const Vector4& GetShadowColor() const override; /** * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineColor() */ - virtual const Vector4& GetUnderlineColor() const; + const Vector4& GetUnderlineColor() const override; /** * @copydoc Dali::Toolkit::Text::ViewInterface::IsUnderlineEnabled() */ - virtual bool IsUnderlineEnabled() const; + bool IsUnderlineEnabled() const override; + + /** + * @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() */ - virtual float GetUnderlineHeight() const; + float GetUnderlineHeight() const override; -private: + /** + * @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; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineRuns() + */ + virtual void GetUnderlineRuns(GlyphRun* underlineRuns, + UnderlineRunIndex index, + Length numberOfRuns) const; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetOutlineColor() + */ + const Vector4& GetOutlineColor() const override; + + /** + * @copydoc Dali::Toolkit::Text::ViewInterface::GetOutlineWidth() + */ + uint16_t GetOutlineWidth() const override; + + /** + * @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::GetStrikethroughHeight() + */ + float GetStrikethroughHeight() 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; }; @@ -119,4 +244,4 @@ private: } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_VIEW_H__ +#endif // DALI_TOOLKIT_TEXT_VIEW_H