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