dbb75b1a3a2e2b55569bb2cc4c994ce2921a0fcd
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / builder / builder.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 // CLASS HEADER
18
19 #include "builder.h"
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24
25 #include <dali-toolkit/internal/builder/builder-impl.h>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 Builder::Builder()
34 {
35 }
36
37 Builder::~Builder()
38 {
39 }
40
41 Builder Builder::New(void)
42 {
43   return Builder(new Internal::Builder());
44 }
45
46 Builder::Builder(Internal::Builder *impl)
47   : BaseHandle(impl)
48 {
49 }
50
51 void Builder::LoadFromString( const std::string &data, UIFormat rep )
52 {
53   GetImpl(*this).LoadFromString( data );
54 }
55
56 void Builder::AddConstants( const PropertyValueMap& map )
57 {
58   GetImpl(*this).AddConstants( map );
59 }
60
61 void Builder::AddConstant( const std::string& key, const Property::Value& value )
62 {
63   GetImpl(*this).AddConstant( key, value );
64 }
65
66 const PropertyValueMap& Builder::GetConstants() const
67 {
68   return GetImpl(*this).GetConstants();
69 }
70
71 const Property::Value& Builder::GetConstant( const std::string& key ) const
72 {
73   return GetImpl(*this).GetConstant( key );
74 }
75
76 Animation Builder::CreateAnimation( const std::string& animationName )
77 {
78   return GetImpl(*this).CreateAnimation( animationName );
79 }
80
81 Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map )
82 {
83   return GetImpl(*this).CreateAnimation( animationName, map );
84 }
85
86 Animation Builder::CreateAnimation( const std::string& animationName, Dali::Actor sourceActor )
87 {
88   return GetImpl(*this).CreateAnimation( animationName, sourceActor );
89 }
90
91 Animation Builder::CreateAnimation( const std::string& animationName, const PropertyValueMap& map, Dali::Actor sourceActor )
92 {
93   return GetImpl(*this).CreateAnimation( animationName, map, sourceActor );
94 }
95
96 BaseHandle Builder::CreateFromStyle( const std::string& styleName )
97 {
98   return BaseHandle();
99 }
100
101 BaseHandle Builder::CreateFromStyle( const std::string& styleName, const PropertyValueMap& map )
102 {
103   return BaseHandle();
104 }
105
106 BaseHandle Builder::Create( const std::string& templateName )
107 {
108   return GetImpl(*this).Create( templateName );
109 }
110
111 BaseHandle Builder::Create( const std::string& templateName, const PropertyValueMap& map )
112 {
113   return GetImpl(*this).Create( templateName, map );
114 }
115
116 bool Builder::ApplyStyle( const std::string& styleName, Handle& handle )
117 {
118   return GetImpl(*this).ApplyStyle( styleName, handle );
119 }
120
121 void Builder::AddActors( Actor toActor )
122 {
123   GetImpl(*this).AddActors( toActor );
124 }
125
126 void Builder::AddActors( const std::string &sectionName, Actor toActor )
127 {
128   GetImpl(*this).AddActors( sectionName, toActor );
129 }
130
131 Font Builder::GetFont( const std::string &name ) const
132 {
133   return GetImpl(*this).GetFont( name );
134 }
135
136 TextStyle Builder::GetTextStyle( const std::string &name ) const
137 {
138   return GetImpl(*this).GetTextStyle( name );
139 }
140
141 Image Builder::GetImage( const std::string &name ) const
142 {
143   return GetImpl(*this).GetImage( name );
144 }
145
146 Actor Builder::GetActor( const std::string &name ) const
147 {
148   return GetImpl(*this).GetActor( name );
149 }
150
151 Animation Builder::GetAnimation( const std::string &name ) const
152 {
153   return GetImpl(*this).GetAnimation( name );
154 }
155
156 void Builder::CreateRenderTask( const std::string &name )
157 {
158   GetImpl(*this).CreateRenderTask( name );
159 }
160
161 ShaderEffect Builder::GetShaderEffect( const std::string &name )
162 {
163   return GetImpl(*this).GetShaderEffect( name );
164 }
165
166 FrameBufferImage Builder::GetFrameBufferImage( const std::string &name )
167 {
168   return GetImpl(*this).GetFrameBufferImage( name );
169 }
170
171 ActorContainer Builder::GetTopLevelActors( void ) const
172 {
173   return GetImpl(*this).GetTopLevelActors();
174 }
175
176 } // namespace Toolkit
177
178 } // namespace Dali
179