ladanyi@1442: // -*- C++ -*- // ladanyi@1442: ladanyi@1442: #ifndef MAIN_WIN_H ladanyi@1442: #define MAIN_WIN_H ladanyi@1442: ladanyi@1442: #include ladanyi@1442: #include ladanyi@1442: #include hegyi@1468: #include ladanyi@1442: #include ladanyi@1442: #include 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@1442: ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas ladanyi@1442: ///\param cm stores the coordinates of the nodes of the graph ladanyi@1442: ///\param ms is the \ref MapStorage in which the different visualizable maps are stored ladanyi@1442: MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &); ladanyi@1442: ladanyi@1442: protected: ladanyi@1442: ///Window of map-showing setup. Its type is \ref MapWin ladanyi@1442: MapWin mapwin; ladanyi@1442: hegyi@1468: ///Window of editorial tools. Its type is \ref EditWin hegyi@1468: EditWin editwin; hegyi@1468: 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 ag; ladanyi@1442: ladanyi@1442: ///UIManager for menu ladanyi@1442: Glib::RefPtr uim; ladanyi@1442: ladanyi@1442: ///Container ladanyi@1442: Gtk::VBox vbox; ladanyi@1442: ladanyi@1442: ///This function makes map-setup window popped up. ladanyi@1442: virtual void showMaps(); hegyi@1468: ///This function makes editorial window popped up. hegyi@1468: virtual void showEditorials(); 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@1442: ///Callback for 'Quit' action. ladanyi@1442: virtual void quit(); ladanyi@1442: }; ladanyi@1442: ladanyi@1442: #endif //MAIN_WIN_H