creates one new edgemap gui
authorhegyi
Tue, 26 Jul 2005 18:14:23 +0000
branchgui
changeset 40cebacea4f965
parent 39 959c499e3b65
child 41 06f1f9a8d51f
creates one new edgemap
graph_displayer_canvas-edge.cc
graph_displayer_canvas-event.cc
graph_displayer_canvas.h
map_win.cc
     1.1 --- a/graph_displayer_canvas-edge.cc	Tue Jul 26 14:31:29 2005 +0000
     1.2 +++ b/graph_displayer_canvas-edge.cc	Tue Jul 26 18:14:23 2005 +0000
     1.3 @@ -106,9 +106,8 @@
     1.4  
     1.5  int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Graph::Edge edge)
     1.6  {
     1.7 -
     1.8    //the number in the map will be written on the edge
     1.9 -  //EXCEPT when the name of the map is Text, because
    1.10 +  //EXCEPT when the name of the map is Default, because
    1.11    //in that case empty string will be written, because
    1.12    //that is the deleter map
    1.13  
     2.1 --- a/graph_displayer_canvas-event.cc	Tue Jul 26 14:31:29 2005 +0000
     2.2 +++ b/graph_displayer_canvas-event.cc	Tue Jul 26 18:14:23 2005 +0000
     2.3 @@ -805,10 +805,10 @@
     2.4  
     2.5  void GraphDisplayerCanvas::addNewEdgeMap()
     2.6  {
     2.7 -  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (g);
     2.8 +  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (g,20);
     2.9    mapstorage.addEdgeMap("NewEdgeMap",emptr);
    2.10    mapwin->registerNewEdgeMap("NewEdgeMap");
    2.11 -  std::cout << "Add New EdgeMap is not yet implemented." << std::endl;
    2.12 +  changeEdgeText("NewEdgeMap");
    2.13  }
    2.14  
    2.15  void GraphDisplayerCanvas::addNewNodeMap()
     3.1 --- a/graph_displayer_canvas.h	Tue Jul 26 14:31:29 2005 +0000
     3.2 +++ b/graph_displayer_canvas.h	Tue Jul 26 18:14:23 2005 +0000
     3.3 @@ -149,7 +149,7 @@
     3.4    Gnome::Canvas::Widget * canvasentrywidget;
     3.5  
     3.6    ///Here we store the maps that can be displayed through properties.
     3.7 -  MapStorage mapstorage;
     3.8 +  MapStorage & mapstorage;
     3.9  
    3.10    ///Indicates whether the button of mouse is pressed or not
    3.11    int isbutton;
     4.1 --- a/map_win.cc	Tue Jul 26 14:31:29 2005 +0000
     4.2 +++ b/map_win.cc	Tue Jul 26 18:14:23 2005 +0000
     4.3 @@ -122,6 +122,7 @@
     4.4  
     4.5  void MapWin::eComboChanged(int prop)
     4.6  {
     4.7 +
     4.8    Gtk::Entry* entry = e_combo_array[prop].get_entry();
     4.9  
    4.10    if(entry)
    4.11 @@ -249,12 +250,26 @@
    4.12      }
    4.13  }
    4.14  
    4.15 -void MapWin::registerNewEdgeMap(std::string)
    4.16 +void MapWin::registerNewEdgeMap(std::string newmapname)
    4.17  {
    4.18 -  std::cout << "void MapWin::registerNewEdgeMap(std::string) is not yet implemented" << std::endl;
    4.19 +  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    4.20 +  {
    4.21 +    //filling in combo box with choices
    4.22 +    std::list<Glib::ustring> listStrings=e_combo_array[i].get_popdown_strings();
    4.23 +    listStrings.push_back(newmapname);
    4.24 +    e_combo_array[i].set_popdown_strings(listStrings);
    4.25 +  }
    4.26 +  Gtk::Entry* entry = e_combo_array[E_TEXT].get_entry();
    4.27 +  entry->set_text((Glib::ustring)newmapname);
    4.28  }
    4.29  
    4.30 -void MapWin::registerNewNodeMap(std::string)
    4.31 +void MapWin::registerNewNodeMap(std::string newmapname)
    4.32  {
    4.33 -  std::cout << "void MapWin::registerNewNodeMap(std::string) is not yet implemented" << std::endl;
    4.34 +  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    4.35 +  {
    4.36 +    //filling in combo box with choices
    4.37 +    std::list<Glib::ustring> listStrings=n_combo_array[i].get_popdown_strings();
    4.38 +    listStrings.push_back(newmapname);
    4.39 +    n_combo_array[i].set_popdown_strings(listStrings);
    4.40 +  }
    4.41  }