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,
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::GetTextColor()
95 virtual const Vector4& GetTextColor() const;
98 * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowOffset()
100 virtual const Vector2& GetShadowOffset() const;
103 * @copydoc Dali::Toolkit::Text::ViewInterface::GetShadowColor()
105 virtual const Vector4& GetShadowColor() const;
108 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineColor()
110 virtual const Vector4& GetUnderlineColor() const;
113 * @copydoc Dali::Toolkit::Text::ViewInterface::IsUnderlineEnabled()
115 virtual bool IsUnderlineEnabled() const;
118 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineHeight()
120 virtual float GetUnderlineHeight() const;
123 * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfUnderlineRuns()
125 virtual Length GetNumberOfUnderlineRuns() const;
128 * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineRuns()
130 virtual void GetUnderlineRuns( GlyphRun* underlineRuns,
131 UnderlineRunIndex index,
132 Length numberOfRuns ) const;
137 View( const View& handle );
140 View& operator=( const View& handle );
149 } // namespace Toolkit
153 #endif // __DALI_TOOLKIT_TEXT_VIEW_H__