1.1 --- a/new_map_win.h Fri Nov 04 19:07:15 2005 +0000
1.2 +++ b/new_map_win.h Thu Nov 17 15:34:18 2005 +0000
1.3 @@ -9,6 +9,7 @@
1.4 #include <graph_displayer_canvas.h>
1.5 #include <libgnomecanvasmm.h>
1.6 #include <libgnomecanvasmm/polygon.h>
1.7 +#include <stack>
1.8
1.9 ///This class is responsible for creating a window,
1.10 ///on which the parameters of a new map can be set.
1.11 @@ -21,21 +22,40 @@
1.12 ///a function of the \ref GraphDisplayerCanvas will be called.
1.13 GraphDisplayerCanvas & gdc;
1.14
1.15 - public:
1.16 +public:
1.17 + struct tree_node
1.18 + {
1.19 + char ch;
1.20 + tree_node * left_child;
1.21 + tree_node * right_child;
1.22 + };
1.23 +
1.24 ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
1.25 NewMapWin(const std::string& title, GraphDisplayerCanvas &);
1.26
1.27 -
1.28 +
1.29 ///Signal on button is connected to this function,
1.30 ///Therefore this function determines whether to
1.31 ///call the map/creatort function, and if yes, it
1.32 //tells it the attributes.(name, default value)
1.33 virtual void buttonPressed();
1.34 -
1.35 +
1.36 virtual void showByPreChoose(bool);
1.37
1.38 virtual bool closeIfEscapeIsPressed(GdkEventKey*);
1.39
1.40 + ///Function that creates a tree from an appropriately manipulated string
1.41 + tree_node * weightedString2Tree(std::string, std::vector<unsigned int> &, int);
1.42 +
1.43 + ///Function that creates a string from a tree by postorder reading.
1.44 + std::string postOrder(tree_node *);
1.45 +
1.46 + std::string string2Polishform(std::string, bool);
1.47 +
1.48 + bool validVariable(std::string, bool);
1.49 +
1.50 + std::map<char, std::string> ch2var;
1.51 +
1.52 Gtk::Entry name, default_value;
1.53
1.54 Gtk::VBox vbox;