1.1 --- a/new_map_win.cc Wed Nov 30 13:24:23 2005 +0000
1.2 +++ b/new_map_win.cc Tue Dec 06 10:53:38 2005 +0000
1.3 @@ -9,7 +9,7 @@
1.4 return true;
1.5 }
1.6
1.7 -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")
1.8 +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")
1.9 {
1.10 set_default_size(200, 50);
1.11
1.12 @@ -83,11 +83,11 @@
1.13 if(edge.get_active())
1.14 {
1.15 //create the new map
1.16 - Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mainwin.mapstorage.graph);
1.17 + Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mytab.mapstorage.graph);
1.18
1.19 std::stack<double> polishstack;
1.20
1.21 - for(EdgeIt k(mainwin.mapstorage.graph); k!=INVALID; ++k)
1.22 + for(EdgeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
1.23 {
1.24 for(int i=0;i<(int)polishform.size();i++)
1.25 {
1.26 @@ -106,11 +106,11 @@
1.27 break;
1.28 default:
1.29 //substitute variable
1.30 - std::map< std::string,Graph::EdgeMap<double> * > ems=mainwin.mapstorage.edgemap_storage;
1.31 + std::map< std::string,Graph::EdgeMap<double> * > ems=mytab.mapstorage.edgemap_storage;
1.32 bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
1.33 if(itisvar)
1.34 {
1.35 - polishstack.push( (*(mainwin.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.36 + polishstack.push( (*(mytab.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.37 }
1.38 else
1.39 {
1.40 @@ -153,13 +153,13 @@
1.41
1.42 //if addition was not successful addEdgeMap returns one.
1.43 //cause can be that there is already a map named like the new one
1.44 - if(mainwin.mapstorage.addEdgeMap(mapname, emptr, def_val))
1.45 + if(mytab.mapstorage.addEdgeMap(mapname, emptr, def_val))
1.46 {
1.47 abortion=1;
1.48 }
1.49
1.50 //add it to the list of the displayable maps
1.51 - mainwin.registerNewEdgeMap(mapname);
1.52 + mytab.registerNewEdgeMap(mapname);
1.53
1.54 //display it
1.55 //gdc.changeEdgeText(mapname);
1.56 @@ -167,11 +167,11 @@
1.57 else //!edge.get_active()
1.58 {
1.59 //create the new map
1.60 - Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mainwin.mapstorage.graph);
1.61 + Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mytab.mapstorage.graph);
1.62
1.63 std::stack<double> polishstack;
1.64
1.65 - for(NodeIt k(mainwin.mapstorage.graph); k!=INVALID; ++k)
1.66 + for(NodeIt k(mytab.mapstorage.graph); k!=INVALID; ++k)
1.67 {
1.68 for(int i=0;i<(int)polishform.size();i++)
1.69 {
1.70 @@ -189,11 +189,11 @@
1.71 polishstack.pop();
1.72 break;
1.73 default:
1.74 - std::map< std::string,Graph::NodeMap<double> * > nms=mainwin.mapstorage.nodemap_storage;
1.75 + std::map< std::string,Graph::NodeMap<double> * > nms=mytab.mapstorage.nodemap_storage;
1.76 bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
1.77 if(itisvar)
1.78 {
1.79 - polishstack.push( (*(mainwin.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.80 + polishstack.push( (*(mytab.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.81 }
1.82 else
1.83 {
1.84 @@ -236,13 +236,13 @@
1.85
1.86 //if addition was not successful addNodeMap returns one.
1.87 //cause can be that there is already a map named like the new one
1.88 - if(mainwin.mapstorage.addNodeMap(mapname,emptr, def_val))
1.89 + if(mytab.mapstorage.addNodeMap(mapname,emptr, def_val))
1.90 {
1.91 abortion=1;
1.92 }
1.93
1.94 //add it to the list of the displayable maps
1.95 - mainwin.registerNewNodeMap(mapname);
1.96 + mytab.registerNewNodeMap(mapname);
1.97
1.98 //display it
1.99 //gdc.changeNodeText(mapname);
1.100 @@ -431,11 +431,11 @@
1.101 //is it mapname?
1.102 if(itisedge)
1.103 {
1.104 - cancel=(mainwin.mapstorage.edgemap_storage.find(variable)==mainwin.mapstorage.edgemap_storage.end());
1.105 + cancel=(mytab.mapstorage.edgemap_storage.find(variable)==mytab.mapstorage.edgemap_storage.end());
1.106 }
1.107 else
1.108 {
1.109 - cancel=(mainwin.mapstorage.nodemap_storage.find(variable)==mainwin.mapstorage.nodemap_storage.end());
1.110 + cancel=(mytab.mapstorage.nodemap_storage.find(variable)==mytab.mapstorage.nodemap_storage.end());
1.111 }
1.112 //maybe it is number
1.113 int point_num=0;