3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
11 #include <msp/gltk/hslider.h>
12 #include <msp/gltk/label.h>
13 #include <msp/gltk/panel.h>
14 #include <msp/gltk/toggle.h>
15 #include "libmarklin/route.h"
16 #include "libmarklin/train.h"
20 class TrainPanel: public Msp::GLtk::Panel
24 Marklin::Train &train;
25 Msp::GLtk::Label *lbl_addr;
26 Msp::GLtk::Label *lbl_name;
27 Msp::GLtk::HSlider *sld_speed;
28 Msp::GLtk::Label *lbl_speed;
29 Msp::GLtk::Label *lbl_route;
30 Msp::GLtk::Label *lbl_status;
31 Msp::GLtk::Toggle *tgl_forward;
32 std::map<unsigned, Msp::GLtk::Toggle *> tgl_funcs;
35 TrainPanel(Engineer &, const Msp::GLtk::Resources &, Marklin::Train &);
37 void speed_slider_changed(double);
38 void train_speed_changed(unsigned);
39 void loco_function_changed(unsigned, bool);
40 void train_route_changed(const Marklin::Route *);
41 void train_status_changed(const std::string &);
45 void forward_toggled(bool);
46 void func_toggled(bool, unsigned);