diff -r 291764ce6d91 -r a4d1362397fe gui/graph_displayer_canvas.cc --- a/gui/graph_displayer_canvas.cc Mon Dec 05 17:03:58 2005 +0000 +++ b/gui/graph_displayer_canvas.cc Tue Dec 06 10:53:38 2005 +0000 @@ -1,11 +1,11 @@ #include "graph_displayer_canvas.h" #include -GraphDisplayerCanvas::GraphDisplayerCanvas(MainWin & mainw) : +GraphDisplayerCanvas::GraphDisplayerCanvas(NoteBookTab & mainw) : nodesmap(mainw.mapstorage.graph), edgesmap(mainw.mapstorage.graph), edgetextmap(mainw.mapstorage.graph), nodetextmap(mainw.mapstorage.graph), displayed_graph(*(root()), 0, 0), isbutton(0), active_item(NULL), target_item(NULL), nodemap_to_edit(""), - edgemap_to_edit(""), mainwin(mainw) + edgemap_to_edit(""), mytab(mainw) { //base event handler is move tool actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false); @@ -18,13 +18,13 @@ GraphDisplayerCanvas::~GraphDisplayerCanvas() { - for (NodeIt n((mainwin.mapstorage).graph); n != INVALID; ++n) + for (NodeIt n((mytab.mapstorage).graph); n != INVALID; ++n) { delete nodesmap[n]; delete nodetextmap[n]; } - for (EdgeIt e((mainwin.mapstorage).graph); e != INVALID; ++e) + for (EdgeIt e((mytab.mapstorage).graph); e != INVALID; ++e) { delete edgesmap[e]; delete edgetextmap[e]; @@ -63,11 +63,11 @@ { dummy=dummy; - std::string mapname=mainwin.getActiveNodeMap(prop); + std::string mapname=mytab.getActiveNodeMap(prop); if(mapname!="") { - if( ( ((mainwin.mapstorage).nodemap_storage).find(mapname) != ((mainwin.mapstorage).nodemap_storage).end() ) ) + if( ( ((mytab.mapstorage).nodemap_storage).find(mapname) != ((mytab.mapstorage).nodemap_storage).end() ) ) { switch(prop) { @@ -110,11 +110,11 @@ { dummy=dummy; - std::string mapname=mainwin.getActiveEdgeMap(prop); + std::string mapname=mytab.getActiveEdgeMap(prop); if(mapname!="") { - if( ( ((mainwin.mapstorage).edgemap_storage).find(mapname) != ((mainwin.mapstorage).edgemap_storage).end() ) ) + if( ( ((mytab.mapstorage).edgemap_storage).find(mapname) != ((mytab.mapstorage).edgemap_storage).end() ) ) { switch(prop) { @@ -155,18 +155,18 @@ { //first edges are drawn, to hide joining with nodes later - for (EdgeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i) + for (EdgeIt i((mytab.mapstorage).graph); i!=INVALID; ++i) { //drawing green lines, coordinates are from mapstorage.coords Gnome::Canvas::Points coos; coos.push_back(Gnome::Art::Point( - (mainwin.mapstorage).coords[(mainwin.mapstorage).graph.source(i)].x, - (mainwin.mapstorage).coords[(mainwin.mapstorage).graph.source(i)].y)); + (mytab.mapstorage).coords[(mytab.mapstorage).graph.source(i)].x, + (mytab.mapstorage).coords[(mytab.mapstorage).graph.source(i)].y)); coos.push_back(Gnome::Art::Point( - (mainwin.mapstorage).coords[(mainwin.mapstorage).graph.target(i)].x, - (mainwin.mapstorage).coords[(mainwin.mapstorage).graph.target(i)].y)); + (mytab.mapstorage).coords[(mytab.mapstorage).graph.target(i)].x, + (mytab.mapstorage).coords[(mytab.mapstorage).graph.target(i)].y)); edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this); *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green"); @@ -186,16 +186,16 @@ //afterwards nodes come to be drawn - for (NodeIt i((mainwin.mapstorage).graph); i!=INVALID; ++i) + for (NodeIt i((mytab.mapstorage).graph); i!=INVALID; ++i) { //drawing bule nodes, with black line around them nodesmap[i]=new Gnome::Canvas::Ellipse( displayed_graph, - (mainwin.mapstorage).coords[i].x-20, - (mainwin.mapstorage).coords[i].y-20, - (mainwin.mapstorage).coords[i].x+20, - (mainwin.mapstorage).coords[i].y+20); + (mytab.mapstorage).coords[i].x-20, + (mytab.mapstorage).coords[i].y-20, + (mytab.mapstorage).coords[i].x+20, + (mytab.mapstorage).coords[i].y+20); *(nodesmap[i]) << Gnome::Canvas::Properties::fill_color("blue"); *(nodesmap[i]) << Gnome::Canvas::Properties::outline_color("black"); nodesmap[i]->raise_to_top(); @@ -203,8 +203,8 @@ //initializing edge-text as well, to empty string xy text_pos( - ((mainwin.mapstorage).coords[i].x+node_property_defaults[N_RADIUS]+5), - ((mainwin.mapstorage).coords[i].y+node_property_defaults[N_RADIUS]+5)); + ((mytab.mapstorage).coords[i].x+node_property_defaults[N_RADIUS]+5), + ((mytab.mapstorage).coords[i].y+node_property_defaults[N_RADIUS]+5)); nodetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, ""); @@ -222,13 +222,13 @@ active_edge=INVALID; forming_edge=INVALID; - for (NodeIt n((mainwin.mapstorage).graph); n != INVALID; ++n) + for (NodeIt n((mytab.mapstorage).graph); n != INVALID; ++n) { delete nodesmap[n]; delete nodetextmap[n]; } - for (EdgeIt e((mainwin.mapstorage).graph); e != INVALID; ++e) + for (EdgeIt e((mytab.mapstorage).graph); e != INVALID; ++e) { delete edgesmap[e]; delete edgetextmap[e];