main_win.h
author alpar
Mon, 24 Oct 2005 08:11:21 +0000
branchgui
changeset 83 6c0db51a1d99
parent 68 1a27576aa199
child 90 e9f8f44f12a3
permissions -rw-r--r--
New version of XML reader/writer.
Now, there are only a single XmlIo class both for reading and writing.
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@53
     6
#include "all_include.h"
ladanyi@53
     7
#include "mapstorage.h"
ladanyi@53
     8
#include "map_win.h"
ladanyi@53
     9
#include "new_map_win.h"
ladanyi@53
    10
#include "graph_displayer_canvas.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@68
    21
  MainWin();
ladanyi@53
    22
ladanyi@53
    23
  MapStorage mapstorage;
ladanyi@6
    24
ladanyi@57
    25
  void readFile(const std::string &);
ladanyi@57
    26
ladanyi@6
    27
protected:
hegyi@82
    28
  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
hegyi@82
    29
  NewMapWin newmapwin;
hegyi@82
    30
ladanyi@6
    31
  ///Window of map-showing setup. Its type is \ref MapWin
ladanyi@6
    32
  MapWin mapwin;
ladanyi@6
    33
ladanyi@6
    34
  ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@6
    35
  GraphDisplayerCanvas gd_canvas;
ladanyi@6
    36
ladanyi@6
    37
  ///ActionGroup for menu
ladanyi@6
    38
  Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@6
    39
ladanyi@6
    40
  ///UIManager for menu
ladanyi@6
    41
  Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@6
    42
ladanyi@6
    43
  ///Container
ladanyi@6
    44
  Gtk::VBox vbox;
ladanyi@6
    45
hegyi@50
    46
  ///Tooltips
hegyi@50
    47
  Gtk::Tooltips tooltips;
hegyi@50
    48
ladanyi@6
    49
  ///Callback for 'FileNew' action.
ladanyi@6
    50
  virtual void newFile();
ladanyi@6
    51
  ///Callback for 'FileOpen' action.
ladanyi@6
    52
  virtual void openFile();
ladanyi@6
    53
  ///Callback for 'FileSave' action.
ladanyi@6
    54
  virtual void saveFile();
ladanyi@6
    55
  ///Callback for 'FileSaveAs' action.
ladanyi@6
    56
  virtual void saveFileAs();
ladanyi@53
    57
  ///Callback for 'Close' action.
ladanyi@53
    58
  virtual void close();
ladanyi@6
    59
};
ladanyi@6
    60
ladanyi@6
    61
#endif //MAIN_WIN_H