4 XCSoar Glide Computer - http://www.xcsoar.org/
5 Copyright (C) 2000-2013 The XCSoar Project
6 A detailed list of copyright holders can be found in the file "AUTHORS".
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #ifndef XCSOAR_INFO_BOX_LOOK_HPP
25 #define XCSOAR_INFO_BOX_LOOK_HPP
27 #include "Screen/Pen.hpp"
28 #include "Screen/Brush.hpp"
29 #include "Util/Macros.hpp"
34 static const unsigned BORDER_WIDTH
= 1;
38 Pen border_pen
, selector_pen
;
39 Color background_color
, focused_background_color
, pressed_background_color
;
44 } title
, value
, comment
;
46 const Font
*small_font
;
48 const Font
*unit_font
;
49 Pen unit_fraction_pen
;
54 void Initialise(bool inverse
, bool use_colors
,
55 const Font
&value_font
,
56 const Font
&small_font
,
58 const Font
&unit_font
,
60 const Font
&title_font
);
62 Color
GetColor(int i
, Color default_color
) const {
65 else if (i
>= 1 && (unsigned)i
< ARRAY_SIZE(colors
))
71 Color
GetTitleColor(int i
) const {
72 return GetColor(i
, title
.fg_color
);
75 Color
GetValueColor(int i
) const {
76 return GetColor(i
, value
.fg_color
);
79 Color
GetCommentColor(int i
) const {
80 return GetColor(i
, comment
.fg_color
);