2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
8 // http://floralicense.org/license/
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.
18 #include "navigation-control.h"
23 #include <dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.h>
31 const char* const NavigationControl::ACTION_PUSH = "push";
32 const char* const NavigationControl::ACTION_POP = "pop";
34 NavigationControl::NavigationControl()
38 NavigationControl::NavigationControl( const NavigationControl& handle )
43 NavigationControl& NavigationControl::operator=( const NavigationControl& handle)
47 Control::operator=( handle );
52 NavigationControl::~NavigationControl()
56 NavigationControl NavigationControl::New()
58 return Internal::NavigationControl::New();
61 NavigationControl NavigationControl::DownCast( BaseHandle handle )
63 return Control::DownCast<NavigationControl, Internal::NavigationControl>(handle);
66 NavigationControl::NavigationControl( Internal::NavigationControl& implementation )
67 : Control( implementation )
71 NavigationControl::NavigationControl( Dali::Internal::CustomActor* internal )
74 VerifyCustomActorPointer<Internal::NavigationControl>(internal);
78 void NavigationControl::PushItem( Page item )
80 GetImpl( *this ).PushItem( item );
83 Page NavigationControl::PopItem()
85 return GetImpl( *this ).PopItem();
88 size_t NavigationControl::GetItemCount() const
90 return GetImpl( *this ).GetItemCount();
93 Page NavigationControl::GetItem(std::size_t index) const
95 return GetImpl( *this ).GetItem( index );
98 Page NavigationControl::GetCurrentItem() const
100 return GetImpl(*this ).GetCurrentItem();
103 void NavigationControl::SetBackground( Actor background)
105 GetImpl( *this ).SetBackground( background );
108 void NavigationControl::CreateNavigationToolBar( NaviToolBarStyle toolBarStylePortrait, NaviToolBarStyle toolBarStyleLandscape )
110 GetImpl( *this ).CreateNavigationToolBar( toolBarStylePortrait, toolBarStyleLandscape );
113 void NavigationControl::CreateNavigationTitleBar( NaviTitleBarStyle titleBarStylePortrait, NaviTitleBarStyle titleBarStyleLandscape )
115 GetImpl( *this ).CreateNavigationTitleBar( titleBarStylePortrait, titleBarStyleLandscape );
118 void NavigationControl::OrientationChanged( int angle )
120 GetImpl( *this ).OrientationChanged( angle );
123 void NavigationControl::SetOrientationRotateAnimation( float duration, AlphaFunction alphaFunc)
125 GetImpl( *this ).SetOrientationRotateAnimation( duration, alphaFunc );
128 NavigationControl::ItemPushedSignalV2& NavigationControl::ItemPushedSignal()
130 return GetImpl( *this ).ItemPushedSignal();
133 NavigationControl::ItemPoppedSignalV2& NavigationControl::ItemPoppedSignal()
135 return GetImpl( *this ).ItemPoppedSignal();
138 } // namespace Toolkit