2 #include "broken_edge.h" |
2 #include "broken_edge.h" |
3 #include <cmath> |
3 #include <cmath> |
4 |
4 |
5 GraphDisplayerCanvas::GraphDisplayerCanvas(MapStorage & ms, MapWin & mw, Gtk::Window * mainwin) : |
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), mapstorage(ms), |
8 canvasentrywidget(NULL), mapstorage(ms), isbutton(0), active_item(NULL), |
8 isbutton(0), active_item(NULL), target_item(NULL), nodemap_to_edit(""), |
9 target_item(NULL), nodemap_to_edit(""), edgemap_to_edit(""), mapwin(mw) |
9 edgemap_to_edit(""), mapwin(mw) |
10 { |
10 { |
11 parentwin=mainwin; |
11 parentwin=mainwin; |
12 |
12 |
13 //base event handler is move tool |
13 //base event handler is move tool |
14 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); |
15 actual_tool=MOVE; |
15 actual_tool=MOVE; |
16 |
|
17 //setting event handler for the editor widget |
|
18 entrywidget.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::entryWidgetChangeHandler), false); |
|
19 |
16 |
20 active_node=INVALID; |
17 active_node=INVALID; |
21 active_edge=INVALID; |
18 active_edge=INVALID; |
22 forming_edge=INVALID; |
19 forming_edge=INVALID; |
23 } |
20 } |