Conversion to Apache 2.0 license
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / public-api / controls / bubble-effect / bubble-emitter.cpp
1 /*
2  * Copyright (c) 2014 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 #include <dali-toolkit/public-api/controls/bubble-effect/bubble-emitter.h>
19
20 //INTERNAL INCLUDES
21 #include <dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h>
22
23
24 namespace Dali
25 {
26
27 namespace Toolkit
28 {
29
30 BubbleEmitter::BubbleEmitter()
31 {
32 }
33
34 BubbleEmitter::~BubbleEmitter()
35 {
36 }
37
38 BubbleEmitter::BubbleEmitter( Internal::BubbleEmitter& implementation )
39 : Control( implementation )
40 {
41 }
42
43 BubbleEmitter::BubbleEmitter(Dali::Internal::CustomActor* internal)
44 : Control( internal )
45 {
46   VerifyCustomActorPointer<Internal::BubbleEmitter>( internal );
47 }
48
49 BubbleEmitter BubbleEmitter::New( const Vector2& winSize,
50                                   Image shapeImage,
51                                   unsigned int maximumNumberOfBubble,
52                                   const Vector2& bubbleSizeRange )
53 {
54   return Internal::BubbleEmitter::New( winSize, shapeImage, maximumNumberOfBubble, bubbleSizeRange );
55 }
56
57 BubbleEmitter::BubbleEmitter( const BubbleEmitter& handle )
58 : Control( handle )
59 {
60 }
61
62 BubbleEmitter& BubbleEmitter::operator=( const BubbleEmitter& rhs )
63 {
64   if( &rhs != this )
65   {
66     Control::operator=(rhs);
67   }
68   return *this;
69 }
70
71 BubbleEmitter BubbleEmitter::DownCast( BaseHandle handle )
72 {
73   return Control::DownCast<BubbleEmitter, Internal::BubbleEmitter>( handle );
74 }
75
76 Actor BubbleEmitter::GetRootActor()
77 {
78   return GetImpl(*this).GetRootActor();
79 }
80
81 void BubbleEmitter::SetBackground( Image bgImage, const Vector3& hsvDelta )
82 {
83   GetImpl(*this).SetBackground( bgImage, hsvDelta );
84 }
85
86 void BubbleEmitter::SetShapeImage( Image shapeImage )
87 {
88   GetImpl(*this).SetShapeImage( shapeImage );
89 }
90
91 void BubbleEmitter::SetBubbleScale( float scale )
92 {
93   GetImpl(*this).SetBubbleScale( scale );
94 }
95
96 void BubbleEmitter::SetBubbleDensity( unsigned int density )
97 {
98   GetImpl(*this).SetBubbleDensity( density );
99 }
100
101 void BubbleEmitter::SetBlendMode( bool enable )
102 {
103   GetImpl(*this).SetBlendMode( enable );
104 }
105
106 void BubbleEmitter::EmitBubble( Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement )
107 {
108   GetImpl(*this).EmitBubble( animation, emitPosition, direction, displacement );
109 }
110
111 void BubbleEmitter::StartExplosion( float duration, float multiple )
112 {
113   GetImpl(*this).StartExplosion( duration, multiple );
114 }
115
116 void BubbleEmitter::Restore()
117 {
118   GetImpl(*this).Restore();
119 }
120
121 } // namespace Toolkit
122
123 } // namespace Dali