// -*- C++ -*- // #ifndef MAIN_WIN_H #define MAIN_WIN_H #include "all_include.h" #include "algowin.h" #include "map_win.h" #include "new_map_win.h" #include "nbtab.h" #include #include ///This class is the main window of GUI. ///It has menus, but the main part of it is the canvas. class MainWin : public Gtk::Window { ///Container Gtk::VBox vbox; Gtk::Notebook notebook; int active_tool; int active_tab; std::vector tabs; std::vector tabnames; std::set< AlgoWin* > aws; public: ///Constructor of the \ref NoteBookTab. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. ///\param title is the title of the window MainWin(); void set_tabtitle(std::string); ///ActionGroup for menu Glib::RefPtr ag; ///UIManager for menu Glib::RefPtr uim; void readFile(const std::string &); ///Tooltips Gtk::Tooltips tooltips; //Call-backs of buttons ///Callback for 'FileNew' action. virtual void newFile(); ///Callback for 'FileOpen' action. virtual void openFile(); ///Callback for 'FileSave' action. virtual void saveFile(); ///Callback for 'FileSaveAs' action. virtual void saveFileAs(); ///Callback for 'Close' action. virtual void close(); //Toolbar virtual void zoomIn(); virtual void zoomOut(); virtual void zoomFit(); virtual void zoom100(); virtual void createMapWin(); virtual void createAlgoWin(int); virtual void deRegisterAlgoWin(AlgoWin *); virtual void updateAlgoWins(); virtual void changeEditorialTool(int); virtual void createNewMapWinAfterSignal(NoteBookTab *, bool); virtual void createNewMapWin(); //Notebook handlers ///Callback for 'FileNewTab' action. virtual void newTab(); virtual void closeTab(); virtual void onChangeTab(GtkNotebookPage*, guint); virtual void onCloseTab(); }; #endif //MAIN_WIN_H