broken_edge.h
author hegyi
Fri, 17 Jun 2005 12:25:53 +0000
branchgui
changeset 21 44bb92014108
parent 20 a3bd39d50930
child 25 c45a34eaa118
permissions -rw-r--r--
Very small bug is corrected: if node creator tool is active, the small red arrows won't move, if you click on them and if you drag the newly created node... 'was hard to notice it :-)
     1 // -*- C++ -*- //
     2 
     3 #ifndef BROKEN_EDGE_H
     4 #define BROKEN_EDGE_H
     5 
     6 class BrokenEdge;
     7 
     8 #include <all_include.h>
     9 #include <libgnomecanvasmm.h>
    10 #include <libgnomecanvasmm/polygon.h>
    11 #include <graph_displayer_canvas.h>
    12 
    13 class BrokenEdge : public Gnome::Canvas::Line
    14 {
    15   GraphDisplayerCanvas & gdc;
    16   Gnome::Canvas::Polygon * arrow;
    17   Gnome::Art::Point * my_points;
    18 
    19 
    20   ///Indicates whether the button of mouse is pressed or not
    21   bool isbutton;
    22 
    23   ///At this location was the mousebutton pressed.
    24   ///It helps to calculate the distance of dragging.
    25   double clicked_x, clicked_y;
    26 
    27   ///event handler for forming edges
    28   bool edge_former_event_handler(GdkEvent*);
    29  public:
    30   BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &);
    31   ~BrokenEdge();
    32   void set_points(Gnome::Canvas::Points, bool move=false);
    33 };
    34 
    35 
    36 #endif //BROKEN_EDGE_H
    37