Conversion to Apache 2.0 license
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / public-api / controls / magnifier / magnifier.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/magnifier/magnifier.h>
19 #include <dali-toolkit/internal/controls/magnifier/magnifier-impl.h>
20
21 using namespace Dali;
22
23 namespace
24 {
25
26 } // unnamed namespace
27
28 namespace Dali
29 {
30
31 namespace Toolkit
32 {
33
34 ///////////////////////////////////////////////////////////////////////////////////////////////////
35 // Magnifier
36 ///////////////////////////////////////////////////////////////////////////////////////////////////
37
38 const std::string Magnifier::SOURCE_POSITION_PROPERTY_NAME( "source-position" );
39
40 Magnifier::Magnifier()
41 {
42 }
43
44 Magnifier::Magnifier( const Magnifier& handle )
45 : Control( handle )
46 {
47 }
48
49 Magnifier& Magnifier::operator=( const Magnifier& handle )
50 {
51   if( &handle != this )
52   {
53     Control::operator=( handle );
54   }
55   return *this;
56 }
57
58 Magnifier::Magnifier(Internal::Magnifier& implementation)
59 : Control(implementation)
60 {
61 }
62
63 Magnifier::Magnifier( Dali::Internal::CustomActor* internal )
64 : Control( internal )
65 {
66   VerifyCustomActorPointer<Internal::Magnifier>(internal);
67 }
68
69 Magnifier Magnifier::New()
70 {
71   return Internal::Magnifier::New();
72 }
73
74 Magnifier::~Magnifier()
75 {
76 }
77
78 void Magnifier::SetSourceActor(Actor actor)
79 {
80   GetImpl(*this).SetSourceActor( actor );
81 }
82
83 void Magnifier::SetSourcePosition(Vector3 position)
84 {
85   GetImpl(*this).SetSourcePosition( position );
86 }
87
88 bool Magnifier::GetFrameVisibility() const
89 {
90   return GetImpl(*this).GetFrameVisibility();
91 }
92
93 void Magnifier::SetFrameVisibility(bool visible)
94 {
95   GetImpl(*this).SetFrameVisibility(visible);
96 }
97
98 float Magnifier::GetMagnificationFactor() const
99 {
100   return GetImpl(*this).GetMagnificationFactor();
101 }
102
103 void Magnifier::SetMagnificationFactor(float value)
104 {
105   GetImpl(*this).SetMagnificationFactor( value );
106 }
107
108
109 } // namespace Toolkit
110
111 } // namespace Dali