1 | // -*- C++ -*- // |
---|
2 | |
---|
3 | #ifndef MAPSELECTOR_H |
---|
4 | #define MAPSELECTOR_H |
---|
5 | |
---|
6 | class MapSelector; |
---|
7 | |
---|
8 | #include <all_include.h> |
---|
9 | #include <map_win.h> |
---|
10 | #include <libgnomecanvasmm.h> |
---|
11 | #include <libgnomecanvasmm/polygon.h> |
---|
12 | |
---|
13 | class MapSelector : public Gtk::HBox |
---|
14 | { |
---|
15 | protected: |
---|
16 | sigc::signal<void, std::string> signal_cbt; |
---|
17 | sigc::signal<void, bool> signal_newmapwin; |
---|
18 | |
---|
19 | bool def; |
---|
20 | |
---|
21 | bool itisedge; |
---|
22 | |
---|
23 | bool default_state; |
---|
24 | |
---|
25 | bool set_new_map; |
---|
26 | |
---|
27 | Gtk::ComboBoxText cbt; |
---|
28 | |
---|
29 | Gtk::Button * newbut, * defbut; |
---|
30 | |
---|
31 | Gtk::HBox hbox; |
---|
32 | |
---|
33 | Gtk::Label * label; |
---|
34 | |
---|
35 | public: |
---|
36 | |
---|
37 | MapSelector(std::vector<std::string>, std::string, std::string, bool, bool def=true); |
---|
38 | |
---|
39 | sigc::signal<void, std::string> signal_cbt_ch(); |
---|
40 | sigc::signal<void, bool> signal_newmapwin_needed(); |
---|
41 | |
---|
42 | void update_list( std::vector<std::string> ); |
---|
43 | |
---|
44 | ///If a radiobutton is clicked, this function determines |
---|
45 | ///which button was that and after that calls the |
---|
46 | ///appropriate function of the \ref GraphDisplayerCanvas |
---|
47 | ///to change the visible values of that attribute. |
---|
48 | virtual void comboChanged(); |
---|
49 | |
---|
50 | virtual void new_but_pressed(); |
---|
51 | |
---|
52 | virtual void reset(); |
---|
53 | |
---|
54 | Glib::ustring get_active_text(); |
---|
55 | void set_active_text(Glib::ustring); |
---|
56 | void set_active(int index){cbt.set_active(index);}; |
---|
57 | void clear(){cbt.clear();}; |
---|
58 | void append_text(Glib::ustring); |
---|
59 | }; |
---|
60 | #endif //MAPSELECTOR_H |
---|