author | ladanyi |
Tue, 23 Aug 2005 07:36:09 +0000 | |
branch | gui |
changeset 63 | 59768817442a |
parent 54 | 9128e364fb19 |
child 68 | 1a27576aa199 |
permissions | -rw-r--r-- |
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@53 | 6 |
#include "all_include.h" |
ladanyi@53 | 7 |
#include "mapstorage.h" |
ladanyi@53 | 8 |
#include "map_win.h" |
ladanyi@53 | 9 |
#include "new_map_win.h" |
ladanyi@53 | 10 |
#include "graph_displayer_canvas.h" |
ladanyi@6 | 11 |
#include <libgnomecanvasmm.h> |
ladanyi@6 | 12 |
#include <libgnomecanvasmm/polygon.h> |
ladanyi@6 | 13 |
|
ladanyi@6 | 14 |
///This class is the main window of GUI. |
ladanyi@6 | 15 |
///It has menus, but the main part of it is the canvas. |
ladanyi@6 | 16 |
class MainWin : public Gtk::Window |
ladanyi@6 | 17 |
{ |
ladanyi@6 | 18 |
public: |
ladanyi@6 | 19 |
///Constructor of the \ref MainWin. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. |
ladanyi@6 | 20 |
///\param title is the title of the window |
ladanyi@53 | 21 |
MainWin(const std::string& title); |
ladanyi@53 | 22 |
|
ladanyi@53 | 23 |
MapStorage mapstorage; |
ladanyi@6 | 24 |
|
ladanyi@57 | 25 |
void readFile(const std::string &); |
ladanyi@57 | 26 |
|
ladanyi@6 | 27 |
protected: |
ladanyi@6 | 28 |
///Window of map-showing setup. Its type is \ref MapWin |
ladanyi@6 | 29 |
MapWin mapwin; |
ladanyi@6 | 30 |
|
hegyi@41 | 31 |
///We need to store newmapwin, to be able to set the appropriate values for properties of new map. |
hegyi@41 | 32 |
NewMapWin newmapwin; |
hegyi@41 | 33 |
|
ladanyi@6 | 34 |
///The graph will be drawn on this \ref GraphDisplayerCanvas |
ladanyi@6 | 35 |
GraphDisplayerCanvas gd_canvas; |
ladanyi@6 | 36 |
|
ladanyi@6 | 37 |
///ActionGroup for menu |
ladanyi@6 | 38 |
Glib::RefPtr<Gtk::ActionGroup> ag; |
ladanyi@6 | 39 |
|
ladanyi@6 | 40 |
///UIManager for menu |
ladanyi@6 | 41 |
Glib::RefPtr<Gtk::UIManager> uim; |
ladanyi@6 | 42 |
|
ladanyi@6 | 43 |
///Container |
ladanyi@6 | 44 |
Gtk::VBox vbox; |
ladanyi@6 | 45 |
|
hegyi@50 | 46 |
///Tooltips |
hegyi@50 | 47 |
Gtk::Tooltips tooltips; |
hegyi@50 | 48 |
|
ladanyi@6 | 49 |
///Callback for 'FileNew' action. |
ladanyi@6 | 50 |
virtual void newFile(); |
ladanyi@6 | 51 |
///Callback for 'FileOpen' action. |
ladanyi@6 | 52 |
virtual void openFile(); |
ladanyi@6 | 53 |
///Callback for 'FileSave' action. |
ladanyi@6 | 54 |
virtual void saveFile(); |
ladanyi@6 | 55 |
///Callback for 'FileSaveAs' action. |
ladanyi@6 | 56 |
virtual void saveFileAs(); |
ladanyi@53 | 57 |
///Callback for 'Close' action. |
ladanyi@53 | 58 |
virtual void close(); |
ladanyi@6 | 59 |
}; |
ladanyi@6 | 60 |
|
ladanyi@6 | 61 |
#endif //MAIN_WIN_H |