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)
116 #endif // FLOWCANVAS_CONNECTION_HPP
Definition: Connection.hpp:78
Handle(Gnome::Canvas::Group &parent)
Definition: Connection.hpp:97
A connection (line) between two canvas objects.
Definition: Connection.hpp:42
Gnome::Canvas::Shape * shape
Definition: Connection.hpp:100
bool _selected
Definition: Connection.hpp:107
const boost::weak_ptr< Connectable > source() const
Definition: Connection.hpp:72
Connection(boost::shared_ptr< Canvas > canvas, boost::shared_ptr< Connectable > source, boost::shared_ptr< Connectable > dest, uint32_t color, bool show_arrow_head=false)
A handle on a connection line to allow mouse interaction.
Definition: Connection.hpp:96
void set_selected(bool b)
virtual void move(double, double)
Definition: Connection.hpp:53
const boost::weak_ptr< Connectable > _dest
Definition: Connection.hpp:90
Gnome::Canvas::Bpath _bpath
Definition: Connection.hpp:92
GnomeCanvasPathDef * _path
Definition: Connection.hpp:93
An object a Connection can connect to.
Definition: Connectable.hpp:32
uint32_t _color
Definition: Connection.hpp:104
void set_color(uint32_t color)
const boost::weak_ptr< Connectable > dest() const
Definition: Connection.hpp:73
bool selected() const
Definition: Connection.hpp:58
std::list< boost::shared_ptr< Connection > > ConnectionList
Definition: Connection.hpp:111
bool _show_arrowhead
Definition: Connection.hpp:108
void set_handle_style(HandleStyle s)
Definition: Connection.hpp:81
void set_highlighted(bool b)
FlowCanvas::Connection::Handle * _handle
Definition: Connection.hpp:76
void show_handle(bool show)
virtual void zoom(double z)
HandleStyle
Definition: Connection.hpp:75
The 'master' canvas widget which contains all other objects.
Definition: Canvas.hpp:58
void set_label(const std::string &str)
virtual double length_hint() const
Definition: Connection.hpp:61
FlowCanvas namespace, everything is defined under this.
Definition: Canvas.hpp:38
~Handle()
Definition: Connection.hpp:99
Gnome::Canvas::Text * text
Definition: Connection.hpp:101
const boost::weak_ptr< Canvas > _canvas
Definition: Connection.hpp:88
HandleStyle _handle_style
Definition: Connection.hpp:105
const boost::weak_ptr< Connectable > _source
Definition: Connection.hpp:89
Definition: Connection.hpp:77