COIN-OR::LEMON - Graph Library

Changeset 1837:8dd6160ff699 in lemon-0.x for gui/map_win.cc


Ignore:
Timestamp:
11/29/05 20:31:58 (15 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2389
Message:

Structure of GUI is now more clear-cut than before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/map_win.cc

    r1823 r1837  
    1111}
    1212
    13 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst)
     13MapWin::MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, MainWin & mw):mainwin(mw)
    1414{
    1515  set_title(title);
     
    2424  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    2525  {
    26     e_combo_array[i]=new MapSelector(gdc, ms, i, true);
     26    e_combo_array[i]=new MapSelector(eml, i, true);
    2727
    2828    (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
     29
     30    e_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::edgeMapChanged), i));
     31    e_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i));
    2932  }
    3033
     
    4144  for(int i=0;i<NODE_PROPERTY_NUM;i++)
    4245  {
    43     n_combo_array[i]=new MapSelector(gdc, ms, i, false);
     46    n_combo_array[i]=new MapSelector(nml, i, false);
    4447
    4548    (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
     49
     50    n_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::nodeMapChanged), i));
     51    n_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i));
    4652  }
    4753
     
    5662}
    5763
    58 void MapWin::update()
     64void MapWin::nodeMapChanged(std::string mapname, int prop)
     65{
     66  mainwin.propertyChange(false, prop, mapname);
     67}
     68
     69void MapWin::edgeMapChanged(std::string mapname, int prop)
     70{
     71  mainwin.propertyChange(true, prop, mapname);
     72}
     73
     74void MapWin::newMapWinNeeded(bool itisedge, int prop)
     75{
     76  mainwin.popupNewMapWin(itisedge, prop);
     77}
     78
     79void MapWin::update(std::vector<std::string> eml, std::vector<std::string> nml)
    5980{
    6081  for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    6182  {
    62     e_combo_array[i]->update_list();
     83    e_combo_array[i]->update_list(eml);
    6384  }
    6485
    6586  for(int i=0;i<NODE_PROPERTY_NUM;i++)
    6687  {
    67     n_combo_array[i]->update_list();
     88    n_combo_array[i]->update_list(nml);
    6889  }
    69 }
    70 
    71 
    72 void MapWin::updateNode(Node node)
    73 {
    74   for(int i=0;i<NODE_PROPERTY_NUM;i++)
    75     {
    76       n_combo_array[i]->update(node);
    77     }
    78 }
    79 
    80 void MapWin::updateEdge(Edge edge)
    81 {
    82   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
    83     {
    84       e_combo_array[i]->update(edge);
    85     }
    8690}
    8791
Note: See TracChangeset for help on using the changeset viewer.