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