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