summaryrefslogtreecommitdiffstats
path: root/src/progs/gtk/PortController.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-17 23:47:42 +0000
committerDavid Robillard <d@drobilla.net>2006-06-17 23:47:42 +0000
commitc6d42dbbf9f6872d4fed67aecde8f7a65effab08 (patch)
tree424f7ec643cf81b8282e6404ac56d81e4ef34021 /src/progs/gtk/PortController.cpp
parent471c9e43493ab1d3a83ed6a8ca53bd818a2ed275 (diff)
downloadingen-c6d42dbbf9f6872d4fed67aecde8f7a65effab08.tar.gz
ingen-c6d42dbbf9f6872d4fed67aecde8f7a65effab08.tar.bz2
ingen-c6d42dbbf9f6872d4fed67aecde8f7a65effab08.zip
New patch ports interface
git-svn-id: http://svn.drobilla.net/lad/grauph@48 a436a847-0d15-0410-975c-d299462d15a1
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