ladanyi@1442: // -*- C++ -*- // ladanyi@1442: ladanyi@1442: #ifndef MAIN_WIN_H ladanyi@1442: #define MAIN_WIN_H ladanyi@1442: hegyi@1837: class MainWin; hegyi@1837: 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 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@1650: MainWin(); ladanyi@1606: ladanyi@1606: MapStorage mapstorage; ladanyi@1442: ladanyi@1616: void readFile(const std::string &); ladanyi@1616: ladanyi@1442: protected: hegyi@1837: MapWin * mapwin; hegyi@1838: bool mapwinexists; ladanyi@1442: ladanyi@1442: ///The graph will be drawn on this \ref GraphDisplayerCanvas hegyi@1837: 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: 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(); hegyi@1837: hegyi@1837: public: hegyi@1837: void propertyChange(bool, int, std::string); hegyi@1837: void popupNewMapWin(bool, int); hegyi@1837: hegyi@1837: std::string getActiveEdgeMap(int); hegyi@1837: std::string getActiveNodeMap(int); hegyi@1837: hegyi@1837: void registerNewEdgeMap(std::string); hegyi@1837: void registerNewNodeMap(std::string); hegyi@1837: hegyi@1838: void createMapWin(); hegyi@1838: void closeMapWin(); ladanyi@1442: }; ladanyi@1442: ladanyi@1442: #endif //MAIN_WIN_H