ladanyi@1412: // -*- C++ -*- // ladanyi@1412: ladanyi@1412: #ifndef MAIN_WIN_H ladanyi@1412: #define MAIN_WIN_H ladanyi@1412: ladanyi@1412: #include ladanyi@1412: #include ladanyi@1412: #include ladanyi@1412: #include ladanyi@1412: #include ladanyi@1412: hegyi@1440: ///This class is the main window of GUI. hegyi@1440: ///It has menus, but the main part of it is the canvas. ladanyi@1412: class MainWin : public Gtk::Window ladanyi@1412: { ladanyi@1412: public: hegyi@1440: ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. hegyi@1440: ///\param title is the title of the window hegyi@1440: ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas hegyi@1440: ///\param cm stores the coordinates of the nodes of the graph hegyi@1440: ///\param ms is the \ref MapStorage in which the different visualizable maps are stored ladanyi@1412: MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &); ladanyi@1412: ladanyi@1412: protected: hegyi@1440: ///Window of map-showing setup. Its type is \ref MapWin ladanyi@1412: MapWin mapwin; ladanyi@1412: hegyi@1440: ///The graph will be drawn on this \ref GraphDisplayerCanvas ladanyi@1412: GraphDisplayerCanvas gd_canvas; ladanyi@1412: hegyi@1440: ///ActionGroup for menu ladanyi@1412: Glib::RefPtr ag; ladanyi@1412: hegyi@1440: ///UIManager for menu ladanyi@1412: Glib::RefPtr uim; ladanyi@1412: hegyi@1440: ///Container ladanyi@1412: Gtk::VBox vbox; ladanyi@1412: hegyi@1440: ///This function makes map-setup window popped up. ladanyi@1412: virtual void showMaps(); ladanyi@1441: ///Callback for 'FileNew' action. ladanyi@1441: virtual void newFile(); ladanyi@1441: ///Callback for 'FileOpen' action. ladanyi@1441: virtual void openFile(); ladanyi@1441: ///Callback for 'FileSave' action. ladanyi@1441: virtual void saveFile(); ladanyi@1441: ///Callback for 'FileSaveAs' action. ladanyi@1441: virtual void saveFileAs(); ladanyi@1441: ///Callback for 'Quit' action. ladanyi@1412: virtual void quit(); ladanyi@1412: }; ladanyi@1412: ladanyi@1412: #endif //MAIN_WIN_H