gui/main_win.h
author hegyi
Tue, 26 Jul 2005 21:19:41 +0000
changeset 1592 4708b716d2f4
parent 1468 d0ccb2fdeeff
child 1598 739df601808d
permissions -rw-r--r--
EdgeMap and NodeMap creation is done, at last. Bach 4ever.
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@1442
     6
#include <all_include.h>
ladanyi@1442
     7
#include <mapstorage.h>
ladanyi@1442
     8
#include <map_win.h>
hegyi@1592
     9
#include <new_map_win.h>
hegyi@1468
    10
#include <edit_win.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@1442
    21
  ///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas
ladanyi@1442
    22
  ///\param cm stores the coordinates of the nodes of the graph
ladanyi@1442
    23
  ///\param ms is the \ref MapStorage in which the different visualizable maps are stored
ladanyi@1442
    24
  MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &);
ladanyi@1442
    25
ladanyi@1442
    26
protected:
ladanyi@1442
    27
  ///Window of map-showing setup. Its type is \ref MapWin
ladanyi@1442
    28
  MapWin mapwin;
ladanyi@1442
    29
hegyi@1468
    30
  ///Window of editorial tools. Its type is \ref EditWin
hegyi@1468
    31
  EditWin editwin;
hegyi@1468
    32
hegyi@1592
    33
  ///We need to store newmapwin, to be able to set the appropriate values for properties of new map.
hegyi@1592
    34
  NewMapWin newmapwin;
hegyi@1592
    35
ladanyi@1442
    36
  ///The graph will be drawn on this \ref GraphDisplayerCanvas
ladanyi@1442
    37
  GraphDisplayerCanvas gd_canvas;
ladanyi@1442
    38
ladanyi@1442
    39
  ///ActionGroup for menu
ladanyi@1442
    40
  Glib::RefPtr<Gtk::ActionGroup> ag;
ladanyi@1442
    41
ladanyi@1442
    42
  ///UIManager for menu
ladanyi@1442
    43
  Glib::RefPtr<Gtk::UIManager> uim;
ladanyi@1442
    44
ladanyi@1442
    45
  ///Container
ladanyi@1442
    46
  Gtk::VBox vbox;
ladanyi@1442
    47
ladanyi@1442
    48
  ///This function makes map-setup window popped up.
ladanyi@1442
    49
  virtual void showMaps();
hegyi@1468
    50
  ///This function makes editorial window popped up.
hegyi@1468
    51
  virtual void showEditorials();
ladanyi@1442
    52
  ///Callback for 'FileNew' action.
ladanyi@1442
    53
  virtual void newFile();
ladanyi@1442
    54
  ///Callback for 'FileOpen' action.
ladanyi@1442
    55
  virtual void openFile();
ladanyi@1442
    56
  ///Callback for 'FileSave' action.
ladanyi@1442
    57
  virtual void saveFile();
ladanyi@1442
    58
  ///Callback for 'FileSaveAs' action.
ladanyi@1442
    59
  virtual void saveFileAs();
ladanyi@1442
    60
  ///Callback for 'Quit' action.
ladanyi@1442
    61
  virtual void quit();
ladanyi@1442
    62
};
ladanyi@1442
    63
ladanyi@1442
    64
#endif //MAIN_WIN_H