diff -r 8f9905c4e1c1 -r fd82adfbe905 gui/graph_displayer_canvas.h --- a/gui/graph_displayer_canvas.h Mon Nov 21 09:08:16 2005 +0000 +++ b/gui/graph_displayer_canvas.h Mon Nov 21 12:07:05 2005 +0000 @@ -7,14 +7,36 @@ #include "all_include.h" #include "mapstorage.h" -#include "broken_edge.h" #include "map_win.h" #include #include +#include ///This class is the canvas, on which the graph can be drawn. class GraphDisplayerCanvas : public Gnome::Canvas::CanvasAA { + class BrokenEdge : public Gnome::Canvas::Line + { + GraphDisplayerCanvas & gdc; + Gnome::Canvas::Polygon * arrow; + Gnome::Art::Point * my_points; + + + ///Indicates whether the button of mouse is pressed or not + bool isbutton; + + ///At this location was the mousebutton pressed. + ///It helps to calculate the distance of dragging. + double clicked_x, clicked_y; + + ///event handler for forming edges + bool edgeFormerEventHandler(GdkEvent*); + public: + BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &); + ~BrokenEdge(); + void setPoints(Gnome::Canvas::Points, bool move=false); + xy getArrowPos(); + }; typedef Gnome::Canvas::CanvasAA Parent; public: