[dali_2.3.20] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / builder / builder.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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
18 // CLASS HEADER
19
20 #include "builder.h"
21
22 // EXTERNAL INCLUDES
23
24 // INTERNAL INCLUDES
25
26 #include <dali-toolkit/internal/builder/builder-impl.h>
27
28 namespace Dali
29 {
30 namespace Toolkit
31 {
32 Builder::Builder()
33 {
34 }
35
36 Builder::~Builder()
37 {
38 }
39
40 Builder Builder::New(void)
41 {
42   return Builder(new Internal::Builder());
43 }
44
45 Builder::Builder(Internal::Builder* impl)
46 : BaseHandle(impl)
47 {
48 }
49
50 void Builder::LoadFromString(const std::string& data, UIFormat rep)
51 {
52   GetImpl(*this).LoadFromString(data);
53 }
54
55 void Builder::AddConstants(const Property::Map& map)
56 {
57   GetImpl(*this).AddConstants(map);
58 }
59
60 void Builder::AddConstant(const std::string& key, const Property::Value& value)
61 {
62   GetImpl(*this).AddConstant(key, value);
63 }
64
65 const Property::Map& Builder::GetConfigurations() const
66 {
67   return GetImpl(*this).GetConfigurations();
68 }
69
70 const Property::Map& Builder::GetConstants() const
71 {
72   return GetImpl(*this).GetConstants();
73 }
74
75 const Property::Value& Builder::GetConstant(const std::string& key) const
76 {
77   return GetImpl(*this).GetConstant(key);
78 }
79
80 Animation Builder::CreateAnimation(const std::string& animationName)
81 {
82   return GetImpl(*this).CreateAnimation(animationName);
83 }
84
85 Animation Builder::CreateAnimation(const std::string& animationName, const Property::Map& map)
86 {
87   return GetImpl(*this).CreateAnimation(animationName, map);
88 }
89
90 Animation Builder::CreateAnimation(const std::string& animationName, Dali::Actor sourceActor)
91 {
92   return GetImpl(*this).CreateAnimation(animationName, sourceActor);
93 }
94
95 Animation Builder::CreateAnimation(const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor)
96 {
97   return GetImpl(*this).CreateAnimation(animationName, map, sourceActor);
98 }
99
100 BaseHandle Builder::Create(const std::string& templateName)
101 {
102   return GetImpl(*this).Create(templateName);
103 }
104
105 BaseHandle Builder::Create(const std::string& templateName, const Property::Map& map)
106 {
107   return GetImpl(*this).Create(templateName, map);
108 }
109
110 BaseHandle Builder::CreateFromJson(const std::string& json)
111 {
112   return GetImpl(*this).CreateFromJson(json);
113 }
114
115 bool Builder::ApplyStyle(const std::string& styleName, Handle& handle)
116 {
117   return GetImpl(*this).ApplyStyle(styleName, handle);
118 }
119
120 bool Builder::ApplyFromJson(Handle& handle, const std::string& json)
121 {
122   return GetImpl(*this).ApplyFromJson(handle, json);
123 }
124
125 void Builder::AddActors(Actor toActor)
126 {
127   GetImpl(*this).AddActors(toActor);
128 }
129
130 void Builder::AddActors(const std::string& sectionName, Actor toActor)
131 {
132   GetImpl(*this).AddActors(sectionName, toActor);
133 }
134
135 void Builder::CreateRenderTask(const std::string& name)
136 {
137   GetImpl(*this).CreateRenderTask(name);
138 }
139
140 Path Builder::GetPath(const std::string& name)
141 {
142   return GetImpl(*this).GetPath(name);
143 }
144
145 PathConstrainer Builder::GetPathConstrainer(const std::string& pathConstrainerName)
146 {
147   return GetImpl(*this).GetPathConstrainer(pathConstrainerName);
148 }
149
150 LinearConstrainer Builder::GetLinearConstrainer(const std::string& linearConstrainerName)
151 {
152   return GetImpl(*this).GetLinearConstrainer(linearConstrainerName);
153 }
154
155 Builder::BuilderSignalType& Builder::QuitSignal()
156 {
157   return GetImpl(*this).QuitSignal();
158 }
159
160 } // namespace Toolkit
161
162 } // namespace Dali