8 #include <all_include.h>
9 #include <graph_displayer_canvas.h>
10 #include <libgnomecanvasmm.h>
11 #include <libgnomecanvasmm/polygon.h>
14 ///This class is responsible for creating a window,
15 ///on which the parameters of a new map can be set.
17 class NewMapWin : public Gtk::Window
19 ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
20 ///It has to be known for this class, because
21 ///when a map is created
22 ///a function of the \ref GraphDisplayerCanvas will be called.
23 GraphDisplayerCanvas & gdc;
29 tree_node * left_child;
30 tree_node * right_child;
33 ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
34 NewMapWin(const std::string& title, GraphDisplayerCanvas &);
37 ///Signal on button is connected to this function,
38 ///Therefore this function determines whether to
39 ///call the map/creatort function, and if yes, it
40 //tells it the attributes.(name, default value)
41 virtual void buttonPressed();
43 virtual void showByPreChoose(bool);
45 virtual bool closeIfEscapeIsPressed(GdkEventKey*);
47 ///Function that creates a tree from an appropriately manipulated string
48 tree_node * weightedString2Tree(std::string, std::vector<unsigned int> &, int);
50 ///Function that creates a string from a tree by postorder reading.
51 std::string postOrder(tree_node *);
53 std::string string2Polishform(std::string, bool);
55 bool validVariable(std::string, bool);
57 std::map<char, std::string> ch2var;
59 Gtk::Entry name, default_value;
68 Gtk::RadioButton node, edge;