ladanyi@1442: // -*- C++ -*- //
ladanyi@1442: 
ladanyi@1442: #ifndef MAIN_WIN_H
ladanyi@1442: #define MAIN_WIN_H
ladanyi@1442: 
ladanyi@1606: #include "all_include.h"
ladanyi@1606: #include "mapstorage.h"
ladanyi@1606: #include "map_win.h"
ladanyi@1606: #include "new_map_win.h"
ladanyi@1606: #include "graph_displayer_canvas.h"
ladanyi@1442: #include <libgnomecanvasmm.h>
ladanyi@1442: #include <libgnomecanvasmm/polygon.h>
ladanyi@1442: 
ladanyi@1442: ///This class is the main window of GUI.
ladanyi@1442: ///It has menus, but the main part of it is the canvas.
ladanyi@1442: class MainWin : public Gtk::Window
ladanyi@1442: {
ladanyi@1442: public:
ladanyi@1442:   ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
ladanyi@1442:   ///\param title is the title of the window
ladanyi@1650:   MainWin();
ladanyi@1606: 
ladanyi@1606:   MapStorage mapstorage;
ladanyi@1442: 
ladanyi@1616:   void readFile(const std::string &);
ladanyi@1616: 
ladanyi@1442: protected:
hegyi@1733:   ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
hegyi@1733:   NewMapWin newmapwin;
hegyi@1733: 
ladanyi@1442:   ///Window of map-showing setup. Its type is \ref MapWin
ladanyi@1442:   MapWin mapwin;
ladanyi@1442: 
ladanyi@1442:   ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@1442:   GraphDisplayerCanvas gd_canvas;
ladanyi@1442: 
ladanyi@1442:   ///ActionGroup for menu
ladanyi@1442:   Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@1442: 
ladanyi@1442:   ///UIManager for menu
ladanyi@1442:   Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@1442: 
ladanyi@1442:   ///Container
ladanyi@1442:   Gtk::VBox vbox;
ladanyi@1442: 
hegyi@1601:   ///Tooltips
hegyi@1601:   Gtk::Tooltips tooltips;
hegyi@1601: 
ladanyi@1442:   ///Callback for 'FileNew' action.
ladanyi@1442:   virtual void newFile();
ladanyi@1442:   ///Callback for 'FileOpen' action.
ladanyi@1442:   virtual void openFile();
ladanyi@1442:   ///Callback for 'FileSave' action.
ladanyi@1442:   virtual void saveFile();
ladanyi@1442:   ///Callback for 'FileSaveAs' action.
ladanyi@1442:   virtual void saveFileAs();
ladanyi@1606:   ///Callback for 'Close' action.
ladanyi@1606:   virtual void close();
ladanyi@1442: };
ladanyi@1442: 
ladanyi@1442: #endif //MAIN_WIN_H