]> git.tdb.fi Git - r2c2.git/blob - source/engineer/routerpanel.h
Complete rewrite of the engineer UI
[r2c2.git] / source / engineer / routerpanel.h
1 #ifndef ROUTERPANEL_H_
2 #define ROUTERPANEL_H_
3
4 #include <msp/gltk/dropdown.h>
5 #include <msp/gltk/label.h>
6 #include <msp/gltk/panel.h>
7 #include "libr2c2/train.h"
8
9 class Engineer;
10
11 class RouterPanel: public Msp::GLtk::Panel, public sigc::trackable
12 {
13 private:
14         Engineer &engineer;
15         R2C2::Train &train;
16         Msp::GLtk::Label *lbl_route;
17         Msp::GLtk::FunctionListData<const R2C2::Route *> routes;
18         Msp::GLtk::Dropdown *drp_routes;
19         sigc::connection pick_conn;
20         bool updating;
21
22 public:
23         RouterPanel(Engineer &, R2C2::Train &);
24
25 private:
26         void ai_event(R2C2::TrainAI &, const R2C2::TrainAI::Message &);
27         void update_route(const R2C2::Route *);
28         void route_selected(unsigned);
29         void goto_clicked();
30         void goto_pick_done(R2C2::Track *, unsigned);
31 };
32
33 #endif