main_win.h
author hegyi
Wed, 27 Jul 2005 11:19:35 +0000
branchgui
changeset 45 199f433eb7cd
parent 9 0bb1675306cb
child 47 9a0e6e92d06c
permissions -rw-r--r--
Sorry for the previous commit, it was not ready yet, but that damned up arrow... So in this new revision string-double and double-string conversion is corrected to a more C++ way.
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>
hegyi@9
    10
#include <edit_win.h>
ladanyi@6
    11
#include <libgnomecanvasmm.h>
ladanyi@6
    12
#include <libgnomecanvasmm/polygon.h>
ladanyi@6
    13
ladanyi@6
    14
///This class is the main window of GUI.
ladanyi@6
    15
///It has menus, but the main part of it is the canvas.
ladanyi@6
    16
class MainWin : public Gtk::Window
ladanyi@6
    17
{
ladanyi@6
    18
public:
ladanyi@6
    19
  ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
ladanyi@6
    20
  ///\param title is the title of the window
ladanyi@6
    21
  ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas
ladanyi@6
    22
  ///\param cm stores the coordinates of the nodes of the graph
ladanyi@6
    23
  ///\param ms is the \ref MapStorage in which the different visualizable maps are stored
ladanyi@6
    24
  MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &);
ladanyi@6
    25
ladanyi@6
    26
protected:
ladanyi@6
    27
  ///Window of map-showing setup. Its type is \ref MapWin
ladanyi@6
    28
  MapWin mapwin;
ladanyi@6
    29
hegyi@9
    30
  ///Window of editorial tools. Its type is \ref EditWin
hegyi@9
    31
  EditWin editwin;
hegyi@9
    32
hegyi@41
    33
  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
hegyi@41
    34
  NewMapWin newmapwin;
hegyi@41
    35
ladanyi@6
    36
  ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@6
    37
  GraphDisplayerCanvas gd_canvas;
ladanyi@6
    38
ladanyi@6
    39
  ///ActionGroup for menu
ladanyi@6
    40
  Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@6
    41
ladanyi@6
    42
  ///UIManager for menu
ladanyi@6
    43
  Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@6
    44
ladanyi@6
    45
  ///Container
ladanyi@6
    46
  Gtk::VBox vbox;
ladanyi@6
    47
ladanyi@6
    48
  ///This function makes map-setup window popped up.
ladanyi@6
    49
  virtual void showMaps();
hegyi@9
    50
  ///This function makes editorial window popped up.
hegyi@9
    51
  virtual void showEditorials();
ladanyi@6
    52
  ///Callback for 'FileNew' action.
ladanyi@6
    53
  virtual void newFile();
ladanyi@6
    54
  ///Callback for 'FileOpen' action.
ladanyi@6
    55
  virtual void openFile();
ladanyi@6
    56
  ///Callback for 'FileSave' action.
ladanyi@6
    57
  virtual void saveFile();
ladanyi@6
    58
  ///Callback for 'FileSaveAs' action.
ladanyi@6
    59
  virtual void saveFileAs();
ladanyi@6
    60
  ///Callback for 'Quit' action.
ladanyi@6
    61
  virtual void quit();
ladanyi@6
    62
};
ladanyi@6
    63
ladanyi@6
    64
#endif //MAIN_WIN_H