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