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