]> git.tdb.fi Git - r2c2.git/blob - source/engineer/mainwindow.h
Complete rewrite of the engineer UI
[r2c2.git] / source / engineer / mainwindow.h
1 #ifndef MAINWINDOW_H_
2 #define MAINWINDOW_H_
3
4 #include <sigc++/trackable.h>
5 #include <msp/gltk/indicator.h>
6 #include <msp/gltk/label.h>
7 #include <msp/gltk/panel.h>
8
9 class Engineer;
10
11 class MainWindow: public Msp::GLtk::Panel, public sigc::trackable
12 {
13 private:
14         Engineer &engineer;
15         Msp::GLtk::Indicator *ind_on;
16         Msp::GLtk::Indicator *ind_off;
17         Msp::GLtk::Indicator *ind_halt;
18         Msp::GLtk::Label *lbl_status;
19
20 public:
21         MainWindow(Engineer &);
22
23         void set_status_text(const std::string &);
24 private:
25         void on_clicked();
26         void off_clicked();
27         void halt_clicked();
28         void trains_clicked();
29         void quit_clicked();
30         void power_event(bool);
31         void halt_event(bool);
32 };
33
34 #endif