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