1 #ifndef __DALI_TOOLKIT_INTERNAL_NAVIGATION_BAR_H__
2 #define __DALI_TOOLKIT_INTERNAL_NAVIGATION_BAR_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
25 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
26 #include <dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.h>
27 #include <dali-toolkit/public-api/controls/navigation-frame/page.h>
28 #include <dali-toolkit/public-api/controls/navigation-frame/navigation-bar-style.h>
41 * Base class for different navigation bars such as tool bar, title bar.
43 class NavigationBar : public Dali::RefObject, public ConnectionTracker
49 * Pass in the navigationControl with which the bar associates and its style.
51 NavigationBar( NavigationControl& naviControl,
52 Toolkit::BasicNaviBarStyle barStylePortrait,
53 Toolkit::BasicNaviBarStyle barStyleLandscape);
56 * Update the bar scale when the size of the navigation control is set / reset
57 * Also Update the style when the orientation( portrait/landscape) is changed
58 * @param[in] naviControlSize The size of the navigation control
59 * @param[in] orientation The angle of the current orientation
61 void ScaleStyleUpdate( Vector2 naviControlSize, int orientation );
64 * Retrieve the height of the bar
65 * @return The height of the bar
67 float GetBarHeight() const;
72 * Set a background image and add it onto the NavigaionControl's bar layer.
75 void SetBackground( Actor background );
78 * Call the update function when it receives the page pushed signal.
80 void OnItemPushed( Toolkit::NavigationControl naviControl, Toolkit::Page naviItem );
83 * Call the update function when it receives the page popped signal.
85 void OnItemPopped( Toolkit::NavigationControl naviControl, Toolkit::Page naviItem );
92 virtual ~NavigationBar();
95 * Given the current page, update the bar content.
96 * @param[in] naviItem the item on the top of the navigation stack
98 virtual void Update( Toolkit::Page naviItem ) = 0;
101 * update the bar style when the orientation is changed
102 * @param[in] isPortrait Whether the current orientation is portrait mode
104 virtual void OrientationUpdate( bool isPortrait ) = 0;
109 NavigationBar(const NavigationBar&);
112 NavigationBar& operator=(const NavigationBar& rhs);
116 NavigationControl& mInternalNavigationControl;
117 Toolkit::BasicNaviBarStyle mBasicStylePortrait;
118 Toolkit::BasicNaviBarStyle mBasicStyleLandscape;
119 const Toolkit::BasicNaviBarStyle* mBasicCurrentStyle;
120 float mRelativeScale;
123 Toolkit::TableView mLayout;
127 Toolkit::Page mCurrentItem;
132 } // namespace Internal
134 } // namespace Toolkit
139 #endif /* __DALI_TOOLKIT_INTERNAL_NAVIGATION_BAR_H__ */