7 #include <mapstorage.h> |
7 #include <mapstorage.h> |
8 #include <map_win.h> |
8 #include <map_win.h> |
9 #include <libgnomecanvasmm.h> |
9 #include <libgnomecanvasmm.h> |
10 #include <libgnomecanvasmm/polygon.h> |
10 #include <libgnomecanvasmm/polygon.h> |
11 |
11 |
|
12 ///This class is the main window of GUI. |
|
13 ///It has menus, but the main part of it is the canvas. |
12 class MainWin : public Gtk::Window |
14 class MainWin : public Gtk::Window |
13 { |
15 { |
14 public: |
16 public: |
|
17 ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. |
|
18 ///\param title is the title of the window |
|
19 ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas |
|
20 ///\param cm stores the coordinates of the nodes of the graph |
|
21 ///\param ms is the \ref MapStorage in which the different visualizable maps are stored |
15 MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &); |
22 MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &); |
16 |
23 |
17 protected: |
24 protected: |
18 //Window of map-showing setup |
25 ///Window of map-showing setup. Its type is \ref MapWin |
19 MapWin mapwin; |
26 MapWin mapwin; |
20 |
27 |
21 //Member widgets: |
28 ///The graph will be drawn on this \ref GraphDisplayerCanvas |
22 GraphDisplayerCanvas gd_canvas; |
29 GraphDisplayerCanvas gd_canvas; |
23 |
30 |
24 //ActionGroup for menu |
31 ///ActionGroup for menu |
25 Glib::RefPtr<Gtk::ActionGroup> ag; |
32 Glib::RefPtr<Gtk::ActionGroup> ag; |
26 |
33 |
27 //UIManager for menu |
34 ///UIManager for menu |
28 Glib::RefPtr<Gtk::UIManager> uim; |
35 Glib::RefPtr<Gtk::UIManager> uim; |
29 |
36 |
30 //Container |
37 ///Container |
31 Gtk::VBox vbox; |
38 Gtk::VBox vbox; |
32 |
39 |
33 //Pops up map-setup window |
40 ///This function makes map-setup window popped up. |
34 virtual void showMaps(); |
41 virtual void showMaps(); |
35 |
42 |
36 //Exit |
43 ///Exit |
37 virtual void quit(); |
44 virtual void quit(); |
38 |
45 |
39 //Refit screen |
46 ///Refit screen to be able to show the whole graph. |
40 virtual void rezoom(); |
47 virtual void rezoom(); |
41 |
48 |
42 }; |
49 }; |
43 |
50 |
44 #endif //MAIN_WIN_H |
51 #endif //MAIN_WIN_H |