3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2008 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/train.h"
19 class TrainPanel: public Msp::GLtk::Panel
23 Marklin::Train &train;
24 Msp::GLtk::Label *lbl_addr;
25 Msp::GLtk::Label *lbl_name;
26 Msp::GLtk::HSlider *sld_speed;
27 Msp::GLtk::Label *lbl_speed;
28 Msp::GLtk::Label *lbl_status;
29 Msp::GLtk::Toggle *tgl_forward;
30 std::map<unsigned, Msp::GLtk::Toggle *> tgl_funcs;
33 TrainPanel(Engineer &, const Msp::GLtk::Resources &, Marklin::Train &);
35 void speed_slider_changed(double);
36 void loco_speed_changed(unsigned);
37 void loco_function_changed(unsigned, bool);
38 void train_status_changed(const std::string &);
40 void forward_toggled(bool);
41 void func_toggled(bool, unsigned);