Driver/Volkslogger: eliminate class VLA_SYS
[xcsoar.git] / src / ProgressWindow.hpp
blobd2bfe9a1025590e4c5632a7755dced8180ef3f92
1 /*
2 Copyright_License {
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_SCREEN_PROGRESS_WINDOW_HXX
25 #define XCSOAR_SCREEN_PROGRESS_WINDOW_HXX
27 #include "Screen/ContainerWindow.hpp"
28 #include "Screen/TextWindow.hpp"
29 #include "Screen/ProgressBar.hpp"
30 #include "Screen/Bitmap.hpp"
31 #include "Screen/Brush.hpp"
32 #include "Gauge/LogoView.hpp"
34 /**
35 * The XCSoar splash screen with a progress bar.
37 class ProgressWindow : public ContainerWindow {
38 Color background_color;
39 Brush background_brush;
41 Bitmap bitmap_progress_border;
43 #ifndef USE_GDI
44 Font font;
45 #endif
47 LogoView logo;
49 TextWindow message;
51 ProgressBar progress_bar;
52 unsigned position;
54 unsigned text_height;
55 unsigned progress_border_height;
57 public:
58 explicit ProgressWindow(ContainerWindow &parent);
60 void SetMessage(const TCHAR *text);
62 void SetRange(unsigned min_value, unsigned max_value);
63 void SetStep(unsigned size);
64 void SetValue(unsigned value);
65 void Step();
67 protected:
68 virtual void OnResize(PixelSize new_size) override;
69 virtual void OnPaint(Canvas &canvas) override;
71 #ifdef USE_GDI
72 virtual const Brush *OnChildColor(Window &window,
73 Canvas &canvas) override;
74 #endif
77 #endif