Initial removal of Text features
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / public-api / controls / navigation-frame / navigation-bar-style.h
1 #ifndef __DALI_TOOLKIT_NAVIGATION_BAR_STYLE_H__
2 #define __DALI_TOOLKIT_NAVIGATION_BAR_STYLE_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 namespace Dali
22 {
23
24 namespace Toolkit
25 {
26
27   /**
28    * The basic information of a navigation bar style: background and size.
29    * All the style metrics for tool bar and title bar are in pixels referring to a bar width of 'referenceWidth'.
30    * To fit the bars into different window size, the NavigationControl scales the bar by the ratio of windowWidth and referenceWidth.
31    */
32   struct BasicNaviBarStyle
33   {
34     /**
35      * Constructor
36      */
37     BasicNaviBarStyle ( Actor background,
38                     int referenceWidth,
39                     int height )
40      : background( background ),
41        referenceWidth( referenceWidth ),
42        height( height )
43      {
44      }
45
46     Actor background;              ///< bar background
47     int   referenceWidth;          ///< the width of the bar, this value also used to calculate the scale to fit the bar into windows of different sizes
48     int   height;                  ///< the height of the bar
49   };
50
51   /**
52    * The tool bar locates in the bottom of the frame where other controls (such as PushButton ) could be placed.
53    * NaviToolBarStyle provides the tool bar layout style, which customize the position and size of the controls placed on it.
54    * Controls could be added into three groups: HorizontalLeft, HorizontalCenter or HorizontalRight.
55    * The left and right groups can only have one control maximum each, while the central group can have multiple controls.
56    * It is fine to have no control in every group.
57    *               +----------------------------------------+
58    *               | +-+        +-----+  +-----+        +-+ |
59    *               | +-+        +-----+  +-----+        +-+ |
60    *               +----------------------------------------+
61    */
62   struct NaviToolBarStyle : BasicNaviBarStyle
63   {
64     /**
65      * Constructor
66      */
67     NaviToolBarStyle ( Actor background,
68                        int referenceWidth,
69                        int height,
70                        int centralMaximum,
71                        int centralMinimum,
72                        int centralButtonHeight,
73                        int centralButtonGap,
74                        int sideButtonSize,
75                        int hotizontalMargin )
76     : BasicNaviBarStyle( background, referenceWidth, height),
77       centralMaximum( centralMaximum ), centralMinimum( centralMinimum ),
78       centralButtonHeight( centralButtonHeight ), centralButtonGap( centralButtonGap ),
79       sideButtonSize( sideButtonSize ), hotizontalMargin( hotizontalMargin )
80     {
81     }
82
83     int   centralMaximum;       ///< the maximum width of central button
84     int   centralMinimum;       ///< the minimum width of central button
85     int   centralButtonHeight;  ///< the height of the central button
86     int   centralButtonGap;     ///< the gap width between central buttons
87     int   sideButtonSize;       ///< the size of side buttons in the left and right groups: sideButtonSize*sideButtonSize
88     int   hotizontalMargin;     ///< the horizontal margin width
89   };
90
91   /**
92    * The title bar locates in the top of the frame where title, subtitle, title icon and other controls could be placed.
93    * NaviTitleBarStyle provides the title bar layout style,
94    * which customize the position and size of the components placed on it and the text style of the titles.
95    * The title bar contains two groups: the left group includes title icon, title and subtitle (subtitle and title icon are not must);
96    * while the right group can have multiple controls placed on, and it is also fine to have no control on it.
97    *               +----------------------------------------+
98    *               | +-+ Title                   +-+  +-+   |
99    *               | +-+ Subtitle                +-+  +-+   |
100    *               +----------------------------------------+
101    */
102   struct NaviTitleBarStyle : BasicNaviBarStyle
103   {
104     /**
105      * Constructor
106      */
107     NaviTitleBarStyle( Actor background,
108                        int referenceWidth,
109                        int height,
110                        int titleHeightWithoutSubtitle,
111                        int titleHeightWithSubtitle,
112                        int subtitleHeight,
113                        int titleLeftMargin,
114                        int titleBottomMargin,
115                        int titleIconSize,
116                        int buttonSize,
117                        int buttonRightMargin,
118                        int buttonBottomMargin,
119                        int gapBetweenButtons )
120     : BasicNaviBarStyle( background, referenceWidth, height),
121       titleHeightWithoutSubtitle( titleHeightWithoutSubtitle ),
122       titleHeightWithSubtitle( titleHeightWithSubtitle ), subtitleHeight( subtitleHeight ),
123       titleLeftMargin( titleLeftMargin ), titleBottomMargin( titleBottomMargin ),
124       titleIconSize( titleIconSize ), buttonSize( buttonSize ),
125       buttonRightMargin( buttonRightMargin ), buttonBottomMargin( buttonBottomMargin ),
126       gapBetweenButtons( gapBetweenButtons )
127     {
128     }
129
130     int   titleHeightWithoutSubtitle;       ///< the height of the title when no subtitle exists
131     int   titleHeightWithSubtitle;          ///< the height of the title when there is subtitle below
132     int   subtitleHeight;                   ///< the height of the subtitle
133     int   titleLeftMargin;                  ///< the Margin between title and the left edge of the bar
134     int   titleBottomMargin;                ///< the Margin between title and the bottom edge of the bar
135     int   titleIconSize;                    ///< the size of the title icon: titleIconSize*titleIconSize
136     int   buttonSize;                       ///< the size of the buttons in the right group: buttonSize*buttonSize
137     int   buttonRightMargin;                ///< the Margin between the button and the right edge of the bar
138     int   buttonBottomMargin;               ///< the Margin between the button and the bottom edge of the bar
139     int   gapBetweenButtons;                ///< the gap width between buttons
140   };
141
142 } // namespace Toolkit
143 } // namespace Dali
144
145
146 #endif /* __DALI_TOOLKIT_NAVIGATION_BAR_STYLE_H__ */