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=c072abd783403cfd442a1d9ad05eec0455290414;hp=e611c3ce815dfb787e0818b43bca6445267b50dc;hb=70fdb1a1e8e2660c383079ae49bc94fbe14943d1;hpb=cd7d41bc8e0a0816da28401207091344fbbe0b2c diff --git a/dali-toolkit/internal/text/text-view.h b/dali-toolkit/internal/text/text-view.h index e611c3c..c072abd 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,67 +49,177 @@ 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 void GetGlyphs( GlyphInfo* glyphs, - 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::GetGlyphPositions() + * @copydoc Dali::Toolkit::Text::ViewInterface::GetColorIndices() */ - virtual void GetGlyphPositions( Vector2* glyphPositions, - GlyphIndex glyphIndex, - Length numberOfGlyphs ) const; + 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::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; }; @@ -125,4 +229,4 @@ private: } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_VIEW_H__ +#endif // DALI_TOOLKIT_TEXT_VIEW_H