gui/new_map_win.h
changeset 1843 1e386f4047c9
parent 1823 cb082cdf3667
child 1849 a4d1362397fe
equal deleted inserted replaced
3:4c7d2a702034 4:36b1e00e2b13
     4 #define NEWMAPWIN_H
     4 #define NEWMAPWIN_H
     5 
     5 
     6 class NewMapWin;
     6 class NewMapWin;
     7 
     7 
     8 #include <all_include.h>
     8 #include <all_include.h>
     9 #include <graph_displayer_canvas.h>
     9 #include <main_win.h>
    10 #include <libgnomecanvasmm.h>
    10 #include <libgnomecanvasmm.h>
    11 #include <libgnomecanvasmm/polygon.h>
    11 #include <libgnomecanvasmm/polygon.h>
    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::Dialog
    17 class NewMapWin : public Gtk::Dialog
    18 {
    18 {
    19   ///The \ref GraphDisplayerCanvas on which the graph will be drawn.
    19   MainWin & mainwin;
    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;
       
    24 
    20 
    25 public:
    21 public:
    26   struct tree_node
    22   struct tree_node
    27   {
    23   {
    28     char ch;
    24     char ch;
    29     tree_node * left_child;
    25     tree_node * left_child;
    30     tree_node * right_child;
    26     tree_node * right_child;
    31   };
    27   };
    32   
    28   
    33   ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
    29   ///Constructor of NewMapWin creates the widgets shown in NewMapWin.
    34   NewMapWin(const std::string& title, GraphDisplayerCanvas &, bool itisedge=true, bool edgenode=true);
    30   NewMapWin(const std::string& title, MainWin &, bool itisedge=true, bool edgenode=true);
    35   
    31   
    36   ///Signal on button is connected to this function,
    32   ///Signal on button is connected to this function,
    37   ///Therefore this function determines whether to
    33   ///Therefore this function determines whether to
    38   ///call the map/creatort function, and if yes, it
    34   ///call the map/creatort function, and if yes, it
    39   //tells it the attributes.(name, default value)
    35   //tells it the attributes.(name, default value)