gui/graph_displayer_canvas.cc
changeset 1569 2a455f46f85a
parent 1550 4dcbb4ab1d7a
child 1579 ed7da82bbecf
equal deleted inserted replaced
21:702d8a8f0a70 22:ee5a4c1b3eb8
     3 #include <math.h>
     3 #include <math.h>
     4 
     4 
     5 GraphDisplayerCanvas::GraphDisplayerCanvas(Graph & gr, CoordinatesMap & cm, MapStorage & ms, MapWin * mw):g(gr),nodesmap(g),edgesmap(g),edgetextmap(g),nodetextmap(g),displayed_graph(*(root()), 0, 0),canvasentrywidget(NULL),mapstorage(ms),isbutton(0),active_item(NULL),target_item(NULL),mapwin(mw)
     5 GraphDisplayerCanvas::GraphDisplayerCanvas(Graph & gr, CoordinatesMap & cm, MapStorage & ms, MapWin * mw):g(gr),nodesmap(g),edgesmap(g),edgetextmap(g),nodetextmap(g),displayed_graph(*(root()), 0, 0),canvasentrywidget(NULL),mapstorage(ms),isbutton(0),active_item(NULL),target_item(NULL),mapwin(mw)
     6 {
     6 {
     7   
     7   
       
     8   active_node=INVALID;
       
     9   active_edge=INVALID;
       
    10 
       
    11   //setting event handler for the editor widget
       
    12   entrywidget.signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::entryWidgetChangeHandler), false);
       
    13 
       
    14   //base event handler is move tool
     8   actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
    15   actual_handler=signal_event().connect(sigc::mem_fun(*this, &GraphDisplayerCanvas::moveEventHandler), false);
     9   actual_tool=CREATE_NODE;
    16   actual_tool=CREATE_NODE;
    10 
       
    11   active_node=INVALID;
       
    12   active_edge=INVALID;
       
    13 
    17 
    14   //set_center_scroll_region(true);
    18   //set_center_scroll_region(true);
    15 
    19 
    16   //first edges are drawn, to hide joining with nodes later
    20   //first edges are drawn, to hide joining with nodes later
    17 
    21