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