18#ifndef FLOWCANVAS_CONNECTION_HPP
19#define FLOWCANVAS_CONNECTION_HPP
26#include <boost/weak_ptr.hpp>
28#include <libgnomecanvasmm.h>
29#include <libgnomecanvasmm/bpath.h>
30#include <libgnomecanvasmm/path-def.h>
46 boost::shared_ptr<Connectable>
source,
47 boost::shared_ptr<Connectable>
dest,
49 bool show_arrow_head =
false);
53 virtual void move(
double ,
double )
56 virtual void zoom(
double z);
73 const boost::weak_ptr<Connectable>
dest()
const {
return _dest; }
89 const boost::weak_ptr<Connectable>
_source;
90 const boost::weak_ptr<Connectable>
_dest;
96 struct Handle :
public Gnome::Canvas::Group {
97 explicit Handle(Gnome::Canvas::Group& parent)
The 'master' canvas widget which contains all other objects.
Definition: Canvas.hpp:61
An object a Connection can connect to.
Definition: Connectable.hpp:32
A connection (line) between two canvas objects.
Definition: Connection.hpp:43
void set_handle_style(HandleStyle s)
Definition: Connection.hpp:81
void set_color(uint32_t color)
const boost::weak_ptr< Connectable > _dest
Definition: Connection.hpp:90
HandleStyle _handle_style
Definition: Connection.hpp:105
void set_label(const std::string &str)
Gnome::Canvas::Bpath _bpath
Definition: Connection.hpp:92
bool _show_arrowhead
Definition: Connection.hpp:108
bool _selected
Definition: Connection.hpp:107
const boost::weak_ptr< Connectable > _source
Definition: Connection.hpp:89
const boost::weak_ptr< Connectable > dest() const
Definition: Connection.hpp:73
HandleStyle
Definition: Connection.hpp:75
@ HANDLE_RECT
Definition: Connection.hpp:77
@ HANDLE_NONE
Definition: Connection.hpp:76
@ HANDLE_CIRCLE
Definition: Connection.hpp:78
virtual void move(double, double)
Definition: Connection.hpp:53
void show_handle(bool show)
void set_selected(bool b)
const boost::weak_ptr< Canvas > _canvas
Definition: Connection.hpp:88
uint32_t _color
Definition: Connection.hpp:104
bool selected() const
Definition: Connection.hpp:58
GnomeCanvasPathDef * _path
Definition: Connection.hpp:93
FlowCanvas::Connection::Handle * _handle
void set_highlighted(bool b)
Connection(boost::shared_ptr< Canvas > canvas, boost::shared_ptr< Connectable > source, boost::shared_ptr< Connectable > dest, uint32_t color, bool show_arrow_head=false)
virtual void zoom(double z)
const boost::weak_ptr< Connectable > source() const
Definition: Connection.hpp:72
virtual double length_hint() const
Definition: Connection.hpp:61
FlowCanvas namespace, everything is defined under this.
Definition: Canvas.hpp:38
std::list< boost::shared_ptr< Connection > > ConnectionList
Definition: Connection.hpp:111
A handle on a connection line to allow mouse interaction.
Definition: Connection.hpp:96
Gnome::Canvas::Shape * shape
Definition: Connection.hpp:100
~Handle()
Definition: Connection.hpp:99
Gnome::Canvas::Text * text
Definition: Connection.hpp:101
Handle(Gnome::Canvas::Group &parent)
Definition: Connection.hpp:97