author | hegyi |
Fri, 27 May 2005 10:34:20 +0000 | |
branch | gui |
changeset 4 | e099638ff236 |
parent 1 | c69fedfbb9b3 |
child 5 | b7c36be1e35c |
permissions | -rw-r--r-- |
ladanyi@1 | 1 |
// -*- C++ -*- // |
ladanyi@1 | 2 |
|
ladanyi@1 | 3 |
#ifndef MAIN_WIN_H |
ladanyi@1 | 4 |
#define MAIN_WIN_H |
ladanyi@1 | 5 |
|
ladanyi@1 | 6 |
#include <all_include.h> |
ladanyi@1 | 7 |
#include <mapstorage.h> |
ladanyi@1 | 8 |
#include <map_win.h> |
ladanyi@1 | 9 |
#include <libgnomecanvasmm.h> |
ladanyi@1 | 10 |
#include <libgnomecanvasmm/polygon.h> |
ladanyi@1 | 11 |
|
hegyi@4 | 12 |
///This class is the main window of GUI. |
hegyi@4 | 13 |
///It has menus, but the main part of it is the canvas. |
ladanyi@1 | 14 |
class MainWin : public Gtk::Window |
ladanyi@1 | 15 |
{ |
ladanyi@1 | 16 |
public: |
hegyi@4 | 17 |
///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. |
hegyi@4 | 18 |
///\param title is the title of the window |
hegyi@4 | 19 |
///\param graph is the graph that will be drawn here. It will be given further to the \ref GraphDisplayerCanvas |
hegyi@4 | 20 |
///\param cm stores the coordinates of the nodes of the graph |
hegyi@4 | 21 |
///\param ms is the \ref MapStorage in which the different visualizable maps are stored |
ladanyi@1 | 22 |
MainWin(const std::string& title, Graph &, CoordinatesMap &, MapStorage &); |
ladanyi@1 | 23 |
|
ladanyi@1 | 24 |
protected: |
hegyi@4 | 25 |
///Window of map-showing setup. Its type is \ref MapWin |
ladanyi@1 | 26 |
MapWin mapwin; |
ladanyi@1 | 27 |
|
hegyi@4 | 28 |
///The graph will be drawn on this \ref GraphDisplayerCanvas |
ladanyi@1 | 29 |
GraphDisplayerCanvas gd_canvas; |
ladanyi@1 | 30 |
|
hegyi@4 | 31 |
///ActionGroup for menu |
ladanyi@1 | 32 |
Glib::RefPtr<Gtk::ActionGroup> ag; |
ladanyi@1 | 33 |
|
hegyi@4 | 34 |
///UIManager for menu |
ladanyi@1 | 35 |
Glib::RefPtr<Gtk::UIManager> uim; |
ladanyi@1 | 36 |
|
hegyi@4 | 37 |
///Container |
ladanyi@1 | 38 |
Gtk::VBox vbox; |
ladanyi@1 | 39 |
|
hegyi@4 | 40 |
///This function makes map-setup window popped up. |
ladanyi@1 | 41 |
virtual void showMaps(); |
ladanyi@1 | 42 |
|
hegyi@4 | 43 |
///Exit |
ladanyi@1 | 44 |
virtual void quit(); |
ladanyi@1 | 45 |
|
hegyi@4 | 46 |
///Refit screen to be able to show the whole graph. |
ladanyi@1 | 47 |
virtual void rezoom(); |
ladanyi@1 | 48 |
|
ladanyi@1 | 49 |
}; |
ladanyi@1 | 50 |
|
ladanyi@1 | 51 |
#endif //MAIN_WIN_H |