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/public-api/common/intrusive-ptr.h>
23 #include <dali/public-api/object/ref-object.h>
26 #include <dali-toolkit/public-api/text/text-view-interface.h>
27 #include <dali-toolkit/public-api/text/visual-model.h>
41 typedef IntrusivePtr<View> ViewPtr;
44 * @brief View provides an interface between the Text layout engine and rendering back-end.
46 class View : public RefObject, public ViewInterface
51 * @brief Create a new instance of a View.
53 * @return A pointer to a new View.
58 * @brief Set the visual model.
60 * @param[in] visualModel The visual model used by the View.
62 void SetVisualModel( VisualModelPtr visualModel );
65 * @copydoc Dali::Toolkit::Text::ViewInterface::GetNumberOfGlyphs()
67 virtual Length GetNumberOfGlyphs() const;
70 * @copydoc Dali::Toolkit::Text::ViewInterface::GetGlyphs()
72 virtual void GetGlyphs( GlyphIndex glyphIndex,
74 Length numberOfGlyphs ) const;
77 * @copydoc Dali::Toolkit::Text::ViewInterface::GetGlyphPositions()
79 virtual void GetGlyphPositions( GlyphIndex glyphIndex,
80 Vector2* glyphPositions,
81 Length numberOfGlyphs ) const;
86 * @brief A reference counted object may only be deleted by calling Unreference().
93 * @brief Private constructor.
98 View( const View& handle );
101 View& operator=( const View& handle );
110 } // namespace Toolkit
114 #endif // __DALI_TOOLKIT_TEXT_VIEW_H__