diff -r 628c0b383d2f -r e664d8aa3f72 new_map_win.cc --- a/new_map_win.cc Wed Nov 30 13:24:23 2005 +0000 +++ b/new_map_win.cc Tue Dec 06 10:53:38 2005 +0000 @@ -9,7 +9,7 @@ return true; } -NewMapWin::NewMapWin(const std::string& title, MainWin & mw, bool itisedge, bool edgenode):Gtk::Dialog(title, true, true),mainwin(mw),node("Create NodeMap"),edge("Create EdgeMap") +NewMapWin::NewMapWin(const std::string& title, NoteBookTab & mw, bool itisedge, bool edgenode):Gtk::Dialog(title, true, true),mytab(mw),node("Create NodeMap"),edge("Create EdgeMap") { set_default_size(200, 50); @@ -83,11 +83,11 @@ if(edge.get_active()) { //create the new map - Graph::EdgeMap * emptr=new Graph::EdgeMap (mainwin.mapstorage.graph); + Graph::EdgeMap * emptr=new Graph::EdgeMap (mytab.mapstorage.graph); std::stack polishstack; - for(EdgeIt k(mainwin.mapstorage.graph); k!=INVALID; ++k) + for(EdgeIt k(mytab.mapstorage.graph); k!=INVALID; ++k) { for(int i=0;i<(int)polishform.size();i++) { @@ -106,11 +106,11 @@ break; default: //substitute variable - std::map< std::string,Graph::EdgeMap * > ems=mainwin.mapstorage.edgemap_storage; + std::map< std::string,Graph::EdgeMap * > ems=mytab.mapstorage.edgemap_storage; bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end()); if(itisvar) { - polishstack.push( (*(mainwin.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]); + polishstack.push( (*(mytab.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]); } else { @@ -153,13 +153,13 @@ //if addition was not successful addEdgeMap returns one. //cause can be that there is already a map named like the new one - if(mainwin.mapstorage.addEdgeMap(mapname, emptr, def_val)) + if(mytab.mapstorage.addEdgeMap(mapname, emptr, def_val)) { abortion=1; } //add it to the list of the displayable maps - mainwin.registerNewEdgeMap(mapname); + mytab.registerNewEdgeMap(mapname); //display it //gdc.changeEdgeText(mapname); @@ -167,11 +167,11 @@ else //!edge.get_active() { //create the new map - Graph::NodeMap * emptr=new Graph::NodeMap (mainwin.mapstorage.graph); + Graph::NodeMap * emptr=new Graph::NodeMap (mytab.mapstorage.graph); std::stack polishstack; - for(NodeIt k(mainwin.mapstorage.graph); k!=INVALID; ++k) + for(NodeIt k(mytab.mapstorage.graph); k!=INVALID; ++k) { for(int i=0;i<(int)polishform.size();i++) { @@ -189,11 +189,11 @@ polishstack.pop(); break; default: - std::map< std::string,Graph::NodeMap * > nms=mainwin.mapstorage.nodemap_storage; + std::map< std::string,Graph::NodeMap * > nms=mytab.mapstorage.nodemap_storage; bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end()); if(itisvar) { - polishstack.push( (*(mainwin.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]); + polishstack.push( (*(mytab.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]); } else { @@ -236,13 +236,13 @@ //if addition was not successful addNodeMap returns one. //cause can be that there is already a map named like the new one - if(mainwin.mapstorage.addNodeMap(mapname,emptr, def_val)) + if(mytab.mapstorage.addNodeMap(mapname,emptr, def_val)) { abortion=1; } //add it to the list of the displayable maps - mainwin.registerNewNodeMap(mapname); + mytab.registerNewNodeMap(mapname); //display it //gdc.changeNodeText(mapname); @@ -431,11 +431,11 @@ //is it mapname? if(itisedge) { - cancel=(mainwin.mapstorage.edgemap_storage.find(variable)==mainwin.mapstorage.edgemap_storage.end()); + cancel=(mytab.mapstorage.edgemap_storage.find(variable)==mytab.mapstorage.edgemap_storage.end()); } else { - cancel=(mainwin.mapstorage.nodemap_storage.find(variable)==mainwin.mapstorage.nodemap_storage.end()); + cancel=(mytab.mapstorage.nodemap_storage.find(variable)==mytab.mapstorage.nodemap_storage.end()); } //maybe it is number int point_num=0;