8 #include "all_include.h"
9 #include "graph_displayer_canvas.h"
10 #include "mapstorage.h"
11 #include "new_map_win.h"
12 #include <libgnomecanvasmm.h>
13 #include <libgnomecanvasmm/polygon.h>
15 ///This class is responsible for creating a window,
16 ///on which the visualization attributes can be
18 class MapWin : public Gtk::Window
21 class MapSelector : public Gtk::HBox
24 GraphDisplayerCanvas & gdc;
25 ///The \ref MapStorage in which the visualizable maps are stored
37 Gtk::ComboBoxText cbt;
39 Gtk::Button * newbut, * defbut;
51 MapSelector(GraphDisplayerCanvas &, MapStorage &, NewMapWin &, int, bool);
55 ///If a radiobutton is clicked, this function determines
56 ///which button was that and after that calls the
57 ///appropriate function of the \ref GraphDisplayerCanvas
58 ///to change the visible values of that attribute.
59 virtual void comboChanged();
61 virtual void new_but_pressed();
65 virtual void update(Node node);
66 virtual void update(Edge edge);
68 Glib::ustring get_active_text();
69 void set_active_text(Glib::ustring);
70 void append_text(Glib::ustring);
76 ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
77 ///It has to be known for this class, because
78 ///when a map assigned to a certain attribute
79 ///a function of the \ref GraphDisplayerCanvas will be called.
80 GraphDisplayerCanvas & gdc;
82 ///The \ref MapStorage in which the visualizable maps are stored
89 MapSelector ** e_combo_array, ** n_combo_array;
96 ///Constructor of MapWin creates the widgets shown in MapWin.
97 MapWin(const std::string& title, MapStorage &, GraphDisplayerCanvas &, NewMapWin &);
99 ///This function is created to set the appropriate maps on the newly created node
100 void updateNode(Graph::Node);
102 ///This function is created to set the appropriate maps on the newly created edge
103 void updateEdge(Graph::Edge);
105 ///This function inserts name of the new edgemap in the list in the combo box
106 void registerNewEdgeMap(std::string);
108 ///This function inserts name of the new nodemap in the list in the combo box
109 void registerNewNodeMap(std::string);
111 virtual bool closeIfEscapeIsPressed(GdkEventKey*);