60 mapstorage.coords[mapstorage.graph.target(i)].y)); |
60 mapstorage.coords[mapstorage.graph.target(i)].y)); |
61 |
61 |
62 edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this); |
62 edgesmap[i]=new BrokenEdge(displayed_graph, coos, *this); |
63 *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green"); |
63 *(edgesmap[i]) << Gnome::Canvas::Properties::fill_color("green"); |
64 edgesmap[i]->property_width_units().set_value(10); |
64 edgesmap[i]->property_width_units().set_value(10); |
|
65 edgesmap[i]->lower_to_bottom(); |
65 |
66 |
66 //initializing edge-text as well, to empty string |
67 //initializing edge-text as well, to empty string |
67 |
68 |
68 xy<double> text_pos=edgesmap[i]->getArrowPos(); |
69 xy<double> text_pos=edgesmap[i]->getArrowPos(); |
69 text_pos+=(xy<double>(10,10)); |
70 text_pos+=(xy<double>(10,10)); |
70 |
71 |
71 edgetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, ""); |
72 edgetextmap[i]=new Gnome::Canvas::Text(displayed_graph, text_pos.x, text_pos.y, ""); |
72 edgetextmap[i]->property_fill_color().set_value("darkgreen"); |
73 edgetextmap[i]->property_fill_color().set_value("darkgreen"); |
73 edgetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::edgeMapEditEventHandler), false); |
74 edgetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::edgeMapEditEventHandler), false); |
|
75 edgetextmap[i]->raise_to_top(); |
74 } |
76 } |
75 |
77 |
76 //afterwards nodes come to be drawn |
78 //afterwards nodes come to be drawn |
77 |
79 |
78 for (NodeIt i(mapstorage.graph); i!=INVALID; ++i) |
80 for (NodeIt i(mapstorage.graph); i!=INVALID; ++i) |
85 mapstorage.coords[i].y-20, |
87 mapstorage.coords[i].y-20, |
86 mapstorage.coords[i].x+20, |
88 mapstorage.coords[i].x+20, |
87 mapstorage.coords[i].y+20); |
89 mapstorage.coords[i].y+20); |
88 *(nodesmap[i]) << Gnome::Canvas::Properties::fill_color("blue"); |
90 *(nodesmap[i]) << Gnome::Canvas::Properties::fill_color("blue"); |
89 *(nodesmap[i]) << Gnome::Canvas::Properties::outline_color("black"); |
91 *(nodesmap[i]) << Gnome::Canvas::Properties::outline_color("black"); |
|
92 nodesmap[i]->raise_to_top(); |
90 |
93 |
91 //initializing edge-text as well, to empty string |
94 //initializing edge-text as well, to empty string |
92 |
95 |
93 xy<double> text_pos( |
96 xy<double> text_pos( |
94 (mapstorage.coords[i].x+node_property_defaults[N_RADIUS]+5), |
97 (mapstorage.coords[i].x+node_property_defaults[N_RADIUS]+5), |
96 |
99 |
97 nodetextmap[i]=new Gnome::Canvas::Text(displayed_graph, |
100 nodetextmap[i]=new Gnome::Canvas::Text(displayed_graph, |
98 text_pos.x, text_pos.y, ""); |
101 text_pos.x, text_pos.y, ""); |
99 nodetextmap[i]->property_fill_color().set_value("darkblue"); |
102 nodetextmap[i]->property_fill_color().set_value("darkblue"); |
100 nodetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::nodeMapEditEventHandler), false); |
103 nodetextmap[i]->signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::nodeMapEditEventHandler), false); |
|
104 nodetextmap[i]->raise_to_top(); |
101 } |
105 } |
102 |
106 |
103 updateScrollRegion(); |
107 updateScrollRegion(); |
104 } |
108 } |
105 |
109 |