1 #include "graph_displayer_canvas.h" |
1 #include "graph_displayer_canvas.h" |
2 #include "broken_edge.h" |
2 #include "broken_edge.h" |
3 #include <math.h> |
3 #include <math.h> |
4 |
4 |
5 GraphDisplayerCanvas::GraphDisplayerCanvas(MapStorage & ms, MapWin & mw) : |
5 GraphDisplayerCanvas::GraphDisplayerCanvas(MapStorage & ms, MapWin & mw, Gtk::Window * mainwin) : |
6 nodesmap(ms.graph), edgesmap(ms.graph), edgetextmap(ms.graph), |
6 nodesmap(ms.graph), edgesmap(ms.graph), edgetextmap(ms.graph), |
7 nodetextmap(ms.graph), displayed_graph(*(root()), 0, 0), |
7 nodetextmap(ms.graph), displayed_graph(*(root()), 0, 0), |
8 canvasentrywidget(NULL), mapstorage(ms), isbutton(0), active_item(NULL), |
8 canvasentrywidget(NULL), mapstorage(ms), isbutton(0), active_item(NULL), |
9 target_item(NULL), nodemap_to_edit(""), edgemap_to_edit(""), mapwin(mw) |
9 target_item(NULL), nodemap_to_edit(""), edgemap_to_edit(""), mapwin(mw) |
10 { |
10 { |
|
11 parentwin=mainwin; |
|
12 |
11 //base event handler is move tool |
13 //base event handler is move tool |
12 actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false); |
14 actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false); |
13 actual_tool=MOVE; |
15 actual_tool=MOVE; |
14 |
16 |
15 //setting event handler for the editor widget |
17 //setting event handler for the editor widget |