]> git.tdb.fi Git - r2c2.git/blob - source/engineer/newtraindialog.h
Reflect the current state of functions in a newly opened train dialog
[r2c2.git] / source / engineer / newtraindialog.h
1 #ifndef NEWTRAINDIALOG_H_
2 #define NEWTRAINDIALOG_H_
3
4 #include <msp/gltk/dialog.h>
5 #include <msp/gltk/dropdown.h>
6 #include <msp/gltk/entry.h>
7 #include <msp/gltk/listdata.h>
8 #include "libr2c2/catalogue.h"
9 #include "libr2c2/driver.h"
10
11 class Engineer;
12
13 class NewTrainDialog: public Msp::GLtk::Dialog
14 {
15 private:
16         Engineer &engineer;
17         Msp::GLtk::BasicListData<std::string> protocols;
18         Msp::GLtk::Dropdown *drp_protocol;
19         Msp::GLtk::Entry *ent_address;
20         Msp::GLtk::Entry *ent_name;
21         Msp::GLtk::FunctionListData<const R2C2::VehicleType *> loco_types;
22         Msp::GLtk::Dropdown *drp_loco_type;
23
24 public:
25         NewTrainDialog(Engineer &);
26
27         void prefill(const R2C2::Driver::DetectedLocomotive &);
28
29 private:
30         virtual void on_response(int);
31 };
32
33 #endif