gui/main_win.h
author alpar
Thu, 18 Aug 2005 13:33:49 +0000
changeset 1643 9285f3777553
parent 1607 da99ef6dff78
child 1650 422906271d22
permissions -rw-r--r--
- The number of gcc-4.0 warnings has significantly decreases.
- Some code clean-up in gui
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@1606
    21
  MainWin(const std::string& title);
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
hegyi@1592
    31
  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
hegyi@1592
    32
  NewMapWin newmapwin;
hegyi@1592
    33
ladanyi@1442
    34
  ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@1442
    35
  GraphDisplayerCanvas gd_canvas;
ladanyi@1442
    36
ladanyi@1442
    37
  ///ActionGroup for menu
ladanyi@1442
    38
  Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@1442
    39
ladanyi@1442
    40
  ///UIManager for menu
ladanyi@1442
    41
  Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@1442
    42
ladanyi@1442
    43
  ///Container
ladanyi@1442
    44
  Gtk::VBox vbox;
ladanyi@1442
    45
hegyi@1601
    46
  ///Tooltips
hegyi@1601
    47
  Gtk::Tooltips tooltips;
hegyi@1601
    48
ladanyi@1442
    49
  ///Callback for 'FileNew' action.
ladanyi@1442
    50
  virtual void newFile();
ladanyi@1442
    51
  ///Callback for 'FileOpen' action.
ladanyi@1442
    52
  virtual void openFile();
ladanyi@1442
    53
  ///Callback for 'FileSave' action.
ladanyi@1442
    54
  virtual void saveFile();
ladanyi@1442
    55
  ///Callback for 'FileSaveAs' action.
ladanyi@1442
    56
  virtual void saveFileAs();
ladanyi@1606
    57
  ///Callback for 'Close' action.
ladanyi@1606
    58
  virtual void close();
ladanyi@1442
    59
};
ladanyi@1442
    60
ladanyi@1442
    61
#endif //MAIN_WIN_H