gui/algobox.cc
changeset 1884 9c061834b33b
parent 1879 01d41844ef46
child 1886 8b225c2935e7
     1.1 --- a/gui/algobox.cc	Fri Jan 06 14:44:04 2006 +0000
     1.2 +++ b/gui/algobox.cc	Fri Jan 06 16:07:08 2006 +0000
     1.3 @@ -73,11 +73,13 @@
     1.4      }
     1.5    for(int i=0;i<(int)nodemapcbts.size();i++)
     1.6      {
     1.7 -      update_cbt(nml, *(nodemapcbts[i]));
     1.8 +      (nodemapcbts[i])->update_list(nml);
     1.9 +      //update_cbt(nml, *(nodemapcbts[i]));
    1.10      }
    1.11    for(int i=0;i<(int)edgemapcbts.size();i++)
    1.12      {
    1.13 -      update_cbt(eml, *(edgemapcbts[i]));
    1.14 +      (edgemapcbts[i])->update_list(eml);
    1.15 +      //update_cbt(eml, *(edgemapcbts[i]));
    1.16      }
    1.17  }
    1.18  
    1.19 @@ -106,7 +108,7 @@
    1.20  {
    1.21    pack_start(*(new Gtk::HSeparator()));
    1.22  
    1.23 -  label=new Gtk::Label("Specific part for each algorithm.");
    1.24 +  Gtk::Label * label=new Gtk::Label("Specific part for each algorithm.");
    1.25        
    1.26    pack_start(*label);
    1.27    pack_start(*(new Gtk::HSeparator()));
    1.28 @@ -118,17 +120,15 @@
    1.29    nodemapcbts.resize(NODE_INPUT_NUM);
    1.30    for(int i=0;i<(int)nodemapcbts.size();i++)
    1.31      {
    1.32 -      Gtk::HBox * hbox=new Gtk::HBox();
    1.33 +      std::vector<std::string> empty_vector;
    1.34  
    1.35        std::ostringstream o;
    1.36        o << "NodeInput " << i+1 << ":";
    1.37 -      label=new Gtk::Label(o.str());
    1.38  
    1.39 -      nodemapcbts[i]=new Gtk::ComboBoxText();
    1.40 +      nodemapcbts[i]=new MapSelector(empty_vector,"",o.str(),false, false);
    1.41 +      nodemapcbts[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
    1.42  
    1.43 -      hbox->pack_start(*label);
    1.44 -      hbox->pack_start(*(nodemapcbts[i]));
    1.45 -      pack_start(*hbox);
    1.46 +      pack_start(*(nodemapcbts[i]));
    1.47      }
    1.48  
    1.49    pack_start(*(new Gtk::HSeparator()));
    1.50 @@ -136,17 +136,15 @@
    1.51    edgemapcbts.resize(EDGE_INPUT_NUM);
    1.52    for(int i=0;i<(int)edgemapcbts.size();i++)
    1.53      {
    1.54 -      Gtk::HBox * hbox=new Gtk::HBox();
    1.55 +      std::vector<std::string> empty_vector;
    1.56  
    1.57        std::ostringstream o;
    1.58        o << "EdgeInput " << i+1 << ":";
    1.59 -      label=new Gtk::Label(o.str());
    1.60  
    1.61 -      edgemapcbts[i]=new Gtk::ComboBoxText();
    1.62 +      edgemapcbts[i]=new MapSelector(empty_vector,"",o.str(),true, false);
    1.63 +      edgemapcbts[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &AlgoBox::emit_new_map_signal));
    1.64  
    1.65 -      hbox->pack_start(*label);
    1.66 -      hbox->pack_start(*(edgemapcbts[i]));
    1.67 -      pack_start(*hbox);
    1.68 +      pack_start(*(edgemapcbts[i]));
    1.69      }
    1.70  
    1.71    pack_start(*(new Gtk::HSeparator()));
    1.72 @@ -170,3 +168,8 @@
    1.73        update_maplist(NULL);
    1.74      }
    1.75  }
    1.76 +
    1.77 +void AlgoBox::emit_new_map_signal(bool itisedge)
    1.78 +{
    1.79 +  signal_newmapwin_need.emit(tabcbt.get_active_text(), itisedge);
    1.80 +}