-#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.
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.
*/
*
* @param[in] visualModel The visual model used by the View.
*/
- void SetVisualModel( VisualModelPtr visualModel );
+ void SetVisualModel(VisualModelPtr visualModel);
/**
* @copydoc Dali::Toolkit::Text::ViewInterface::GetControlSize()
*/
- virtual const Vector2& GetControlSize() const;
+ const Vector2& GetControlSize() const override;
/**
* @copydoc Dali::Toolkit::Text::ViewInterface::GetLayoutSize()
*/
- virtual const Vector2& GetLayoutSize() const;
+ 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()
*/
- virtual const Vector4* const GetColors() const;
+ const Vector4* const GetColors() const override;
/**
* @copydoc Dali::Toolkit::Text::ViewInterface::GetColorIndices()
*/
- virtual const ColorIndex* const GetColorIndices() 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;
/**
* @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfUnderlineRuns()
*/
- virtual Length GetNumberOfUnderlineRuns() const;
+ Length GetNumberOfUnderlineRuns() const override;
/**
* @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineRuns()
*/
- virtual void GetUnderlineRuns( GlyphRun* underlineRuns,
- UnderlineRunIndex index,
- Length numberOfRuns ) const;
+ virtual void GetUnderlineRuns(GlyphRun* underlineRuns,
+ UnderlineRunIndex index,
+ Length numberOfRuns) const;
-private:
+ /**
+ * @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;
+
+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;
};
} // namespace Dali
-#endif // __DALI_TOOLKIT_TEXT_VIEW_H__
+#endif // DALI_TOOLKIT_TEXT_VIEW_H