Rev | Line | |
---|
[1497] | 1 | // -*- C++ -*- // |
---|
| 2 | |
---|
| 3 | #ifndef BROKEN_EDGE_H |
---|
| 4 | #define BROKEN_EDGE_H |
---|
| 5 | |
---|
[1501] | 6 | class BrokenEdge; |
---|
| 7 | |
---|
[1606] | 8 | #include "all_include.h" |
---|
[1497] | 9 | #include <libgnomecanvasmm.h> |
---|
| 10 | #include <libgnomecanvasmm/polygon.h> |
---|
[1606] | 11 | #include "graph_displayer_canvas.h" |
---|
[1505] | 12 | #include <lemon/xy.h> |
---|
[1497] | 13 | |
---|
| 14 | class BrokenEdge : public Gnome::Canvas::Line |
---|
| 15 | { |
---|
[1501] | 16 | GraphDisplayerCanvas & gdc; |
---|
[1499] | 17 | Gnome::Canvas::Polygon * arrow; |
---|
| 18 | Gnome::Art::Point * my_points; |
---|
| 19 | |
---|
[1501] | 20 | |
---|
[1499] | 21 | ///Indicates whether the button of mouse is pressed or not |
---|
| 22 | bool isbutton; |
---|
| 23 | |
---|
| 24 | ///At this location was the mousebutton pressed. |
---|
| 25 | ///It helps to calculate the distance of dragging. |
---|
| 26 | double clicked_x, clicked_y; |
---|
| 27 | |
---|
| 28 | ///event handler for forming edges |
---|
[1524] | 29 | bool edgeFormerEventHandler(GdkEvent*); |
---|
[1497] | 30 | public: |
---|
[1501] | 31 | BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &); |
---|
[1499] | 32 | ~BrokenEdge(); |
---|
[1524] | 33 | void setPoints(Gnome::Canvas::Points, bool move=false); |
---|
| 34 | xy<double> getArrowPos(); |
---|
[1497] | 35 | }; |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | #endif //BROKEN_EDGE_H |
---|
| 39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.