[1442] | 1 | // -*- C++ -*- // |
---|
| 2 | |
---|
| 3 | #ifndef MAP_WIN_H |
---|
| 4 | #define MAP_WIN_H |
---|
| 5 | |
---|
[1512] | 6 | class MapWin; |
---|
| 7 | |
---|
[1606] | 8 | #include "all_include.h" |
---|
| 9 | #include "graph_displayer_canvas.h" |
---|
| 10 | #include "mapstorage.h" |
---|
[1731] | 11 | #include "mapselector.h" |
---|
[1442] | 12 | #include <libgnomecanvasmm.h> |
---|
| 13 | #include <libgnomecanvasmm/polygon.h> |
---|
| 14 | |
---|
| 15 | ///This class is responsible for creating a window, |
---|
| 16 | ///on which the visualization attributes can be |
---|
| 17 | ///assigned to maps. |
---|
| 18 | class MapWin : public Gtk::Window |
---|
| 19 | { |
---|
| 20 | protected: |
---|
| 21 | ///The \ref GraphDisplayerCanvas on which the graph will be drawn. |
---|
| 22 | ///It has to be known for this class, because |
---|
| 23 | ///when a map assigned to a certain attribute |
---|
| 24 | ///a function of the \ref GraphDisplayerCanvas will be called. |
---|
| 25 | GraphDisplayerCanvas & gdc; |
---|
| 26 | |
---|
| 27 | ///The \ref MapStorage in which the visualizable maps are stored |
---|
| 28 | MapStorage & ms; |
---|
| 29 | |
---|
[1512] | 30 | Gtk::Table * table; |
---|
[1442] | 31 | |
---|
[1731] | 32 | MapSelector ** e_combo_array, ** n_combo_array; |
---|
[1442] | 33 | |
---|
[1446] | 34 | Gtk::Label * label; |
---|
[1442] | 35 | |
---|
[1512] | 36 | Gtk::VBox vbox; |
---|
| 37 | |
---|
[1442] | 38 | public: |
---|
| 39 | ///Constructor of MapWin creates the widgets shown in MapWin. |
---|
| 40 | MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &); |
---|
| 41 | |
---|
[1512] | 42 | ///This function is created to set the appropriate maps on the newly created node |
---|
[1524] | 43 | void updateNode(Graph::Node); |
---|
[1512] | 44 | |
---|
| 45 | ///This function is created to set the appropriate maps on the newly created edge |
---|
[1524] | 46 | void updateEdge(Graph::Edge); |
---|
[1512] | 47 | |
---|
[1586] | 48 | ///This function inserts name of the new edgemap in the list in the combo box |
---|
| 49 | void registerNewEdgeMap(std::string); |
---|
| 50 | |
---|
| 51 | ///This function inserts name of the new nodemap in the list in the combo box |
---|
| 52 | void registerNewNodeMap(std::string); |
---|
| 53 | |
---|
[1524] | 54 | virtual bool closeIfEscapeIsPressed(GdkEventKey*); |
---|
[1586] | 55 | |
---|
[1606] | 56 | void update(); |
---|
[1442] | 57 | }; |
---|
| 58 | |
---|
| 59 | #endif //MAP_WIN_H |
---|