]> git.tdb.fi Git - r2c2.git/blobdiff - source/engineer/trainproperties.h
Further adjustments to changes in GLtk
[r2c2.git] / source / engineer / trainproperties.h
index de0d8a8ff592ebf227f1c3f6f002c5e096d88edd..8cd0b2f9c3d7e3d080e596cb13e3dda0c2fcae4d 100644 (file)
@@ -1,16 +1,35 @@
 #ifndef TRAINPROPERTIES_H_
 #define TRAINPROPERTIES_H_
 
-#include <msp/gltk/panel.h>
+#include <msp/gltk/dropdown.h>
+#include <msp/gltk/entry.h>
+#include <libr2c2/train.h>
+#include "dialog.h"
 
-class TrainProperties: public Msp::GLtk::Panel
+class Engineer;
+
+class TrainProperties: public Dialog
 {
-public:
-       TrainProperties(Msp::GLtk::Resources &, Train &);
 private:
-       Train &train;
-       Msp::GLtk::Entry *ent_id;
+       Engineer &engineer;
+       R2C2::Train *train;
+       Msp::GLtk::Entry *ent_addr;
+       Msp::GLtk::Dropdown *drp_protocol;
+       Msp::GLtk::Dropdown *drp_type;
        Msp::GLtk::Entry *ent_name;
+       Msp::GLtk::Dropdown *drp_priority;
+       Msp::GLtk::List *lst_vehicles;
+       Msp::GLtk::Dropdown *drp_new_vehicle;
+       std::vector<const R2C2::VehicleType *> add_vehicles;
+       std::set<unsigned> rem_vehicles;
+
+public:
+       TrainProperties(Engineer &, R2C2::Train *);
+private:
+       virtual void on_ok_clicked();
+       void new_vehicle_selected(unsigned, const std::string &);
+       void remove_vehicle_clicked();
+       const R2C2::VehicleType &get_vehicle_type(unsigned, bool);
 };
 
 #endif