[1412] | 1 | // -*- C++ -*- //
|
---|
| 2 |
|
---|
| 3 | #ifndef MAIN_WIN_H
|
---|
| 4 | #define MAIN_WIN_H
|
---|
| 5 |
|
---|
| 6 | #include <all_include.h>
|
---|
| 7 | #include <mapstorage.h>
|
---|
| 8 | #include <map_win.h>
|
---|
| 9 | #include <libgnomecanvasmm.h>
|
---|
| 10 | #include <libgnomecanvasmm/polygon.h>
|
---|
| 11 |
|
---|
[1440] | 12 | ///This class is the main window of GUI.
|
---|
| 13 | ///It has menus, but the main part of it is the canvas.
|
---|
[1412] | 14 | class MainWin : public Gtk::Window
|
---|
| 15 | {
|
---|
| 16 | public:
|
---|
[1440] | 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
|
---|
[1412] | 22 | MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &);
|
---|
| 23 |
|
---|
| 24 | protected:
|
---|
[1440] | 25 | ///Window of map-showing setup. Its type is \ref MapWin
|
---|
[1412] | 26 | MapWin mapwin;
|
---|
| 27 |
|
---|
[1440] | 28 | ///The graph will be drawn on this \ref GraphDisplayerCanvas
|
---|
[1412] | 29 | GraphDisplayerCanvas gd_canvas;
|
---|
| 30 |
|
---|
[1440] | 31 | ///ActionGroup for menu
|
---|
[1412] | 32 | Glib::RefPtr<Gtk::ActionGroup> ag;
|
---|
| 33 |
|
---|
[1440] | 34 | ///UIManager for menu
|
---|
[1412] | 35 | Glib::RefPtr<Gtk::UIManager> uim;
|
---|
| 36 |
|
---|
[1440] | 37 | ///Container
|
---|
[1412] | 38 | Gtk::VBox vbox;
|
---|
| 39 |
|
---|
[1440] | 40 | ///This function makes map-setup window popped up.
|
---|
[1412] | 41 | virtual void showMaps();
|
---|
[1441] | 42 | ///Callback for 'FileNew' action.
|
---|
| 43 | virtual void newFile();
|
---|
| 44 | ///Callback for 'FileOpen' action.
|
---|
| 45 | virtual void openFile();
|
---|
| 46 | ///Callback for 'FileSave' action.
|
---|
| 47 | virtual void saveFile();
|
---|
| 48 | ///Callback for 'FileSaveAs' action.
|
---|
| 49 | virtual void saveFileAs();
|
---|
| 50 | ///Callback for 'Quit' action.
|
---|
[1412] | 51 | virtual void quit();
|
---|
| 52 | };
|
---|
| 53 |
|
---|
| 54 | #endif //MAIN_WIN_H
|
---|