COIN-OR::LEMON - Graph Library

Changeset 1589:9192e1b26d32 in lemon-0.x for gui


Ignore:
Timestamp:
07/26/05 20:14:23 (19 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2093
Message:

creates one new edgemap

Location:
gui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • gui/graph_displayer_canvas-edge.cc

    r1581 r1589  
    107107int GraphDisplayerCanvas::changeEdgeText (std::string mapname, Graph::Edge edge)
    108108{
    109 
    110109  //the number in the map will be written on the edge
    111   //EXCEPT when the name of the map is Text, because
     110  //EXCEPT when the name of the map is Default, because
    112111  //in that case empty string will be written, because
    113112  //that is the deleter map
  • gui/graph_displayer_canvas-event.cc

    r1586 r1589  
    806806void GraphDisplayerCanvas::addNewEdgeMap()
    807807{
    808   Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (g);
     808  Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (g,20);
    809809  mapstorage.addEdgeMap("NewEdgeMap",emptr);
    810810  mapwin->registerNewEdgeMap("NewEdgeMap");
    811   std::cout << "Add New EdgeMap is not yet implemented." << std::endl;
     811  changeEdgeText("NewEdgeMap");
    812812}
    813813
  • gui/graph_displayer_canvas.h

    r1585 r1589  
    150150
    151151  ///Here we store the maps that can be displayed through properties.
    152   MapStorage mapstorage;
     152  MapStorage & mapstorage;
    153153
    154154  ///Indicates whether the button of mouse is pressed or not
  • gui/map_win.cc

    r1586 r1589  
    123123void MapWin::eComboChanged(int prop)
    124124{
     125
    125126  Gtk::Entry* entry = e_combo_array[prop].get_entry();
    126127
     
    250251}
    251252
    252 void MapWin::registerNewEdgeMap(std::string)
    253 {
    254   std::cout << "void MapWin::registerNewEdgeMap(std::string) is not yet implemented" << std::endl;
    255 }
    256 
    257 void MapWin::registerNewNodeMap(std::string)
    258 {
    259   std::cout << "void MapWin::registerNewNodeMap(std::string) is not yet implemented" << std::endl;
    260 }
     253void MapWin::registerNewEdgeMap(std::string newmapname)
     254{
     255  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
     256  {
     257    //filling in combo box with choices
     258    std::list<Glib::ustring> listStrings=e_combo_array[i].get_popdown_strings();
     259    listStrings.push_back(newmapname);
     260    e_combo_array[i].set_popdown_strings(listStrings);
     261  }
     262  Gtk::Entry* entry = e_combo_array[E_TEXT].get_entry();
     263  entry->set_text((Glib::ustring)newmapname);
     264}
     265
     266void MapWin::registerNewNodeMap(std::string newmapname)
     267{
     268  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
     269  {
     270    //filling in combo box with choices
     271    std::list<Glib::ustring> listStrings=n_combo_array[i].get_popdown_strings();
     272    listStrings.push_back(newmapname);
     273    n_combo_array[i].set_popdown_strings(listStrings);
     274  }
     275}
Note: See TracChangeset for help on using the changeset viewer.