author | marci |
Wed, 16 Nov 2005 14:46:22 +0000 | |
changeset 1809 | 029cc4f638d1 |
parent 1650 | 422906271d22 |
child 1823 | cb082cdf3667 |
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@1606 | 6 |
#include "all_include.h" |
ladanyi@1606 | 7 |
#include "mapstorage.h" |
ladanyi@1606 | 8 |
#include "map_win.h" |
ladanyi@1606 | 9 |
#include "new_map_win.h" |
ladanyi@1606 | 10 |
#include "graph_displayer_canvas.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@1650 | 21 |
MainWin(); |
ladanyi@1606 | 22 |
|
ladanyi@1606 | 23 |
MapStorage mapstorage; |
ladanyi@1442 | 24 |
|
ladanyi@1616 | 25 |
void readFile(const std::string &); |
ladanyi@1616 | 26 |
|
ladanyi@1442 | 27 |
protected: |
hegyi@1733 | 28 |
///We need to store newmapwin, to be able to set the appropriate values for properties of new map. |
hegyi@1733 | 29 |
NewMapWin newmapwin; |
hegyi@1733 | 30 |
|
ladanyi@1442 | 31 |
///Window of map-showing setup. Its type is \ref MapWin |
ladanyi@1442 | 32 |
MapWin mapwin; |
ladanyi@1442 | 33 |
|
ladanyi@1442 | 34 |
///The graph will be drawn on this \ref GraphDisplayerCanvas |
ladanyi@1442 | 35 |
GraphDisplayerCanvas gd_canvas; |
ladanyi@1442 | 36 |
|
ladanyi@1442 | 37 |
///ActionGroup for menu |
ladanyi@1442 | 38 |
Glib::RefPtr<Gtk::ActionGroup> ag; |
ladanyi@1442 | 39 |
|
ladanyi@1442 | 40 |
///UIManager for menu |
ladanyi@1442 | 41 |
Glib::RefPtr<Gtk::UIManager> uim; |
ladanyi@1442 | 42 |
|
ladanyi@1442 | 43 |
///Container |
ladanyi@1442 | 44 |
Gtk::VBox vbox; |
ladanyi@1442 | 45 |
|
hegyi@1601 | 46 |
///Tooltips |
hegyi@1601 | 47 |
Gtk::Tooltips tooltips; |
hegyi@1601 | 48 |
|
ladanyi@1442 | 49 |
///Callback for 'FileNew' action. |
ladanyi@1442 | 50 |
virtual void newFile(); |
ladanyi@1442 | 51 |
///Callback for 'FileOpen' action. |
ladanyi@1442 | 52 |
virtual void openFile(); |
ladanyi@1442 | 53 |
///Callback for 'FileSave' action. |
ladanyi@1442 | 54 |
virtual void saveFile(); |
ladanyi@1442 | 55 |
///Callback for 'FileSaveAs' action. |
ladanyi@1442 | 56 |
virtual void saveFileAs(); |
ladanyi@1606 | 57 |
///Callback for 'Close' action. |
ladanyi@1606 | 58 |
virtual void close(); |
ladanyi@1442 | 59 |
}; |
ladanyi@1442 | 60 |
|
ladanyi@1442 | 61 |
#endif //MAIN_WIN_H |