main_win.h
author hegyi
Mon, 06 Jun 2005 17:01:12 +0000
branchgui
changeset 8 abac0179a26a
parent 5 b7c36be1e35c
child 9 0bb1675306cb
permissions -rw-r--r--
Maps are now selectable through ComboBoxes, and Escape makes MapWin disappeared.
ladanyi@6
     1
// -*- C++ -*- //
ladanyi@6
     2
ladanyi@6
     3
#ifndef MAIN_WIN_H
ladanyi@6
     4
#define MAIN_WIN_H
ladanyi@6
     5
ladanyi@6
     6
#include <all_include.h>
ladanyi@6
     7
#include <mapstorage.h>
ladanyi@6
     8
#include <map_win.h>
ladanyi@6
     9
#include <libgnomecanvasmm.h>
ladanyi@6
    10
#include <libgnomecanvasmm/polygon.h>
ladanyi@6
    11
ladanyi@6
    12
///This class is the main window of GUI.
ladanyi@6
    13
///It has menus, but the main part of it is the canvas.
ladanyi@6
    14
class MainWin : public Gtk::Window
ladanyi@6
    15
{
ladanyi@6
    16
public:
ladanyi@6
    17
  ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
ladanyi@6
    18
  ///\param title is the title of the window
ladanyi@6
    19
  ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas
ladanyi@6
    20
  ///\param cm stores the coordinates of the nodes of the graph
ladanyi@6
    21
  ///\param ms is the \ref MapStorage in which the different visualizable maps are stored
ladanyi@6
    22
  MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &);
ladanyi@6
    23
ladanyi@6
    24
protected:
ladanyi@6
    25
  ///Window of map-showing setup. Its type is \ref MapWin
ladanyi@6
    26
  MapWin mapwin;
ladanyi@6
    27
ladanyi@6
    28
  ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@6
    29
  GraphDisplayerCanvas gd_canvas;
ladanyi@6
    30
ladanyi@6
    31
  ///ActionGroup for menu
ladanyi@6
    32
  Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@6
    33
ladanyi@6
    34
  ///UIManager for menu
ladanyi@6
    35
  Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@6
    36
ladanyi@6
    37
  ///Container
ladanyi@6
    38
  Gtk::VBox vbox;
ladanyi@6
    39
ladanyi@6
    40
  ///This function makes map-setup window popped up.
ladanyi@6
    41
  virtual void showMaps();
ladanyi@6
    42
  ///Callback for 'FileNew' action.
ladanyi@6
    43
  virtual void newFile();
ladanyi@6
    44
  ///Callback for 'FileOpen' action.
ladanyi@6
    45
  virtual void openFile();
ladanyi@6
    46
  ///Callback for 'FileSave' action.
ladanyi@6
    47
  virtual void saveFile();
ladanyi@6
    48
  ///Callback for 'FileSaveAs' action.
ladanyi@6
    49
  virtual void saveFileAs();
ladanyi@6
    50
  ///Callback for 'Quit' action.
ladanyi@6
    51
  virtual void quit();
ladanyi@6
    52
};
ladanyi@6
    53
ladanyi@6
    54
#endif //MAIN_WIN_H