broken_edge.h
author hegyi
Thu, 16 Jun 2005 18:08:04 +0000
branchgui
changeset 19 164783ceb9be
parent 17 c95aff79e893
child 20 a3bd39d50930
permissions -rw-r--r--
Little red arrows appear in breakpoints of edges.
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@17
     6
#include <all_include.h>
hegyi@17
     7
#include <libgnomecanvasmm.h>
hegyi@17
     8
#include <libgnomecanvasmm/polygon.h>
hegyi@17
     9
hegyi@17
    10
class BrokenEdge : public Gnome::Canvas::Line
hegyi@17
    11
{
hegyi@19
    12
  Gnome::Canvas::Polygon * arrow;
hegyi@19
    13
  Gnome::Art::Point * my_points;
hegyi@19
    14
hegyi@19
    15
  ///Indicates whether the button of mouse is pressed or not
hegyi@19
    16
  bool isbutton;
hegyi@19
    17
hegyi@19
    18
  ///At this location was the mousebutton pressed.
hegyi@19
    19
  ///It helps to calculate the distance of dragging.
hegyi@19
    20
  double clicked_x, clicked_y;
hegyi@19
    21
hegyi@19
    22
  ///event handler for forming edges
hegyi@19
    23
  bool edge_former_event_handler(GdkEvent*);
hegyi@17
    24
 public:
hegyi@17
    25
  BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points);
hegyi@19
    26
  ~BrokenEdge();
hegyi@19
    27
  void set_points(Gnome::Canvas::Points);
hegyi@17
    28
};
hegyi@17
    29
hegyi@17
    30
hegyi@17
    31
#endif //BROKEN_EDGE_H
hegyi@17
    32