summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/PatchCanvas.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-03-12 18:13:03 +0000
committerDavid Robillard <d@drobilla.net>2007-03-12 18:13:03 +0000
commitcd3dffb1d8838e813cfbf58d27e212db7f8eb0af (patch)
tree62ab746043feb0e70c3335c548c7fdc1d741a31c /src/progs/ingenuity/PatchCanvas.h
parent6d03649eb75291abf2900a062ed0b7dcdb5dca86 (diff)
downloadingen-cd3dffb1d8838e813cfbf58d27e212db7f8eb0af.tar.gz
ingen-cd3dffb1d8838e813cfbf58d27e212db7f8eb0af.tar.bz2
ingen-cd3dffb1d8838e813cfbf58d27e212db7f8eb0af.zip
Removed name-based interface for FlowCanvas (using the view as a model = evil), related performance improvements (especially for Machina).
Updates for FlowCanvas API changes. Machina SMF import performance improvements (temporarily disabled node labels). git-svn-id: http://svn.drobilla.net/lad/ingen@356 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/PatchCanvas.h')
-rw-r--r--src/progs/ingenuity/PatchCanvas.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h
index 56b463eb..f76e0c94 100644
--- a/src/progs/ingenuity/PatchCanvas.h
+++ b/src/progs/ingenuity/PatchCanvas.h
@@ -19,11 +19,12 @@
#define PATCHCANVAS_H
#include <string>
+#include <map>
#include <boost/shared_ptr.hpp>
#include <flowcanvas/FlowCanvas.h>
#include <flowcanvas/Module.h>
-#include "raul/SharedPtr.h"
-#include "raul/Path.h"
+#include <raul/SharedPtr.h>
+#include <raul/Path.h>
#include "ConnectionModel.h"
#include "PatchModel.h"
#include "NodeModule.h"
@@ -54,10 +55,10 @@ public:
virtual ~PatchCanvas() {}
- boost::shared_ptr<NodeModule> find_module(const string& name) {
+ /*boost::shared_ptr<NodeModule> find_module(const string& name) {
return boost::dynamic_pointer_cast<NodeModule>(
FlowCanvas::get_item(name));
- }
+ }*/
void build();
@@ -66,7 +67,7 @@ public:
void add_port(SharedPtr<PortModel> pm);
void remove_port(SharedPtr<PortModel> pm);
void connection(SharedPtr<ConnectionModel> cm);
- void disconnection(const Path& src_port_path, const Path& dst_port_path);
+ void disconnection(SharedPtr<ConnectionModel> cm);
void get_new_module_location(double& x, double& y);
@@ -87,6 +88,8 @@ private:
bool canvas_event(GdkEvent* event);
+ SharedPtr<LibFlowCanvas::Port> get_port_view(SharedPtr<PortModel> port);
+
void connect(boost::shared_ptr<LibFlowCanvas::Connectable> src,
boost::shared_ptr<LibFlowCanvas::Connectable> dst);
@@ -95,6 +98,9 @@ private:
SharedPtr<PatchModel> _patch;
+ typedef std::map<SharedPtr<ObjectModel>, SharedPtr<LibFlowCanvas::Module> > Views;
+ Views _views;
+
int _last_click_x;
int _last_click_y;