equal
deleted
inserted
replaced
12 #include <lemon/xy.h> |
12 #include <lemon/xy.h> |
13 |
13 |
14 ///This class is the canvas, on which the graph can be drawn. |
14 ///This class is the canvas, on which the graph can be drawn. |
15 class GraphDisplayerCanvas : public Gnome::Canvas::CanvasAA |
15 class GraphDisplayerCanvas : public Gnome::Canvas::CanvasAA |
16 { |
16 { |
|
17 friend class BrokenEdge; |
|
18 |
17 class BrokenEdge : public Gnome::Canvas::Line |
19 class BrokenEdge : public Gnome::Canvas::Line |
18 { |
20 { |
|
21 Edge edge; |
19 GraphDisplayerCanvas & gdc; |
22 GraphDisplayerCanvas & gdc; |
20 Gnome::Canvas::Polygon * arrow; |
23 Gnome::Canvas::Polygon * arrow; |
21 Gnome::Art::Point * my_points; |
|
22 |
|
23 |
24 |
24 ///Indicates whether the button of mouse is pressed or not |
25 ///Indicates whether the button of mouse is pressed or not |
25 bool isbutton; |
26 bool isbutton; |
26 |
27 |
27 ///At this location was the mousebutton pressed. |
28 ///At this location was the mousebutton pressed. |
29 double clicked_x, clicked_y; |
30 double clicked_x, clicked_y; |
30 |
31 |
31 ///event handler for forming edges |
32 ///event handler for forming edges |
32 bool edgeFormerEventHandler(GdkEvent*); |
33 bool edgeFormerEventHandler(GdkEvent*); |
33 public: |
34 public: |
34 BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &); |
35 BrokenEdge(Gnome::Canvas::Group &, Edge, GraphDisplayerCanvas &); |
35 ~BrokenEdge(); |
36 ~BrokenEdge(); |
36 void setPoints(Gnome::Canvas::Points, bool move=false); |
37 void draw(); |
37 xy<double> getArrowPos(); |
|
38 }; |
38 }; |
39 typedef Gnome::Canvas::CanvasAA Parent; |
39 typedef Gnome::Canvas::CanvasAA Parent; |
40 |
40 |
41 public: |
41 public: |
42 GraphDisplayerCanvas(NoteBookTab &); |
42 GraphDisplayerCanvas(NoteBookTab &); |
198 private: |
198 private: |
199 |
199 |
200 ///reference to the parent window |
200 ///reference to the parent window |
201 NoteBookTab & mytab; |
201 NoteBookTab & mytab; |
202 |
202 |
|
203 XY GraphDisplayerCanvas::calcArrowPos(XY, XY, XY, XY, bool); |
203 }; |
204 }; |
204 |
205 |
205 #endif //GRAPH_DISPLAYER_CANVAS_H |
206 #endif //GRAPH_DISPLAYER_CANVAS_H |