1 | // -*- C++ -*- // |
---|
2 | |
---|
3 | #ifndef MAP_WIN_H |
---|
4 | #define MAP_WIN_H |
---|
5 | |
---|
6 | class MapWin; |
---|
7 | |
---|
8 | #include <all_include.h> |
---|
9 | #include <mapstorage.h> |
---|
10 | #include <graph_displayer_canvas.h> |
---|
11 | #include <libgnomecanvasmm.h> |
---|
12 | #include <libgnomecanvasmm/polygon.h> |
---|
13 | |
---|
14 | ///This class is responsible for creating a window, |
---|
15 | ///on which the visualization attributes can be |
---|
16 | ///assigned to maps. |
---|
17 | class MapWin : public Gtk::Window |
---|
18 | { |
---|
19 | protected: |
---|
20 | ///The \ref GraphDisplayerCanvas on which the graph will be drawn. |
---|
21 | ///It has to be known for this class, because |
---|
22 | ///when a map assigned to a certain attribute |
---|
23 | ///a function of the \ref GraphDisplayerCanvas will be called. |
---|
24 | GraphDisplayerCanvas & gdc; |
---|
25 | |
---|
26 | ///The \ref MapStorage in which the visualizable maps are stored |
---|
27 | MapStorage & ms; |
---|
28 | |
---|
29 | Gtk::Table * table; |
---|
30 | |
---|
31 | Gtk::Combo * e_combo_array, * n_combo_array; |
---|
32 | |
---|
33 | Gtk::Label * label; |
---|
34 | |
---|
35 | Gtk::VBox vbox; |
---|
36 | |
---|
37 | public: |
---|
38 | ///Constructor of MapWin creates the widgets shown in MapWin. |
---|
39 | MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &); |
---|
40 | |
---|
41 | ///If a radiobutton is clicked, this function determines |
---|
42 | ///which button was that and after that calls the |
---|
43 | ///appropriate function of the \ref GraphDisplayerCanvas |
---|
44 | ///to change the visible values of that attribute. |
---|
45 | virtual void e_combo_changed(int); |
---|
46 | ///If a radiobutton is clicked, this function determines |
---|
47 | ///which button was that and after that calls the |
---|
48 | ///appropriate function of the \ref GraphDisplayerCanvas |
---|
49 | ///to change the visible values of that attribute. |
---|
50 | virtual void n_combo_changed(int); |
---|
51 | |
---|
52 | ///This function is created to set the appropriate maps on the newly created node |
---|
53 | void update_node(Graph::Node); |
---|
54 | |
---|
55 | ///This function is created to set the appropriate maps on the newly created edge |
---|
56 | void update_edge(Graph::Edge); |
---|
57 | |
---|
58 | virtual bool close_if_escape_is_pressed(GdkEventKey*); |
---|
59 | }; |
---|
60 | |
---|
61 | #endif //MAP_WIN_H |
---|