author | hegyi |
Thu, 20 Oct 2005 15:50:23 +0000 | |
branch | gui |
changeset 81 | 5ad61c33487c |
parent 30 | f70bbee5350a |
permissions | -rw-r--r-- |
hegyi@17 | 1 |
// -*- C++ -*- // |
hegyi@17 | 2 |
|
hegyi@17 | 3 |
#ifndef BROKEN_EDGE_H |
hegyi@17 | 4 |
#define BROKEN_EDGE_H |
hegyi@17 | 5 |
|
hegyi@21 | 6 |
class BrokenEdge; |
hegyi@21 | 7 |
|
ladanyi@53 | 8 |
#include "all_include.h" |
hegyi@17 | 9 |
#include <libgnomecanvasmm.h> |
hegyi@17 | 10 |
#include <libgnomecanvasmm/polygon.h> |
ladanyi@53 | 11 |
#include "graph_displayer_canvas.h" |
hegyi@25 | 12 |
#include <lemon/xy.h> |
hegyi@17 | 13 |
|
hegyi@17 | 14 |
class BrokenEdge : public Gnome::Canvas::Line |
hegyi@17 | 15 |
{ |
hegyi@21 | 16 |
GraphDisplayerCanvas & gdc; |
hegyi@19 | 17 |
Gnome::Canvas::Polygon * arrow; |
hegyi@19 | 18 |
Gnome::Art::Point * my_points; |
hegyi@19 | 19 |
|
hegyi@21 | 20 |
|
hegyi@19 | 21 |
///Indicates whether the button of mouse is pressed or not |
hegyi@19 | 22 |
bool isbutton; |
hegyi@19 | 23 |
|
hegyi@19 | 24 |
///At this location was the mousebutton pressed. |
hegyi@19 | 25 |
///It helps to calculate the distance of dragging. |
hegyi@19 | 26 |
double clicked_x, clicked_y; |
hegyi@19 | 27 |
|
hegyi@19 | 28 |
///event handler for forming edges |
hegyi@30 | 29 |
bool edgeFormerEventHandler(GdkEvent*); |
hegyi@17 | 30 |
public: |
hegyi@21 | 31 |
BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &); |
hegyi@19 | 32 |
~BrokenEdge(); |
hegyi@30 | 33 |
void setPoints(Gnome::Canvas::Points, bool move=false); |
hegyi@30 | 34 |
xy<double> getArrowPos(); |
hegyi@17 | 35 |
}; |
hegyi@17 | 36 |
|
hegyi@17 | 37 |
|
hegyi@17 | 38 |
#endif //BROKEN_EDGE_H |
hegyi@17 | 39 |