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