[1412] | 1 | // -*- C++ -*- //
|
---|
| 2 |
|
---|
| 3 | #ifndef MAP_WIN_H
|
---|
| 4 | #define MAP_WIN_H
|
---|
| 5 |
|
---|
| 6 | #include <all_include.h>
|
---|
| 7 | #include <mapstorage.h>
|
---|
| 8 | #include <graph_displayer_canvas.h>
|
---|
| 9 | #include <libgnomecanvasmm.h>
|
---|
| 10 | #include <libgnomecanvasmm/polygon.h>
|
---|
| 11 |
|
---|
[1440] | 12 | ///This class is responsible for creating a window,
|
---|
| 13 | ///on which the visualization attributes can be
|
---|
| 14 | ///assigned to maps.
|
---|
[1412] | 15 | class MapWin : public Gtk::Window
|
---|
| 16 | {
|
---|
| 17 | protected:
|
---|
[1440] | 18 | ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
|
---|
| 19 | ///It has to be known for this class, because
|
---|
| 20 | ///when a map assigned to a certain attribute
|
---|
| 21 | ///a function of the \ref GraphDisplayerCanvas will be called.
|
---|
[1412] | 22 | GraphDisplayerCanvas & gdc;
|
---|
[1440] | 23 |
|
---|
| 24 | ///The \ref MapStorage in which the visualizable maps are stored
|
---|
[1412] | 25 | MapStorage & ms;
|
---|
| 26 |
|
---|
[1440] | 27 |
|
---|
[1412] | 28 | Gtk::HBox * radios;
|
---|
| 29 | Gtk::RadioButton ** rb_array;
|
---|
| 30 |
|
---|
| 31 | Gtk::VBox vbox_b, * vbox_r1, * vbox_r2;
|
---|
[1440] | 32 |
|
---|
| 33 | ///The notebook has different pages for each attribute.
|
---|
[1412] | 34 | Gtk::Notebook notebook;
|
---|
[1440] | 35 |
|
---|
[1412] | 36 | Gtk::Label * labels;
|
---|
| 37 |
|
---|
| 38 | public:
|
---|
[1440] | 39 | ///Constructor of MapWin creates the widgets shown in MapWin.
|
---|
[1412] | 40 | MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &);
|
---|
[1440] | 41 |
|
---|
| 42 | ///If a radiobutton is clicked, this function determines
|
---|
| 43 | ///which button was that and after that calls the
|
---|
| 44 | ///appropriate function of the \ref GraphDisplayerCanvas
|
---|
| 45 | ///to change the visible values of that attribute.
|
---|
[1412] | 46 | virtual void radio_click(int, int);
|
---|
| 47 | };
|
---|
| 48 |
|
---|
| 49 | #endif //MAP_WIN_H
|
---|