broken_edge.h
author hegyi
Fri, 17 Jun 2005 14:20:49 +0000
branchgui
changeset 22 c4d09637b2f8
parent 20 a3bd39d50930
child 25 c45a34eaa118
permissions -rw-r--r--
Three commits, one after the other! 81 is my, 82 is my fiancee's, 83 is my younger sister's birthyear :) In this commit Alpar's wish came true: editorial buttons are now available directly on toolbar.
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@21
     6
class BrokenEdge;
hegyi@21
     7
hegyi@17
     8
#include <all_include.h>
hegyi@17
     9
#include <libgnomecanvasmm.h>
hegyi@17
    10
#include <libgnomecanvasmm/polygon.h>
hegyi@21
    11
#include <graph_displayer_canvas.h>
hegyi@17
    12
hegyi@17
    13
class BrokenEdge : public Gnome::Canvas::Line
hegyi@17
    14
{
hegyi@21
    15
  GraphDisplayerCanvas & gdc;
hegyi@19
    16
  Gnome::Canvas::Polygon * arrow;
hegyi@19
    17
  Gnome::Art::Point * my_points;
hegyi@19
    18
hegyi@21
    19
hegyi@19
    20
  ///Indicates whether the button of mouse is pressed or not
hegyi@19
    21
  bool isbutton;
hegyi@19
    22
hegyi@19
    23
  ///At this location was the mousebutton pressed.
hegyi@19
    24
  ///It helps to calculate the distance of dragging.
hegyi@19
    25
  double clicked_x, clicked_y;
hegyi@19
    26
hegyi@19
    27
  ///event handler for forming edges
hegyi@19
    28
  bool edge_former_event_handler(GdkEvent*);
hegyi@17
    29
 public:
hegyi@21
    30
  BrokenEdge(Gnome::Canvas::Group &, Gnome::Canvas::Points, GraphDisplayerCanvas &);
hegyi@19
    31
  ~BrokenEdge();
hegyi@20
    32
  void set_points(Gnome::Canvas::Points, bool move=false);
hegyi@17
    33
};
hegyi@17
    34
hegyi@17
    35
hegyi@17
    36
#endif //BROKEN_EDGE_H
hegyi@17
    37