1 #ifndef DALI_TOOLKIT_TEXT_VIEW_H
2 #define DALI_TOOLKIT_TEXT_VIEW_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali-toolkit/internal/text/text-view-interface.h>
23 #include <dali-toolkit/internal/text/visual-model-impl.h>
35 * @brief View provides an interface between the Text layout engine and rendering back-end.
37 class View : public ViewInterface
42 * @brief Create a new instance of a View.
47 * @brief Virtual destructor.
52 * @brief Set the visual model.
54 * @param[in] visualModel The visual model used by the View.
56 void SetVisualModel( VisualModelPtr visualModel );
59 * @copydoc Dali::Toolkit::Text::ViewInterface::GetControlSize()
61 virtual const Vector2& GetControlSize() const;
64 * @copydoc Dali::Toolkit::Text::ViewInterface::GetLayoutSize()
66 virtual const Vector2& GetLayoutSize() const;
69 * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfGlyphs()
71 virtual Length GetNumberOfGlyphs() const;
74 * @copydoc Dali::Toolkit::Text::ViewInterface::GetGlyphs()
76 virtual Length GetGlyphs( GlyphInfo* glyphs,
77 Vector2* glyphPositions,
79 GlyphIndex glyphIndex,
80 Length numberOfGlyphs ) const;
83 * @copydoc Dali::Toolkit::Text::ViewInterface::GetColors()
85 virtual const Vector4* const GetColors() const;
88 * @copydoc Dali::Toolkit::Text::ViewInterface::GetColorIndices()
90 virtual const ColorIndex* const GetColorIndices() const;
93 * @copydoc Dali::Toolkit::Text::ViewInterface::GetBackgroundColors()
95 virtual const Vector4* const GetBackgroundColors() const;
98 * @copydoc Dali::Toolkit::Text::ViewInterface::GetBackgroundColorIndices()
100 virtual const ColorIndex* const GetBackgroundColorIndices() const;
103 * @copydoc Dali::Toolkit::Text::ViewInterface::GetTextColor()
105 virtual const Vector4& GetTextColor() const;
108 * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowOffset()
110 virtual const Vector2& GetShadowOffset() const;
113 * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowColor()
115 virtual const Vector4& GetShadowColor() const;
118 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineColor()
120 virtual const Vector4& GetUnderlineColor() const;
123 * @copydoc Dali::Toolkit::Text::ViewInterface::IsUnderlineEnabled()
125 virtual bool IsUnderlineEnabled() const;
128 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineHeight()
130 virtual float GetUnderlineHeight() const;
133 * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfUnderlineRuns()
135 virtual Length GetNumberOfUnderlineRuns() const;
138 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineRuns()
140 virtual void GetUnderlineRuns( GlyphRun* underlineRuns,
141 UnderlineRunIndex index,
142 Length numberOfRuns ) const;
145 * @copydoc Dali::Toolkit::Text::ViewInterface::GetOutlineColor()
147 virtual const Vector4& GetOutlineColor() const;
150 * @copydoc Dali::Toolkit::Text::ViewInterface::GetOutlineWidth()
152 virtual uint16_t GetOutlineWidth() const;
157 View( const View& handle );
160 View& operator=( const View& handle );
169 } // namespace Toolkit
173 #endif // DALI_TOOLKIT_TEXT_VIEW_H