gui/main_win.h
author hegyi
Thu, 16 Jun 2005 18:08:04 +0000
changeset 1499 9316dcc0a355
parent 1442 1e3c69aa035b
child 1592 4708b716d2f4
permissions -rw-r--r--
Little red arrows appear in breakpoints of edges.
     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 <edit_win.h>
    10 #include <libgnomecanvasmm.h>
    11 #include <libgnomecanvasmm/polygon.h>
    12 
    13 ///This class is the main window of GUI.
    14 ///It has menus, but the main part of it is the canvas.
    15 class MainWin : public Gtk::Window
    16 {
    17 public:
    18   ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
    19   ///\param title is the title of the window
    20   ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas
    21   ///\param cm stores the coordinates of the nodes of the graph
    22   ///\param ms is the \ref MapStorage in which the different visualizable maps are stored
    23   MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &);
    24 
    25 protected:
    26   ///Window of map-showing setup. Its type is \ref MapWin
    27   MapWin mapwin;
    28 
    29   ///Window of editorial tools. Its type is \ref EditWin
    30   EditWin editwin;
    31 
    32   ///The graph will be drawn on this \ref GraphDisplayerCanvas
    33   GraphDisplayerCanvas gd_canvas;
    34 
    35   ///ActionGroup for menu
    36   Glib::RefPtr<Gtk::ActionGroup> ag;
    37 
    38   ///UIManager for menu
    39   Glib::RefPtr<Gtk::UIManager> uim;
    40 
    41   ///Container
    42   Gtk::VBox vbox;
    43 
    44   ///This function makes map-setup window popped up.
    45   virtual void showMaps();
    46   ///This function makes editorial window popped up.
    47   virtual void showEditorials();
    48   ///Callback for 'FileNew' action.
    49   virtual void newFile();
    50   ///Callback for 'FileOpen' action.
    51   virtual void openFile();
    52   ///Callback for 'FileSave' action.
    53   virtual void saveFile();
    54   ///Callback for 'FileSaveAs' action.
    55   virtual void saveFileAs();
    56   ///Callback for 'Quit' action.
    57   virtual void quit();
    58 };
    59 
    60 #endif //MAIN_WIN_H