Remove redundant orientation settings as default camera already looks at stage
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-view / text-actor-cache.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_TEXT_ACTOR_CACHE_H__
2 #define __DALI_TOOLKIT_INTERNAL_TEXT_ACTOR_CACHE_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/actors/text-actor.h>
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 namespace Internal
31 {
32
33 /**
34  * Stores text-actors to be reused.
35  *
36  * Is it asumed that the first text-actor of a group of text-actors added to the cache is the first one to be rehused.
37  */
38 class TextActorCache
39 {
40
41 public:
42   /**
43    * Default constructor.
44    */
45   TextActorCache();
46
47   /**
48    * Destructor.
49    */
50   ~TextActorCache();
51
52   /**
53    * Inserts the given text-actors into the cache.
54    *
55    * First text-actor of the vector is the first one to be reused.
56    *
57    * @param[in] textActors The text-actors to be inserted into the cache.
58    */
59   void InsertTextActors( const std::vector<TextActor>& textActors );
60
61   /**
62    * Retrieves a text-actor from the cache.
63    *
64    * @return A handle to a text-actor. It returns a non initialized handle if the cache has no text-actors.
65    */
66   TextActor RetrieveTextActor();
67
68   /**
69    * Clears the text of the text-actor in the cache.
70    */
71   void ClearTexts();
72
73 private:
74   std::vector<TextActor> mTextActors; ///< Stores cached text-actors.
75 };
76
77 } // namespace Internal
78
79 } // namespace Toolkit
80
81 } // namespace Dali
82
83 #endif // __DALI_TOOLKIT_INTERNAL_TEXT_ACTOR_CACHE_H__