1 #ifndef __DALI_TOOLKIT_TEXT_VIEW_INTERFACE_H__
2 #define __DALI_TOOLKIT_TEXT_VIEW_INTERFACE_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-definitions.h>
36 * @brief Abstract interface to provide the information necessary displaying text.
39 * - The font & glyph IDs needed to get bitmaps etc. from TextAbstraction
40 * - The visual position of each glyph within the layout
41 * - A window into the text layout e.g. which page of a document to view
53 * @brief Virtual destructor
55 virtual ~ViewInterface();
58 * Retrieves the number of glyphs.
60 * @return The number of glyphs.
62 virtual Length GetNumberOfGlyphs() const = 0;
65 * @brief Retrieves glyphs in the given buffer.
67 * The size of the @p glyphs buffer needs to be big enough to copy the @p numberOfGlyphs.
68 * @param[out] glyphs Pointer to a buffer where the glyphs are copied.
69 * @param[in] glyphIndex Index to the first glyph.
70 * @param[in] numberOfGlyphs Number of glyphs to be copied.
72 virtual void GetGlyphs( GlyphInfo* glyphs,
73 GlyphIndex glyphIndex,
74 Length numberOfGlyphs ) const = 0;
77 * @brief Retrieves the glyph positions.
79 * @pre The size of the @p positions buffer needs to be big enough to copy the @p numberOfGlyphs positions.
80 * @param[out] glyphPositions Pointer to a buffer where the glyph positions are copied.
81 * @param[in] glyphIndex Index to the first glyph position.
82 * @param[in] numberOfGlyphs The number of positions to be copied.
84 virtual void GetGlyphPositions( Vector2* glyphPositions,
85 GlyphIndex glyphIndex,
86 Length numberOfGlyphs ) const = 0;
91 } // namespace Toolkit
95 #endif // __DALI_TOOLKIT_TEXT_VIEW_INTERFACE_H__