Replace TextView with TextLabel
[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 // INTERNAL INCLUDES
22 #include <dali-toolkit/public-api/controls/navigation-frame/page.h>
23 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
24 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
25 #include <dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.h>
26 #include <dali-toolkit/internal/controls/navigation-frame/navigation-bar.h>
27
28 namespace Dali
29 {
30
31 namespace Toolkit
32 {
33
34 namespace Internal
35 {
36
37 /**
38  * The title bar locates in the top of the frame where title, subtitle, title icon and other controls could be placed.
39  * The title bar contains two groups: the left group includes title icon, title and subtitle (subtitle and title icon are not must);
40  * while the right group can have multiple controls placed on, and it is also fine to have no control on it.
41  * If the current NavigationOtem provides no control for the bar at all and also has not set a title, the bar is hidden.
42  *               +----------------------------------------+
43  *               | +-+ Title                   +-+  +-+   |
44  *               | +-+ Subtitle                +-+  +-+   |
45  *               +----------------------------------------+
46  */
47 class NavigationTitleBar : public NavigationBar
48 {
49 public:
50
51   NavigationTitleBar(NavigationControl& naviControl,
52                      Toolkit::NaviTitleBarStyle titleBarStylePortrait,
53                      Toolkit::NaviTitleBarStyle titleBarStyleLandscape );
54
55 protected:
56
57   /**
58    * @copydoc Toolkit::Internal::NavigationBar::Update
59    */
60   void Update( Toolkit::Page page );
61
62   /**
63    * @copydoc Toolkit::Internal::NavigationBar::OrientationUpdate
64    */
65   void OrientationUpdate( bool isPortrait );
66
67 private:
68   /**
69    * Set the fixed width and height to the cells of the layout
70    * These sizes need to be updated when the orientation is changing.
71    */
72   void SetFixedSizes();
73
74 private:
75
76   Toolkit::NaviTitleBarStyle        mStylePortrait;
77   Toolkit::NaviTitleBarStyle        mStyleLandscape;
78   const Toolkit::NaviTitleBarStyle* mCurrentStyle;
79
80   Toolkit::TableView mButtonLayout;
81   Toolkit::TableView mTitleLayout;
82   Toolkit::TableView mTitleIconLayout;
83
84   Toolkit::TextLabel  mTitle;
85   Toolkit::TextLabel  mSubTitle;
86
87 };
88
89 } // namespace Internal
90
91 } // namespace Toolkit
92
93 } // namespace Dali
94
95
96 #endif /* __DALI_TOOLKIT_INTERNAL_NAVIGATION_TITLE_BAR_H__ */