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