1 #ifndef DEPARTURESDIALOG_H_
2 #define DEPARTURESDIALOG_H_
4 #include <msp/gltk/dropdown.h>
5 #include <msp/gltk/label.h>
6 #include "libr2c2/departures.h"
7 #include "dynamicdialog.h"
11 class DeparturesDialog: public DynamicDialog
14 class StateLoader: public Msp::DataFile::DerivedObjectLoader<DeparturesDialog, DynamicDialog::StateLoader>
17 StateLoader(DeparturesDialog &);
20 void group(const std::string &);
26 const R2C2::Departures::Departure *departure;
27 Msp::GLtk::Label *lbl_time;
28 Msp::GLtk::Label *lbl_train;
32 void set_departure(const R2C2::Departures::Departure *);
35 const R2C2::Layout &layout;
36 Msp::GLtk::Dropdown *drp_groups;
37 Msp::GLtk::Label *lbl_title;
38 Msp::GLtk::BasicListData<std::string> groups;
39 Msp::GLtk::Panel *pnl_departures;
40 R2C2::Departures *departures;
41 std::vector<Row> rows;
44 DeparturesDialog(Engineer &, const std::string & = std::string());
46 void set_group(const std::string &);
49 void group_selected(unsigned);
53 virtual bool save_state(Msp::DataFile::Statement &) const;