main_win.h
branchgui
changeset 96 e664d8aa3f72
parent 95 628c0b383d2f
child 97 23f0afd1a323
     1.1 --- a/main_win.h	Wed Nov 30 13:24:23 2005 +0000
     1.2 +++ b/main_win.h	Tue Dec 06 10:53:38 2005 +0000
     1.3 @@ -3,35 +3,36 @@
     1.4  #ifndef MAIN_WIN_H
     1.5  #define MAIN_WIN_H
     1.6  
     1.7 -class MainWin;
     1.8 -
     1.9  #include "all_include.h"
    1.10 -#include "mapstorage.h"
    1.11  #include "map_win.h"
    1.12  #include "new_map_win.h"
    1.13 -#include "graph_displayer_canvas.h"
    1.14 +#include "nbtab.h"
    1.15  #include <libgnomecanvasmm.h>
    1.16  #include <libgnomecanvasmm/polygon.h>
    1.17  
    1.18 +
    1.19  ///This class is the main window of GUI.
    1.20  ///It has menus, but the main part of it is the canvas.
    1.21  class MainWin : public Gtk::Window
    1.22  {
    1.23 +  ///Container
    1.24 +  Gtk::VBox vbox;
    1.25 +
    1.26 +  Gtk::Notebook notebook;
    1.27 +
    1.28 +  int active_tool;
    1.29 +
    1.30 +  int active_tab;
    1.31 +  std::vector<NoteBookTab *> tabs;
    1.32 +  std::vector<std::string> tabnames;
    1.33 +
    1.34  public:
    1.35 -  ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
    1.36 +  
    1.37 +  ///Constructor of the \ref NoteBookTab. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
    1.38    ///\param title is the title of the window
    1.39    MainWin();
    1.40  
    1.41 -  MapStorage mapstorage;
    1.42 -
    1.43 -  void readFile(const std::string &);
    1.44 -
    1.45 -protected:
    1.46 -  MapWin * mapwin;
    1.47 -  bool mapwinexists;
    1.48 -
    1.49 -  ///The graph will be drawn on this \ref GraphDisplayerCanvas
    1.50 -  GraphDisplayerCanvas * gd_canvas;
    1.51 +  void set_tabtitle(std::string);
    1.52  
    1.53    ///ActionGroup for menu
    1.54    Glib::RefPtr<Gtk::ActionGroup> ag;
    1.55 @@ -39,12 +40,13 @@
    1.56    ///UIManager for menu
    1.57    Glib::RefPtr<Gtk::UIManager> uim;
    1.58  
    1.59 -  ///Container
    1.60 -  Gtk::VBox vbox;
    1.61 +  void readFile(const std::string &);
    1.62  
    1.63    ///Tooltips
    1.64    Gtk::Tooltips tooltips;
    1.65  
    1.66 +  //Call-backs of buttons
    1.67 +
    1.68    ///Callback for 'FileNew' action.
    1.69    virtual void newFile();
    1.70    ///Callback for 'FileOpen' action.
    1.71 @@ -56,18 +58,26 @@
    1.72    ///Callback for 'Close' action.
    1.73    virtual void close();
    1.74  
    1.75 -public:
    1.76 -  void propertyChange(bool, int, std::string);
    1.77 -  void popupNewMapWin(bool, int);
    1.78 +  //Toolbar
    1.79 +  virtual void zoomIn();
    1.80 +  virtual void zoomOut();
    1.81 +  virtual void zoomFit();
    1.82 +  virtual void zoom100();
    1.83  
    1.84 -  std::string getActiveEdgeMap(int);
    1.85 -  std::string getActiveNodeMap(int);
    1.86 +  virtual void createMapWin();
    1.87  
    1.88 -  void registerNewEdgeMap(std::string);
    1.89 -  void registerNewNodeMap(std::string);
    1.90 +  virtual void changeEditorialTool(int);
    1.91  
    1.92 -  void createMapWin();
    1.93 -  void closeMapWin();
    1.94 +  virtual void createNewMapWinAfterSignal(NoteBookTab *, bool);
    1.95 +  virtual void createNewMapWin();
    1.96 +
    1.97 +  //Notebook handlers
    1.98 +  ///Callback for 'FileNewTab' action.
    1.99 +  virtual void newTab();
   1.100 +  virtual void onChangeTab(GtkNotebookPage*, guint);
   1.101 +  virtual void onCloseTab();
   1.102 +
   1.103 +
   1.104  };
   1.105  
   1.106  #endif //MAIN_WIN_H