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