gui/main_win.h
author deba
Wed, 23 Nov 2005 16:08:02 +0000
changeset 1830 ffd6d50fb155
parent 1733 5e0d97823ba2
child 1837 8dd6160ff699
permissions -rw-r--r--
Document improvments
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@1606
     6
#include "all_include.h"
ladanyi@1606
     7
#include "mapstorage.h"
ladanyi@1606
     8
#include "map_win.h"
ladanyi@1606
     9
#include "new_map_win.h"
ladanyi@1606
    10
#include "graph_displayer_canvas.h"
ladanyi@1442
    11
#include <libgnomecanvasmm.h>
ladanyi@1442
    12
#include <libgnomecanvasmm/polygon.h>
ladanyi@1442
    13
ladanyi@1442
    14
///This class is the main window of GUI.
ladanyi@1442
    15
///It has menus, but the main part of it is the canvas.
ladanyi@1442
    16
class MainWin : public Gtk::Window
ladanyi@1442
    17
{
ladanyi@1442
    18
public:
ladanyi@1442
    19
  ///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
ladanyi@1442
    20
  ///\param title is the title of the window
ladanyi@1650
    21
  MainWin();
ladanyi@1606
    22
ladanyi@1606
    23
  MapStorage mapstorage;
ladanyi@1442
    24
ladanyi@1616
    25
  void readFile(const std::string &);
ladanyi@1616
    26
ladanyi@1442
    27
protected:
ladanyi@1442
    28
  ///Window of map-showing setup. Its type is \ref MapWin
ladanyi@1442
    29
  MapWin mapwin;
ladanyi@1442
    30
ladanyi@1442
    31
  ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@1442
    32
  GraphDisplayerCanvas gd_canvas;
ladanyi@1442
    33
ladanyi@1442
    34
  ///ActionGroup for menu
ladanyi@1442
    35
  Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@1442
    36
ladanyi@1442
    37
  ///UIManager for menu
ladanyi@1442
    38
  Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@1442
    39
ladanyi@1442
    40
  ///Container
ladanyi@1442
    41
  Gtk::VBox vbox;
ladanyi@1442
    42
hegyi@1601
    43
  ///Tooltips
hegyi@1601
    44
  Gtk::Tooltips tooltips;
hegyi@1601
    45
ladanyi@1442
    46
  ///Callback for 'FileNew' action.
ladanyi@1442
    47
  virtual void newFile();
ladanyi@1442
    48
  ///Callback for 'FileOpen' action.
ladanyi@1442
    49
  virtual void openFile();
ladanyi@1442
    50
  ///Callback for 'FileSave' action.
ladanyi@1442
    51
  virtual void saveFile();
ladanyi@1442
    52
  ///Callback for 'FileSaveAs' action.
ladanyi@1442
    53
  virtual void saveFileAs();
ladanyi@1606
    54
  ///Callback for 'Close' action.
ladanyi@1606
    55
  virtual void close();
ladanyi@1442
    56
};
ladanyi@1442
    57
ladanyi@1442
    58
#endif //MAIN_WIN_H