Split dali-toolkit into Base & Optional
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / public-api / controls / view / view.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 // CLASS HEADER
18
19 #include "view.h"
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24
25 #include <dali-toolkit/internal/controls/view/view-impl.h>
26
27 namespace Dali
28 {
29
30 namespace Toolkit
31 {
32
33 const char* const View::SIGNAL_ORIENTATION_ANIMATION_START = "orientation-animation-start";
34
35 View::View()
36 {
37 }
38
39 View::View( const View& handle )
40 : Control( handle )
41 {
42 }
43
44 View& View::operator=( const View& handle )
45 {
46   if( &handle != this )
47   {
48     Control::operator=( handle );
49   }
50   return *this;
51 }
52
53 View::~View()
54 {
55 }
56
57 View View::New( bool fullscreen )
58 {
59   return Internal::View::New( fullscreen );
60 }
61
62 View View::DownCast( BaseHandle handle )
63 {
64   return Control::DownCast<View, Internal::View>(handle);
65 }
66
67 Layer View::GetContentLayer( unsigned int index ) const
68 {
69   return GetImpl( *this ).GetContentLayer( index );
70 }
71
72 unsigned int View::AddContentLayer( Layer layer )
73 {
74   return GetImpl( *this ).AddContentLayer( layer );
75 }
76
77 void View::RemoveContentLayer( Layer layer )
78 {
79   GetImpl( *this ).RemoveContentLayer( layer );
80 }
81
82 Layer View::GetBackgroundLayer() const
83 {
84   return GetImpl( *this ).GetBackgroundLayer();
85 }
86
87 void View::SetBackground( ImageActor image )
88 {
89   GetImpl( *this ).SetBackground( image );
90 }
91
92 void View::SetOrientationFunction( Degree portrait, Degree landscale, Degree portraitInverse, Degree landscapeInverse )
93 {
94   GetImpl( *this ).SetOrientationFunction( portrait, landscale, portraitInverse, landscapeInverse );
95 }
96
97 void View::OrientationChanged( Orientation orientation )
98 {
99   GetImpl( *this ).OrientationChanged( orientation );
100 }
101
102 void View::SetAutoRotate( bool enabled )
103 {
104   GetImpl( *this ).SetAutoRotate( enabled );
105 }
106
107 View::OrientationAnimationStartedSignalV2& View::OrientationAnimationStartedSignal()
108 {
109   return GetImpl( *this ).OrientationAnimationStartedSignal();
110 }
111
112 View::View( Internal::View& implementation )
113 : Control( implementation )
114 {
115 }
116
117 View::View( Dali::Internal::CustomActor* internal )
118 : Control( internal )
119 {
120   VerifyCustomActorPointer<Internal::View>(internal);
121 }
122
123 } // namespace Toolkit
124
125 } // namespace Dali