summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/OmModule.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-13 06:11:25 +0000
committerDavid Robillard <d@drobilla.net>2006-09-13 06:11:25 +0000
commite5675ebfeb93175e16762d0a078bd51d15d05f63 (patch)
tree189249ed9014e4c482cfaed0d6af28ced68570ca /src/progs/ingenuity/OmModule.h
parent23b7568ab7a87a79c186b8ddf3d3db4f1f934b06 (diff)
downloadingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.tar.gz
ingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.tar.bz2
ingen-e5675ebfeb93175e16762d0a078bd51d15d05f63.zip
Heavy-duty redesign of client library and GUI (now fully signal driven with clean Model/View separation).
Smarter, centralized window creation/management (should make window unification easy (panes?)). Typed metadata system, no more fugly string conversion of floats. Supports OSC fundamental types string, int, float, blob for now (though blob isn't working over the wire yet). git-svn-id: http://svn.drobilla.net/lad/ingen@131 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/OmModule.h')
-rw-r--r--src/progs/ingenuity/OmModule.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/progs/ingenuity/OmModule.h b/src/progs/ingenuity/OmModule.h
index a3d56187..243c31e7 100644
--- a/src/progs/ingenuity/OmModule.h
+++ b/src/progs/ingenuity/OmModule.h
@@ -14,17 +14,18 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#ifndef OMMODULE_H
#define OMMODULE_H
#include <string>
#include <libgnomecanvasmm.h>
#include <flowcanvas/Module.h>
+#include "NodeMenu.h"
#include "util/CountedPtr.h"
-#include "NodeController.h"
using std::string;
+class Atom;
+
namespace Ingen { namespace Client {
class PortModel;
class NodeModel;
@@ -34,7 +35,6 @@ using namespace Ingen::Client;
namespace Ingenuity {
-class PatchController;
class OmFlowCanvas;
class OmPort;
@@ -49,7 +49,7 @@ class OmPort;
class OmModule : public LibFlowCanvas::Module
{
public:
- OmModule(OmFlowCanvas* canvas, NodeController* node);
+ OmModule(OmFlowCanvas* canvas, CountedPtr<NodeModel> node);
virtual ~OmModule() {}
virtual OmPort* port(const string& port_name) {
@@ -59,17 +59,24 @@ public:
virtual void store_location();
void move_to(double x, double y);
- void on_right_click(GdkEventButton* event) { m_node->show_menu(event); }
+ void on_right_click(GdkEventButton* event);
void show_control_window();
- NodeController* node() const { return m_node; }
+ CountedPtr<NodeModel> node() const { return m_node; }
protected:
virtual void on_double_click(GdkEventButton* ev) { show_control_window(); }
virtual void on_middle_click(GdkEventButton* ev) { show_control_window(); }
- NodeController* m_node;
+ void metadata_update(const string& key, const Atom& value);
+
+ void create_all_ports();
+ void add_port(CountedPtr<PortModel> port);
+ void remove_port(CountedPtr<PortModel> port);
+
+ CountedPtr<NodeModel> m_node;
+ NodeMenu m_menu;
};