1 #ifndef __DALI_TOOLKIT_TEXT_VIEW_H__
2 #define __DALI_TOOLKIT_TEXT_VIEW_H__
5 * Copyright (c) 2015 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,
78 GlyphIndex glyphIndex,
79 Length numberOfGlyphs ) const;
82 * @copydoc Dali::Toolkit::Text::ViewInterface::GetColors()
84 virtual const Vector4* const GetColors() const;
87 * @copydoc Dali::Toolkit::Text::ViewInterface::GetColorIndices()
89 virtual const ColorIndex* const GetColorIndices() const;
92 * @copydoc Dali::Toolkit::Text::ViewInterface::GetTextColor()
94 virtual const Vector4& GetTextColor() const;
97 * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowOffset()
99 virtual const Vector2& GetShadowOffset() const;
102 * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowColor()
104 virtual const Vector4& GetShadowColor() const;
107 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineColor()
109 virtual const Vector4& GetUnderlineColor() const;
112 * @copydoc Dali::Toolkit::Text::ViewInterface::IsUnderlineEnabled()
114 virtual bool IsUnderlineEnabled() const;
117 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineHeight()
119 virtual float GetUnderlineHeight() const;
122 * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfUnderlineRuns()
124 virtual Length GetNumberOfUnderlineRuns() const;
127 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineRuns()
129 virtual void GetUnderlineRuns( GlyphRun* underlineRuns,
130 UnderlineRunIndex index,
131 Length numberOfRuns ) const;
136 View( const View& handle );
139 View& operator=( const View& handle );
148 } // namespace Toolkit
152 #endif // __DALI_TOOLKIT_TEXT_VIEW_H__