summaryrefslogtreecommitdiffstats
path: root/src/progs/gtk/PortController.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/gtk/PortController.cpp')
-rw-r--r--src/progs/gtk/PortController.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/progs/gtk/PortController.cpp b/src/progs/gtk/PortController.cpp
index fcb93b30..cdae49f7 100644
--- a/src/progs/gtk/PortController.cpp
+++ b/src/progs/gtk/PortController.cpp
@@ -19,6 +19,7 @@
#include "PortModel.h"
#include "ControlPanel.h"
#include "OmPort.h"
+#include "OmPatchPort.h"
#include "Store.h"
namespace OmGtk {
@@ -26,6 +27,7 @@ namespace OmGtk {
PortController::PortController(CountedPtr<PortModel> model)
: GtkObjectController(model),
+ m_module(NULL),
m_port(NULL),
m_control_panel(NULL)
{
@@ -66,6 +68,23 @@ PortController::destroy()
void
+PortController::create_module(OmFlowCanvas* canvas, double x, double y)
+{
+ cerr << "Creating port module " << m_model->path() << endl;
+
+ assert(canvas);
+ assert(port_model());
+ m_module = new OmPortModule(canvas, this, x, y);
+
+ // FIXME: leak
+ m_patch_port = new OmPatchPort(m_module, port_model());
+ m_module->add_port(m_patch_port, false);
+
+ m_module->move_to(x, y);
+}
+
+
+void
PortController::metadata_update(const string& key, const string& value)
{
// FIXME: double lookups