gui/graph_displayer_canvas.h
changeset 1819 fd82adfbe905
parent 1814 0f02ced2e2ba
child 1837 8dd6160ff699
     1.1 --- a/gui/graph_displayer_canvas.h	Mon Nov 21 09:08:16 2005 +0000
     1.2 +++ b/gui/graph_displayer_canvas.h	Mon Nov 21 12:07:05 2005 +0000
     1.3 @@ -7,14 +7,36 @@
     1.4  
     1.5  #include "all_include.h"
     1.6  #include "mapstorage.h"
     1.7 -#include "broken_edge.h"
     1.8  #include "map_win.h"
     1.9  #include <libgnomecanvasmm.h>
    1.10  #include <libgnomecanvasmm/polygon.h>
    1.11 +#include <lemon/xy.h>
    1.12  
    1.13  ///This class is the canvas, on which the graph can be drawn.
    1.14  class GraphDisplayerCanvas : public Gnome::Canvas::CanvasAA
    1.15  {
    1.16 +  class BrokenEdge : public Gnome::Canvas::Line
    1.17 +  {
    1.18 +    GraphDisplayerCanvas & gdc;
    1.19 +    Gnome::Canvas::Polygon * arrow;
    1.20 +    Gnome::Art::Point * my_points;
    1.21 +
    1.22 +
    1.23 +    ///Indicates whether the button of mouse is pressed or not
    1.24 +    bool isbutton;
    1.25 +
    1.26 +    ///At this location was the mousebutton pressed.
    1.27 +    ///It helps to calculate the distance of dragging.
    1.28 +    double clicked_x, clicked_y;
    1.29 +
    1.30 +    ///event handler for forming edges
    1.31 +    bool edgeFormerEventHandler(GdkEvent*);
    1.32 +  public:
    1.33 +    BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &);
    1.34 +    ~BrokenEdge();
    1.35 +    void setPoints(Gnome::Canvas::Points, bool move=false);
    1.36 +    xy<double> getArrowPos();
    1.37 +  };
    1.38    typedef Gnome::Canvas::CanvasAA Parent;
    1.39  
    1.40  public: