gui/broken_edge.h
changeset 1503 97836166605d
parent 1500 a222eb109e52
child 1505 7121597da9ba
equal deleted inserted replaced
2:81928319ab86 3:adf88a6aaf8b
     1 // -*- C++ -*- //
     1 // -*- C++ -*- //
     2 
     2 
     3 #ifndef BROKEN_EDGE_H
     3 #ifndef BROKEN_EDGE_H
     4 #define BROKEN_EDGE_H
     4 #define BROKEN_EDGE_H
     5 
     5 
       
     6 class BrokenEdge;
       
     7 
     6 #include <all_include.h>
     8 #include <all_include.h>
     7 #include <libgnomecanvasmm.h>
     9 #include <libgnomecanvasmm.h>
     8 #include <libgnomecanvasmm/polygon.h>
    10 #include <libgnomecanvasmm/polygon.h>
       
    11 #include <graph_displayer_canvas.h>
     9 
    12 
    10 class BrokenEdge : public Gnome::Canvas::Line
    13 class BrokenEdge : public Gnome::Canvas::Line
    11 {
    14 {
       
    15   GraphDisplayerCanvas & gdc;
    12   Gnome::Canvas::Polygon * arrow;
    16   Gnome::Canvas::Polygon * arrow;
    13   Gnome::Art::Point * my_points;
    17   Gnome::Art::Point * my_points;
       
    18 
    14 
    19 
    15   ///Indicates whether the button of mouse is pressed or not
    20   ///Indicates whether the button of mouse is pressed or not
    16   bool isbutton;
    21   bool isbutton;
    17 
    22 
    18   ///At this location was the mousebutton pressed.
    23   ///At this location was the mousebutton pressed.
    20   double clicked_x, clicked_y;
    25   double clicked_x, clicked_y;
    21 
    26 
    22   ///event handler for forming edges
    27   ///event handler for forming edges
    23   bool edge_former_event_handler(GdkEvent*);
    28   bool edge_former_event_handler(GdkEvent*);
    24  public:
    29  public:
    25   BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points);
    30   BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &);
    26   ~BrokenEdge();
    31   ~BrokenEdge();
    27   void set_points(Gnome::Canvas::Points, bool move=false);
    32   void set_points(Gnome::Canvas::Points, bool move=false);
    28 };
    33 };
    29 
    34 
    30 
    35