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