Rev | Line | |
---|
[1442] | 1 | // -*- C++ -*- // |
---|
| 2 | |
---|
| 3 | #ifndef MAIN_WIN_H |
---|
| 4 | #define MAIN_WIN_H |
---|
| 5 | |
---|
[1606] | 6 | #include "all_include.h" |
---|
| 7 | #include "mapstorage.h" |
---|
| 8 | #include "map_win.h" |
---|
| 9 | #include "new_map_win.h" |
---|
| 10 | #include "graph_displayer_canvas.h" |
---|
[1442] | 11 | #include <libgnomecanvasmm.h> |
---|
| 12 | #include <libgnomecanvasmm/polygon.h> |
---|
| 13 | |
---|
| 14 | ///This class is the main window of GUI. |
---|
| 15 | ///It has menus, but the main part of it is the canvas. |
---|
| 16 | class MainWin : public Gtk::Window |
---|
| 17 | { |
---|
| 18 | public: |
---|
| 19 | ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. |
---|
| 20 | ///\param title is the title of the window |
---|
[1650] | 21 | MainWin(); |
---|
[1606] | 22 | |
---|
| 23 | MapStorage mapstorage; |
---|
[1442] | 24 | |
---|
[1616] | 25 | void readFile(const std::string &); |
---|
| 26 | |
---|
[1442] | 27 | protected: |
---|
[1733] | 28 | ///We need to store newmapwin, to be able to set the appropriate values for properties of new map. |
---|
| 29 | NewMapWin newmapwin; |
---|
| 30 | |
---|
[1442] | 31 | ///Window of map-showing setup. Its type is \ref MapWin |
---|
| 32 | MapWin mapwin; |
---|
| 33 | |
---|
| 34 | ///The graph will be drawn on this \ref GraphDisplayerCanvas |
---|
| 35 | GraphDisplayerCanvas gd_canvas; |
---|
| 36 | |
---|
| 37 | ///ActionGroup for menu |
---|
| 38 | Glib::RefPtr<Gtk::ActionGroup> ag; |
---|
| 39 | |
---|
| 40 | ///UIManager for menu |
---|
| 41 | Glib::RefPtr<Gtk::UIManager> uim; |
---|
| 42 | |
---|
| 43 | ///Container |
---|
| 44 | Gtk::VBox vbox; |
---|
| 45 | |
---|
[1601] | 46 | ///Tooltips |
---|
| 47 | Gtk::Tooltips tooltips; |
---|
| 48 | |
---|
[1442] | 49 | ///Callback for 'FileNew' action. |
---|
| 50 | virtual void newFile(); |
---|
| 51 | ///Callback for 'FileOpen' action. |
---|
| 52 | virtual void openFile(); |
---|
| 53 | ///Callback for 'FileSave' action. |
---|
| 54 | virtual void saveFile(); |
---|
| 55 | ///Callback for 'FileSaveAs' action. |
---|
| 56 | virtual void saveFileAs(); |
---|
[1606] | 57 | ///Callback for 'Close' action. |
---|
| 58 | virtual void close(); |
---|
[1442] | 59 | }; |
---|
| 60 | |
---|
| 61 | #endif //MAIN_WIN_H |
---|
Note: See
TracBrowser
for help on using the repository browser.