gui/main_win.h
author deba
Wed, 23 Nov 2005 15:42:36 +0000
changeset 1829 183b4cbf9733
parent 1733 5e0d97823ba2
child 1837 8dd6160ff699
permissions -rw-r--r--
Correcting alteration notifing
     1 // -*- C++ -*- //
     2 
     3 #ifndef MAIN_WIN_H
     4 #define MAIN_WIN_H
     5 
     6 #include "all_include.h"
     7 #include "mapstorage.h"
     8 #include "map_win.h"
     9 #include "new_map_win.h"
    10 #include "graph_displayer_canvas.h"
    11 #include <libgnomecanvasmm.h>
    12 #include <libgnomecanvasmm/polygon.h>
    13 
    14 ///This class is the main window of GUI.
    15 ///It has menus, but the main part of it is the canvas.
    16 class MainWin : public Gtk::Window
    17 {
    18 public:
    19   ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
    20   ///\param title is the title of the window
    21   MainWin();
    22 
    23   MapStorage mapstorage;
    24 
    25   void readFile(const std::string &);
    26 
    27 protected:
    28   ///Window of map-showing setup. Its type is \ref MapWin
    29   MapWin mapwin;
    30 
    31   ///The graph will be drawn on this \ref GraphDisplayerCanvas
    32   GraphDisplayerCanvas gd_canvas;
    33 
    34   ///ActionGroup for menu
    35   Glib::RefPtr<Gtk::ActionGroup> ag;
    36 
    37   ///UIManager for menu
    38   Glib::RefPtr<Gtk::UIManager> uim;
    39 
    40   ///Container
    41   Gtk::VBox vbox;
    42 
    43   ///Tooltips
    44   Gtk::Tooltips tooltips;
    45 
    46   ///Callback for 'FileNew' action.
    47   virtual void newFile();
    48   ///Callback for 'FileOpen' action.
    49   virtual void openFile();
    50   ///Callback for 'FileSave' action.
    51   virtual void saveFile();
    52   ///Callback for 'FileSaveAs' action.
    53   virtual void saveFileAs();
    54   ///Callback for 'Close' action.
    55   virtual void close();
    56 };
    57 
    58 #endif //MAIN_WIN_H