Changeset 1837:8dd6160ff699 in lemon-0.x for gui/map_win.cc
- Timestamp:
- 11/29/05 20:31:58 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2389
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gui/map_win.cc
r1823 r1837 11 11 } 12 12 13 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst)13 MapWin::MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, MainWin & mw):mainwin(mw) 14 14 { 15 15 set_title(title); … … 24 24 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 25 25 { 26 e_combo_array[i]=new MapSelector( gdc, ms, i, true);26 e_combo_array[i]=new MapSelector(eml, i, true); 27 27 28 28 (*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)); 29 32 } 30 33 … … 41 44 for(int i=0;i<NODE_PROPERTY_NUM;i++) 42 45 { 43 n_combo_array[i]=new MapSelector( gdc, ms, i, false);46 n_combo_array[i]=new MapSelector(nml, i, false); 44 47 45 48 (*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)); 46 52 } 47 53 … … 56 62 } 57 63 58 void MapWin::update() 64 void MapWin::nodeMapChanged(std::string mapname, int prop) 65 { 66 mainwin.propertyChange(false, prop, mapname); 67 } 68 69 void MapWin::edgeMapChanged(std::string mapname, int prop) 70 { 71 mainwin.propertyChange(true, prop, mapname); 72 } 73 74 void MapWin::newMapWinNeeded(bool itisedge, int prop) 75 { 76 mainwin.popupNewMapWin(itisedge, prop); 77 } 78 79 void MapWin::update(std::vector<std::string> eml, std::vector<std::string> nml) 59 80 { 60 81 for(int i=0;i<EDGE_PROPERTY_NUM;i++) 61 82 { 62 e_combo_array[i]->update_list( );83 e_combo_array[i]->update_list(eml); 63 84 } 64 85 65 86 for(int i=0;i<NODE_PROPERTY_NUM;i++) 66 87 { 67 n_combo_array[i]->update_list( );88 n_combo_array[i]->update_list(nml); 68 89 } 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 }86 90 } 87 91
Note: See TracChangeset
for help on using the changeset viewer.