COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/broken_edge.h @ 1501:39d59aee2a1a

Last change on this file since 1501:39d59aee2a1a was 1501:39d59aee2a1a, checked in by Hegyi Péter, 19 years ago

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 :-)

File size: 856 bytes
Line 
1// -*- C++ -*- //
2
3#ifndef BROKEN_EDGE_H
4#define BROKEN_EDGE_H
5
6class BrokenEdge;
7
8#include <all_include.h>
9#include <libgnomecanvasmm.h>
10#include <libgnomecanvasmm/polygon.h>
11#include <graph_displayer_canvas.h>
12
13class 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
Note: See TracBrowser for help on using the repository browser.