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