summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity')
-rw-r--r--src/progs/ingenuity/Connection.h13
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp8
-rw-r--r--src/progs/ingenuity/PatchCanvas.h8
3 files changed, 16 insertions, 13 deletions
diff --git a/src/progs/ingenuity/Connection.h b/src/progs/ingenuity/Connection.h
index 70c82f1d..f816bce2 100644
--- a/src/progs/ingenuity/Connection.h
+++ b/src/progs/ingenuity/Connection.h
@@ -27,18 +27,19 @@ using Ingen::Client::ConnectionModel;
namespace Ingenuity {
-/** A Connection on an Module.
+/** A Connection in a Patch.
*
* \ingroup Ingenuity
*/
class Connection : public LibFlowCanvas::Connection
{
public:
- Connection(boost::shared_ptr<LibFlowCanvas::FlowCanvas> canvas,
- boost::shared_ptr<ConnectionModel> model,
- boost::shared_ptr<LibFlowCanvas::Port> src,
- boost::shared_ptr<LibFlowCanvas::Port> dst)
- : LibFlowCanvas::Connection(canvas, src, dst)
+ Connection(boost::shared_ptr<LibFlowCanvas::FlowCanvas> canvas,
+ boost::shared_ptr<ConnectionModel> model,
+ boost::shared_ptr<LibFlowCanvas::Connectable> src,
+ boost::shared_ptr<LibFlowCanvas::Connectable> dst,
+ uint32_t color)
+ : LibFlowCanvas::Connection(canvas, src, dst, color)
, _connection_model(model)
{}
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index aab57a4e..54e90135 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -178,7 +178,7 @@ PatchCanvas::connection(SharedPtr<ConnectionModel> cm)
cerr << "DPN: " << dst_parent_name << endl;
if (src && dst)
- add_connection(boost::shared_ptr<Connection>(new Connection(shared_from_this(), cm, src, dst)));
+ add_connection(boost::shared_ptr<Connection>(new Connection(shared_from_this(), cm, src, dst, src->color() + 0xFFFFFF00)));
else
cerr << "[PatchCanvas] ERROR: Unable to find ports to connect "
<< cm->src_port_path() << " -> " << cm->dst_port_path() << endl;
@@ -225,7 +225,8 @@ PatchCanvas::disconnection(const Path& src_port_path, const Path& dst_port_path)
void
-PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::shared_ptr<LibFlowCanvas::Port> dst_port)
+PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Connectable> src_port,
+ boost::shared_ptr<LibFlowCanvas::Connectable> dst_port)
{
const boost::shared_ptr<Ingenuity::Port> src
= boost::dynamic_pointer_cast<Ingenuity::Port>(src_port);
@@ -267,7 +268,8 @@ PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::sha
void
-PatchCanvas::disconnect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::shared_ptr<LibFlowCanvas::Port> dst_port)
+PatchCanvas::disconnect(boost::shared_ptr<LibFlowCanvas::Connectable> src_port,
+ boost::shared_ptr<LibFlowCanvas::Connectable> dst_port)
{
const boost::shared_ptr<Ingenuity::Port> src
= boost::dynamic_pointer_cast<Ingenuity::Port>(src_port);
diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h
index 5d622f08..9c9734b3 100644
--- a/src/progs/ingenuity/PatchCanvas.h
+++ b/src/progs/ingenuity/PatchCanvas.h
@@ -86,11 +86,11 @@ private:
bool canvas_event(GdkEvent* event);
- void connect(boost::shared_ptr<LibFlowCanvas::Port> src,
- boost::shared_ptr<LibFlowCanvas::Port> dst);
+ void connect(boost::shared_ptr<LibFlowCanvas::Connectable> src,
+ boost::shared_ptr<LibFlowCanvas::Connectable> dst);
- void disconnect(boost::shared_ptr<LibFlowCanvas::Port> src,
- boost::shared_ptr<LibFlowCanvas::Port> dst);
+ void disconnect(boost::shared_ptr<LibFlowCanvas::Connectable> src,
+ boost::shared_ptr<LibFlowCanvas::Connectable> dst);
SharedPtr<PatchModel> _patch;