gui/main_win.h
author hegyi
Thu, 28 Jul 2005 15:54:53 +0000
changeset 1600 c421cc1b70ed
parent 1592 4708b716d2f4
child 1601 70d169a8313a
permissions -rw-r--r--
There is no need for these furthermore.
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>
hegyi@1592
     9
#include <new_map_win.h>
ladanyi@1442
    10
#include <libgnomecanvasmm.h>
ladanyi@1442
    11
#include <libgnomecanvasmm/polygon.h>
ladanyi@1442
    12
ladanyi@1442
    13
///This class is the main window of GUI.
ladanyi@1442
    14
///It has menus, but the main part of it is the canvas.
ladanyi@1442
    15
class MainWin : public Gtk::Window
ladanyi@1442
    16
{
ladanyi@1442
    17
public:
ladanyi@1442
    18
  ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
ladanyi@1442
    19
  ///\param title is the title of the window
ladanyi@1442
    20
  ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas
ladanyi@1442
    21
  ///\param cm stores the coordinates of the nodes of the graph
ladanyi@1442
    22
  ///\param ms is the \ref MapStorage in which the different visualizable maps are stored
ladanyi@1442
    23
  MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &);
ladanyi@1442
    24
ladanyi@1442
    25
protected:
ladanyi@1442
    26
  ///Window of map-showing setup. Its type is \ref MapWin
ladanyi@1442
    27
  MapWin mapwin;
ladanyi@1442
    28
hegyi@1592
    29
  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
hegyi@1592
    30
  NewMapWin newmapwin;
hegyi@1592
    31
ladanyi@1442
    32
  ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@1442
    33
  GraphDisplayerCanvas gd_canvas;
ladanyi@1442
    34
ladanyi@1442
    35
  ///ActionGroup for menu
ladanyi@1442
    36
  Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@1442
    37
ladanyi@1442
    38
  ///UIManager for menu
ladanyi@1442
    39
  Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@1442
    40
ladanyi@1442
    41
  ///Container
ladanyi@1442
    42
  Gtk::VBox vbox;
ladanyi@1442
    43
ladanyi@1442
    44
  ///Callback for 'FileNew' action.
ladanyi@1442
    45
  virtual void newFile();
ladanyi@1442
    46
  ///Callback for 'FileOpen' action.
ladanyi@1442
    47
  virtual void openFile();
ladanyi@1442
    48
  ///Callback for 'FileSave' action.
ladanyi@1442
    49
  virtual void saveFile();
ladanyi@1442
    50
  ///Callback for 'FileSaveAs' action.
ladanyi@1442
    51
  virtual void saveFileAs();
ladanyi@1442
    52
};
ladanyi@1442
    53
ladanyi@1442
    54
#endif //MAIN_WIN_H