hegyi@1497: // -*- C++ -*- // hegyi@1497: hegyi@1497: #ifndef BROKEN_EDGE_H hegyi@1497: #define BROKEN_EDGE_H hegyi@1497: hegyi@1501: class BrokenEdge; hegyi@1501: ladanyi@1606: #include "all_include.h" hegyi@1497: #include hegyi@1497: #include ladanyi@1606: #include "graph_displayer_canvas.h" hegyi@1505: #include hegyi@1497: hegyi@1497: class BrokenEdge : public Gnome::Canvas::Line hegyi@1497: { hegyi@1501: GraphDisplayerCanvas & gdc; hegyi@1499: Gnome::Canvas::Polygon * arrow; hegyi@1499: Gnome::Art::Point * my_points; hegyi@1499: hegyi@1501: hegyi@1499: ///Indicates whether the button of mouse is pressed or not hegyi@1499: bool isbutton; hegyi@1499: hegyi@1499: ///At this location was the mousebutton pressed. hegyi@1499: ///It helps to calculate the distance of dragging. hegyi@1499: double clicked_x, clicked_y; hegyi@1499: hegyi@1499: ///event handler for forming edges hegyi@1524: bool edgeFormerEventHandler(GdkEvent*); hegyi@1497: public: hegyi@1501: BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &); hegyi@1499: ~BrokenEdge(); hegyi@1524: void setPoints(Gnome::Canvas::Points, bool move=false); hegyi@1524: xy getArrowPos(); hegyi@1497: }; hegyi@1497: hegyi@1497: hegyi@1497: #endif //BROKEN_EDGE_H hegyi@1497: