Updated demos to use DALi clang-format
[platform/core/uifw/dali-demo.git] / examples / visual-transitions / beat-control.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 #include "beat-control.h"
18 #include "beat-control-impl.h"
19
20 namespace Demo
21 {
22 BeatControl::BeatControl()
23 {
24 }
25
26 BeatControl::BeatControl(const BeatControl& beatControl)
27 : Control(beatControl)
28 {
29 }
30
31 BeatControl& BeatControl::operator=(const BeatControl& rhs)
32 {
33   if(&rhs != this)
34   {
35     Control::operator=(rhs);
36   }
37   return *this;
38 }
39
40 BeatControl::~BeatControl()
41 {
42 }
43
44 BeatControl BeatControl::New()
45 {
46   BeatControl beatControl = Internal::BeatControl::New();
47   return beatControl;
48 }
49
50 BeatControl BeatControl::New(const std::string& url)
51 {
52   BeatControl beatControl = Internal::BeatControl::New();
53   return beatControl;
54 }
55
56 BeatControl BeatControl::DownCast(BaseHandle handle)
57 {
58   return Control::DownCast<BeatControl, Internal::BeatControl>(handle);
59 }
60
61 void BeatControl::StartBounceAnimation()
62 {
63   GetImpl(*this).StartBounceAnimation();
64 }
65
66 void BeatControl::StartXAnimation()
67 {
68   GetImpl(*this).StartXAnimation();
69 }
70 void BeatControl::StartYAnimation()
71 {
72   GetImpl(*this).StartYAnimation();
73 }
74 void BeatControl::StartFadeAnimation()
75 {
76   GetImpl(*this).StartFadeAnimation();
77 }
78
79 BeatControl::BeatControl(Internal::BeatControl& implementation)
80 : Control(implementation)
81 {
82 }
83
84 BeatControl::BeatControl(Dali::Internal::CustomActor* internal)
85 : Control(internal)
86 {
87   VerifyCustomActorPointer<Internal::BeatControl>(internal);
88 }
89
90 } //namespace Demo