]> git.tdb.fi Git - r2c2.git/blob - source/designer/zonebar.h
Don't crash if a train has no router
[r2c2.git] / source / designer / zonebar.h
1 #ifndef ZONEBAR_H_
2 #define ZONEBAR_H_
3
4 #include <msp/gltk/dropdown.h>
5 #include "toolbar.h"
6
7 class Designer;
8
9 class Zonebar: public Toolbar, public sigc::trackable
10 {
11 private:
12         Designer &designer;
13         Msp::GLtk::BasicListData<std::string> groups;
14         Msp::GLtk::Dropdown *drp_groups;
15         Msp::GLtk::FunctionListData<R2C2::Zone *> zones;
16         Msp::GLtk::Dropdown *drp_numbers;
17
18 public:
19         Zonebar(Designer &);
20
21 private:
22         void track_chain_added(R2C2::TrackChain &);
23         void track_chain_removed(R2C2::TrackChain &);
24         void zone_renamed(R2C2::Zone &, const std::string &);
25         void group_selected(unsigned);
26         void number_selected(unsigned);
27         void delete_zone_clicked();
28 };
29
30 #endif