12 #include <stack> |
12 #include <stack> |
13 |
13 |
14 ///This class is responsible for creating a window, |
14 ///This class is responsible for creating a window, |
15 ///on which the parameters of a new map can be set. |
15 ///on which the parameters of a new map can be set. |
16 |
16 |
17 class NewMapWin : public Gtk::Window |
17 class NewMapWin : public Gtk::Dialog |
18 { |
18 { |
19 ///The \ref GraphDisplayerCanvas on which the graph will be drawn. |
19 ///The \ref GraphDisplayerCanvas on which the graph will be drawn. |
20 ///It has to be known for this class, because |
20 ///It has to be known for this class, because |
21 ///when a map is created |
21 ///when a map is created |
22 ///a function of the \ref GraphDisplayerCanvas will be called. |
22 ///a function of the \ref GraphDisplayerCanvas will be called. |
29 tree_node * left_child; |
29 tree_node * left_child; |
30 tree_node * right_child; |
30 tree_node * right_child; |
31 }; |
31 }; |
32 |
32 |
33 ///Constructor of NewMapWin creates the widgets shown in NewMapWin. |
33 ///Constructor of NewMapWin creates the widgets shown in NewMapWin. |
34 NewMapWin(const std::string& title, GraphDisplayerCanvas &); |
34 NewMapWin(const std::string& title, GraphDisplayerCanvas &, bool itisedge=true, bool edgenode=true); |
35 |
|
36 |
35 |
37 ///Signal on button is connected to this function, |
36 ///Signal on button is connected to this function, |
38 ///Therefore this function determines whether to |
37 ///Therefore this function determines whether to |
39 ///call the map/creatort function, and if yes, it |
38 ///call the map/creatort function, and if yes, it |
40 //tells it the attributes.(name, default value) |
39 //tells it the attributes.(name, default value) |
41 virtual void buttonPressed(); |
40 virtual void on_response(int response_id); |
42 |
|
43 virtual void showByPreChoose(bool); |
|
44 |
41 |
45 virtual bool closeIfEscapeIsPressed(GdkEventKey*); |
42 virtual bool closeIfEscapeIsPressed(GdkEventKey*); |
46 |
43 |
47 ///Function that creates a tree from an appropriately manipulated string |
44 ///Function that creates a tree from an appropriately manipulated string |
48 tree_node * weightedString2Tree(std::string, std::vector<unsigned int> &, int); |
45 tree_node * weightedString2Tree(std::string, std::vector<unsigned int> &, int); |