gui/main_win.h
author alpar
Mon, 01 Aug 2005 21:16:08 +0000
changeset 1610 893dacc1866c
parent 1606 dc4ea2010dee
child 1616 78704393218d
permissions -rw-r--r--
A default LP solver is defined in lp.h
     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(const std::string& title);
    22 
    23   MapStorage mapstorage;
    24 
    25 protected:
    26   ///Window of map-showing setup. Its type is \ref MapWin
    27   MapWin mapwin;
    28 
    29   ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
    30   NewMapWin newmapwin;
    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   ///Tooltips
    45   Gtk::Tooltips tooltips;
    46 
    47   ///Callback for 'FileNew' action.
    48   virtual void newFile();
    49   ///Callback for 'FileOpen' action.
    50   virtual void openFile();
    51   ///Callback for 'FileSave' action.
    52   virtual void saveFile();
    53   ///Callback for 'FileSaveAs' action.
    54   virtual void saveFileAs();
    55   ///Callback for 'Close' action.
    56   virtual void close();
    57 };
    58 
    59 #endif //MAIN_WIN_H