gui/new_map_win.h
changeset 1832 d0c28d9c9141
parent 1814 0f02ced2e2ba
child 1837 8dd6160ff699
equal deleted inserted replaced
2:b23c83a2330e 3:4c7d2a702034
    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);
    56 
    53 
    57   std::map<char, std::string> ch2var;
    54   std::map<char, std::string> ch2var;
    58 
    55 
    59   Gtk::Entry name, default_value;
    56   Gtk::Entry name, default_value;
    60 
    57 
    61   Gtk::VBox vbox;
       
    62 
       
    63   Gtk::Button * button;
       
    64 
       
    65   Gtk::Table * table;
    58   Gtk::Table * table;
    66   Gtk::Label * label;
    59   Gtk::Label * label;
    67 
    60 
    68   Gtk::RadioButton node, edge;
    61   Gtk::RadioButton node, edge;
    69 };
    62 };