1 #ifndef DALI_TOOLKIT_TEXT_TYPESETTER_H
2 #define DALI_TOOLKIT_TEXT_TYPESETTER_H
5 * Copyright (c) 2016 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>
38 typedef IntrusivePtr<Typesetter> TypesetterPtr;
41 * @brief This class is responsible of controlling the data flow of the text's rendering process.
43 class Typesetter : public RefObject
45 public: // Constructor.
47 * @brief Creates a Typesetter instance.
49 * The typesetter composes the final text retrieving the glyphs and the
50 * styles from the text's model.
52 * @param[in] model Pointer to the text's data model.
54 static TypesetterPtr New( const ModelInterface* const model );
58 * @brief Retrieves the pointer to the view model.
60 * @return A pointer to the view model.
62 ViewModel* GetViewModel();
66 * @brief Private constructor.
68 * @param[in] model Pointer to the text's data model.
70 Typesetter( const ModelInterface* const model );
72 // Declared private and left undefined to avoid copies.
73 Typesetter( const Typesetter& handle );
75 // Declared private and left undefined to avoid copies.
76 Typesetter& operator=( const Typesetter& handle );
81 * @brief A reference counted object may only be deleted by calling Unreference().
83 * Destroys the visual model.
85 virtual ~Typesetter();
93 } // namespace Toolkit
97 #endif // DALI_TOOLKIT_TEXT_TYPESETTER_H