4 #include <gtkmm/checkbutton.h>
5 #include <gtkmm/combobox.h>
6 #include <gtkmm/expander.h>
7 #include <gtkmm/label.h>
8 #include <gtkmm/scale.h>
9 #include "network/client.h"
10 #include "network/train.h"
14 class TrainPanel: public Gtk::Expander
17 struct RouteRecord: public Gtk::TreeModelColumnRecord
19 Gtk::TreeModelColumn<Glib::ustring> name;
26 R2C2::NetTrain &train;
27 Gtk::Scale *scl_speed;
28 Gtk::Label *lbl_status;
29 Gtk::CheckButton *chk_reverse;
30 RouteRecord route_columns;
31 Gtk::ComboBox *cmb_route;
32 std::map<unsigned, Gtk::CheckButton *> chk_funcs;
35 TrainPanel(Remote &, R2C2::Client &, R2C2::NetTrain &);
37 void name_changed(const std::string &);
38 void status_changed(const std::string &);
39 void control_changed(const std::string &, float);
40 void function_changed(unsigned, bool);
41 void route_changed(const std::string &);
42 void ui_speed_changed();
43 void ui_reverse_changed();
44 void ui_function_changed(unsigned);
45 void ui_route_changed();