Update copyright year to 2015 for public api: toolkit
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / navigation-frame / navigation-control.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 #include "navigation-control.h"
20
21 // EXTERNAL INCLUDES
22
23 // INTERNAL INCLUDES
24 #include <dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.h>
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 NavigationControl::NavigationControl()
33 {
34 }
35
36 NavigationControl::NavigationControl( const NavigationControl& handle )
37 : Control(handle)
38 {
39 }
40
41 NavigationControl& NavigationControl::operator=( const NavigationControl& handle)
42 {
43   if( &handle != this )
44   {
45     Control::operator=( handle );
46   }
47   return *this;
48 }
49
50 NavigationControl::~NavigationControl()
51 {
52 }
53
54 NavigationControl NavigationControl::New()
55 {
56   return Internal::NavigationControl::New();
57 }
58
59 NavigationControl NavigationControl::DownCast( BaseHandle handle )
60 {
61   return Control::DownCast<NavigationControl, Internal::NavigationControl>(handle);
62 }
63
64 NavigationControl::NavigationControl( Internal::NavigationControl& implementation )
65 : Control( implementation )
66 {
67 }
68
69 NavigationControl::NavigationControl( Dali::Internal::CustomActor* internal )
70 : Control( internal)
71 {
72   VerifyCustomActorPointer<Internal::NavigationControl>(internal);
73 }
74
75
76 void NavigationControl::PushItem( Page item )
77 {
78   GetImpl( *this ).PushItem( item );
79 }
80
81 Page NavigationControl::PopItem()
82 {
83   return GetImpl( *this ).PopItem();
84 }
85
86 size_t NavigationControl::GetItemCount() const
87 {
88   return GetImpl( *this ).GetItemCount();
89 }
90
91 Page NavigationControl::GetItem(std::size_t index) const
92 {
93   return GetImpl( *this ).GetItem( index );
94 }
95
96 Page NavigationControl::GetCurrentItem() const
97 {
98   return GetImpl(*this ).GetCurrentItem();
99 }
100
101 void NavigationControl::SetBackground( Actor background)
102 {
103   GetImpl( *this ).SetBackground( background );
104 }
105
106 void NavigationControl::CreateNavigationToolBar( NaviToolBarStyle toolBarStylePortrait, NaviToolBarStyle toolBarStyleLandscape )
107 {
108   GetImpl( *this ).CreateNavigationToolBar( toolBarStylePortrait, toolBarStyleLandscape );
109 }
110
111 void NavigationControl::CreateNavigationTitleBar( NaviTitleBarStyle titleBarStylePortrait, NaviTitleBarStyle titleBarStyleLandscape )
112 {
113   GetImpl( *this ).CreateNavigationTitleBar( titleBarStylePortrait, titleBarStyleLandscape );
114 }
115
116 void NavigationControl::OrientationChanged( int angle )
117 {
118   GetImpl( *this ).OrientationChanged( angle );
119 }
120
121 void NavigationControl::SetOrientationRotateAnimation( float duration, AlphaFunction alphaFunc)
122 {
123   GetImpl( *this ).SetOrientationRotateAnimation( duration, alphaFunc );
124 }
125
126 NavigationControl::ItemPushedSignalType& NavigationControl::ItemPushedSignal()
127 {
128   return GetImpl( *this ).ItemPushedSignal();
129 }
130
131 NavigationControl::ItemPoppedSignalType& NavigationControl::ItemPoppedSignal()
132 {
133   return GetImpl( *this ).ItemPoppedSignal();
134 }
135
136 } // namespace Toolkit
137
138 } // namespace Dali