1 #ifndef USERINTERFACE_H_
2 #define USERINTERFACE_H_
4 #include <msp/gltk/resources.h>
5 #include <msp/gltk/root.h>
6 #include "libr2c2/driver.h"
7 #include "libr2c2/train.h"
8 #include "libr2c2/zone.h"
9 #include "mainwindow.h"
16 class Loader: public Msp::DataFile::ObjectLoader<UserInterface>
19 Loader(UserInterface &);
28 void traindialog(unsigned);
33 Msp::GLtk::Resources resources;
35 Msp::GLtk::Arrangement *root_arrangement;
38 std::set<DynamicDialog *> dyn_dialogs;
41 Msp::Time::TimeStamp status_timeout;
44 UserInterface(Engineer &, Msp::Graphics::Window &, Msp::Input::Keyboard &, Msp::Input::Mouse &);
47 const Msp::GLtk::Resources &get_resources() const { return resources; }
49 void set_status(const std::string &);
50 void add_dynamic_dialog(DynamicDialog &);
51 void remove_dynamic_dialog(DynamicDialog &);
53 void show_train(R2C2::Train &);
54 void show_zone(R2C2::Zone &);
56 void locomotive_detected(const R2C2::Driver::DetectedLocomotive &);
57 void import_finished(int);
63 void save_state(const std::string &) const;