Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / navigation-frame / navigation-title-bar.h
1 #ifndef __DALI_TOOLKIT_INTERNAL_NAVIGATION_TITLE_BAR_H__
2 #define __DALI_TOOLKIT_INTERNAL_NAVIGATION_TITLE_BAR_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
22 #include <dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.h>
23 #include <dali-toolkit/internal/controls/navigation-frame/navigation-bar.h>
24 #include <dali-toolkit/public-api/controls/navigation-frame/page.h>
25
26 namespace Dali
27 {
28
29 namespace Toolkit
30 {
31
32 namespace Internal
33 {
34
35 /**
36  * The title bar locates in the top of the frame where title, subtitle, title icon and other controls could be placed.
37  * The title bar contains two groups: the left group includes title icon, title and subtitle (subtitle and title icon are not must);
38  * while the right group can have multiple controls placed on, and it is also fine to have no control on it.
39  * If the current NavigationOtem provides no control for the bar at all and also has not set a title, the bar is hidden.
40  *               +----------------------------------------+
41  *               | +-+ Title                   +-+  +-+   |
42  *               | +-+ Subtitle                +-+  +-+   |
43  *               +----------------------------------------+
44  */
45 class NavigationTitleBar : public NavigationBar
46 {
47 public:
48
49   NavigationTitleBar(NavigationControl& naviControl,
50                      Toolkit::NaviTitleBarStyle titleBarStylePortrait,
51                      Toolkit::NaviTitleBarStyle titleBarStyleLandscape );
52
53 protected:
54
55   /**
56    * @copydoc Toolkit::Internal::NavigationBar::Update
57    */
58   void Update( Toolkit::Page page );
59
60   /**
61    * @copydoc Toolkit::Internal::NavigationBar::OrientationUpdate
62    */
63   void OrientationUpdate( bool isPortrait );
64
65 private:
66   /**
67    * Set the fixed width and height to the cells of the layout
68    * These sizes need to be updated when the orientation is changing.
69    */
70   void SetFixedSizes();
71
72 private:
73
74   Toolkit::NaviTitleBarStyle        mStylePortrait;
75   Toolkit::NaviTitleBarStyle        mStyleLandscape;
76   const Toolkit::NaviTitleBarStyle* mCurrentStyle;
77
78   Toolkit::TableView mButtonLayout;
79   Toolkit::TableView mTitleLayout;
80   Toolkit::TableView mTitleIconLayout;
81
82 };
83
84 } // namespace Internal
85
86 } // namespace Toolkit
87
88 } // namespace Dali
89
90
91 #endif /* __DALI_TOOLKIT_INTERNAL_NAVIGATION_TITLE_BAR_H__ */