1.1 --- a/gui/new_map_win.cc Tue Nov 29 08:43:50 2005 +0000
1.2 +++ b/gui/new_map_win.cc Tue Nov 29 19:31:58 2005 +0000
1.3 @@ -9,7 +9,7 @@
1.4 return true;
1.5 }
1.6
1.7 -NewMapWin::NewMapWin(const std::string& title, GraphDisplayerCanvas & grdispc, bool itisedge, bool edgenode):Gtk::Dialog(title, true, true),gdc(grdispc),node("Create NodeMap"),edge("Create EdgeMap")
1.8 +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.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> (gdc.mapstorage.graph);
1.17 + Graph::EdgeMap<double> * emptr=new Graph::EdgeMap<double> (mainwin.mapstorage.graph);
1.18
1.19 std::stack<double> polishstack;
1.20
1.21 - for(EdgeIt k(gdc.mapstorage.graph); k!=INVALID; ++k)
1.22 + for(EdgeIt k(mainwin.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=gdc.mapstorage.edgemap_storage;
1.31 + std::map< std::string,Graph::EdgeMap<double> * > ems=mainwin.mapstorage.edgemap_storage;
1.32 bool itisvar=(ems.find(ch2var[ polishform[i] ])!=ems.end());
1.33 if(itisvar)
1.34 {
1.35 - polishstack.push( (*(gdc.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.36 + polishstack.push( (*(mainwin.mapstorage.edgemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.37 }
1.38 else
1.39 {
1.40 @@ -153,25 +153,25 @@
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(gdc.mapstorage.addEdgeMap(mapname, emptr, def_val))
1.45 + if(mainwin.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 - gdc.mapwin.registerNewEdgeMap(mapname);
1.52 + mainwin.registerNewEdgeMap(mapname);
1.53
1.54 //display it
1.55 - gdc.changeEdgeText(mapname);
1.56 + //gdc.changeEdgeText(mapname);
1.57 }
1.58 else //!edge.get_active()
1.59 {
1.60 //create the new map
1.61 - Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (gdc.mapstorage.graph);
1.62 + Graph::NodeMap<double> * emptr=new Graph::NodeMap<double> (mainwin.mapstorage.graph);
1.63
1.64 std::stack<double> polishstack;
1.65
1.66 - for(NodeIt k(gdc.mapstorage.graph); k!=INVALID; ++k)
1.67 + for(NodeIt k(mainwin.mapstorage.graph); k!=INVALID; ++k)
1.68 {
1.69 for(int i=0;i<(int)polishform.size();i++)
1.70 {
1.71 @@ -189,11 +189,11 @@
1.72 polishstack.pop();
1.73 break;
1.74 default:
1.75 - std::map< std::string,Graph::NodeMap<double> * > nms=gdc.mapstorage.nodemap_storage;
1.76 + std::map< std::string,Graph::NodeMap<double> * > nms=mainwin.mapstorage.nodemap_storage;
1.77 bool itisvar=(nms.find(ch2var[ polishform[i] ])!=nms.end());
1.78 if(itisvar)
1.79 {
1.80 - polishstack.push( (*(gdc.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.81 + polishstack.push( (*(mainwin.mapstorage.nodemap_storage[ ch2var[ polishform[i] ] ]))[k]);
1.82 }
1.83 else
1.84 {
1.85 @@ -236,13 +236,13 @@
1.86
1.87 //if addition was not successful addNodeMap returns one.
1.88 //cause can be that there is already a map named like the new one
1.89 - if(gdc.mapstorage.addNodeMap(mapname,emptr, def_val))
1.90 + if(mainwin.mapstorage.addNodeMap(mapname,emptr, def_val))
1.91 {
1.92 abortion=1;
1.93 }
1.94
1.95 //add it to the list of the displayable maps
1.96 - gdc.mapwin.registerNewNodeMap(mapname);
1.97 + mainwin.registerNewNodeMap(mapname);
1.98
1.99 //display it
1.100 //gdc.changeNodeText(mapname);
1.101 @@ -431,11 +431,11 @@
1.102 //is it mapname?
1.103 if(itisedge)
1.104 {
1.105 - cancel=(gdc.mapstorage.edgemap_storage.find(variable)==gdc.mapstorage.edgemap_storage.end());
1.106 + cancel=(mainwin.mapstorage.edgemap_storage.find(variable)==mainwin.mapstorage.edgemap_storage.end());
1.107 }
1.108 else
1.109 {
1.110 - cancel=(gdc.mapstorage.nodemap_storage.find(variable)==gdc.mapstorage.nodemap_storage.end());
1.111 + cancel=(mainwin.mapstorage.nodemap_storage.find(variable)==mainwin.mapstorage.nodemap_storage.end());
1.112 }
1.113 //maybe it is number
1.114 int point_num=0;