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