]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/mainwindow.h
Complete rewrite of the engineer UI
[r2c2.git] / source / engineer / mainwindow.h
diff --git a/source/engineer/mainwindow.h b/source/engineer/mainwindow.h
new file mode 100644 (file)
index 0000000..fcdb803
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef MAINWINDOW_H_
+#define MAINWINDOW_H_
+
+#include <sigc++/trackable.h>
+#include <msp/gltk/indicator.h>
+#include <msp/gltk/label.h>
+#include <msp/gltk/panel.h>
+
+class Engineer;
+
+class MainWindow: public Msp::GLtk::Panel, public sigc::trackable
+{
+private:
+       Engineer &engineer;
+       Msp::GLtk::Indicator *ind_on;
+       Msp::GLtk::Indicator *ind_off;
+       Msp::GLtk::Indicator *ind_halt;
+       Msp::GLtk::Label *lbl_status;
+
+public:
+       MainWindow(Engineer &);
+
+       void set_status_text(const std::string &);
+private:
+       void on_clicked();
+       void off_clicked();
+       void halt_clicked();
+       void trains_clicked();
+       void quit_clicked();
+       void power_event(bool);
+       void halt_event(bool);
+};
+
+#endif