summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/OmFlowCanvas.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/OmFlowCanvas.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/OmFlowCanvas.h')
-rw-r--r--src/progs/ingenuity/OmFlowCanvas.h39
1 files changed, 29 insertions, 10 deletions
diff --git a/src/progs/ingenuity/OmFlowCanvas.h b/src/progs/ingenuity/OmFlowCanvas.h
index 7db347f7..ae5501c4 100644
--- a/src/progs/ingenuity/OmFlowCanvas.h
+++ b/src/progs/ingenuity/OmFlowCanvas.h
@@ -19,17 +19,24 @@
#include <string>
#include <flowcanvas/FlowCanvas.h>
-
+#include "util/CountedPtr.h"
+#include "util/Path.h"
+#include "ConnectionModel.h"
+#include "PatchModel.h"
using std::string;
using namespace LibFlowCanvas;
using LibFlowCanvas::Port;
+using Ingen::Client::ConnectionModel;
+using Ingen::Client::PatchModel;
+using Ingen::Client::NodeModel;
+using Ingen::Client::MetadataMap;
namespace Ingenuity {
class OmModule;
-class PatchController;
+
/** Patch canvas widget.
*
@@ -38,16 +45,18 @@ class PatchController;
class OmFlowCanvas : public LibFlowCanvas::FlowCanvas
{
public:
- OmFlowCanvas(PatchController* controller, int width, int height);
+ OmFlowCanvas(CountedPtr<PatchModel> patch, int width, int height);
OmModule* find_module(const string& name)
{ return (OmModule*)FlowCanvas::get_module(name); }
- void connect(const Port* src_port, const Port* dst_port);
- void disconnect(const Port* src_port, const Port* dst_port);
-
+ void add_node(CountedPtr<NodeModel> nm);
+ void remove_node(CountedPtr<NodeModel> nm);
+ void connection(CountedPtr<ConnectionModel> cm);
+ void disconnection(const Path& src_port_path, const Path& dst_port_path);
+
void get_new_module_location(double& x, double& y);
- bool canvas_event(GdkEvent* event);
+
void destroy_selected();
void show_menu(GdkEvent* event)
@@ -65,10 +74,20 @@ private:
void menu_load_plugin();
void menu_new_patch();
void menu_load_patch();
+
+ MetadataMap get_initial_data();
+
+ void build_canvas();
+
+ bool canvas_event(GdkEvent* event);
+
+ void connect(const Port* src_port, const Port* dst_port);
+ void disconnect(const Port* src_port, const Port* dst_port);
+
+ CountedPtr<PatchModel> m_patch;
- PatchController* m_patch_controller;
- int m_last_click_x;
- int m_last_click_y;
+ int m_last_click_x;
+ int m_last_click_y;
Gtk::Menu* m_menu;
Gtk::MenuItem* m_menu_add_audio_input;