[1593] | 1 | // -*- C++ -*- // |
---|
| 2 | |
---|
| 3 | #ifndef NEWMAPWIN_H |
---|
| 4 | #define NEWMAPWIN_H |
---|
| 5 | |
---|
| 6 | class NewMapWin; |
---|
| 7 | |
---|
| 8 | #include <all_include.h> |
---|
| 9 | #include <graph_displayer_canvas.h> |
---|
| 10 | #include <libgnomecanvasmm.h> |
---|
| 11 | #include <libgnomecanvasmm/polygon.h> |
---|
| 12 | |
---|
| 13 | ///This class is responsible for creating a window, |
---|
| 14 | ///on which the parameters of a new map can be set. |
---|
| 15 | |
---|
| 16 | class NewMapWin : public Gtk::Window |
---|
| 17 | { |
---|
| 18 | ///The \ref GraphDisplayerCanvas on which the graph will be drawn. |
---|
| 19 | ///It has to be known for this class, because |
---|
| 20 | ///when a map is created |
---|
| 21 | ///a function of the \ref GraphDisplayerCanvas will be called. |
---|
| 22 | GraphDisplayerCanvas & gdc; |
---|
| 23 | |
---|
| 24 | public: |
---|
| 25 | ///Constructor of NewMapWin creates the widgets shown in NewMapWin. |
---|
| 26 | NewMapWin(const std::string& title, GraphDisplayerCanvas &); |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | ///Signal on button is connected to this function, |
---|
| 30 | ///Therefore this function determines whether to |
---|
| 31 | ///call the map/creatort function, and if yes, it |
---|
| 32 | //tells it the attributes.(name, default value) |
---|
| 33 | virtual void buttonPressed(); |
---|
| 34 | |
---|
[1737] | 35 | virtual void showByPreChoose(bool); |
---|
| 36 | |
---|
[1593] | 37 | virtual bool closeIfEscapeIsPressed(GdkEventKey*); |
---|
| 38 | |
---|
| 39 | Gtk::Entry name, default_value; |
---|
| 40 | |
---|
| 41 | Gtk::VBox vbox; |
---|
| 42 | |
---|
| 43 | Gtk::Button * button; |
---|
| 44 | |
---|
| 45 | Gtk::Table * table; |
---|
| 46 | Gtk::Label * label; |
---|
| 47 | |
---|
| 48 | Gtk::RadioButton node, edge; |
---|
| 49 | }; |
---|
| 50 | |
---|
| 51 | #endif //NEWMAPWIN_H |
---|