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