hegyi@42: // -*- C++ -*- // hegyi@42: hegyi@42: #ifndef NEWMAPWIN_H hegyi@42: #define NEWMAPWIN_H hegyi@42: hegyi@42: class NewMapWin; hegyi@42: hegyi@42: #include hegyi@94: #include hegyi@42: #include hegyi@42: #include hegyi@88: #include hegyi@42: hegyi@42: ///This class is responsible for creating a window, hegyi@42: ///on which the parameters of a new map can be set. hegyi@42: hegyi@90: class NewMapWin : public Gtk::Dialog hegyi@42: { hegyi@94: MainWin & mainwin; hegyi@42: hegyi@88: public: hegyi@88: struct tree_node hegyi@88: { hegyi@88: char ch; hegyi@88: tree_node * left_child; hegyi@88: tree_node * right_child; hegyi@88: }; hegyi@88: hegyi@42: ///Constructor of NewMapWin creates the widgets shown in NewMapWin. hegyi@94: NewMapWin(const std::string& title, MainWin &, bool itisedge=true, bool edgenode=true); hegyi@88: hegyi@42: ///Signal on button is connected to this function, hegyi@42: ///Therefore this function determines whether to hegyi@42: ///call the map/creatort function, and if yes, it hegyi@42: //tells it the attributes.(name, default value) hegyi@90: virtual void on_response(int response_id); hegyi@85: hegyi@42: virtual bool closeIfEscapeIsPressed(GdkEventKey*); hegyi@42: hegyi@88: ///Function that creates a tree from an appropriately manipulated string hegyi@88: tree_node * weightedString2Tree(std::string, std::vector &, int); hegyi@88: hegyi@88: ///Function that creates a string from a tree by postorder reading. hegyi@88: std::string postOrder(tree_node *); hegyi@88: hegyi@88: std::string string2Polishform(std::string, bool); hegyi@88: hegyi@88: bool validVariable(std::string, bool); hegyi@88: hegyi@88: std::map ch2var; hegyi@88: hegyi@42: Gtk::Entry name, default_value; hegyi@42: hegyi@42: Gtk::Table * table; hegyi@42: Gtk::Label * label; hegyi@42: hegyi@42: Gtk::RadioButton node, edge; hegyi@42: }; hegyi@42: hegyi@42: #endif //NEWMAPWIN_H