aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/MachinaCanvas.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-13 07:49:49 +0000
committerDavid Robillard <d@drobilla.net>2013-01-13 07:49:49 +0000
commit67a8adbc93991acfb688f378f52392995a272fac (patch)
treea4e629bd9c0d7da4cc5c7cb644b3352ca6f0dc78 /src/gui/MachinaCanvas.hpp
parent33aa54fa98783d1da2a322ee136c17df7f9c98a5 (diff)
downloadmachina-67a8adbc93991acfb688f378f52392995a272fac.tar.gz
machina-67a8adbc93991acfb688f378f52392995a272fac.tar.bz2
machina-67a8adbc93991acfb688f378f52392995a272fac.zip
Change model to have a single initial node.
Merge multiple recording into branches off the same initial node. Make transport state sane with 3 distinct states. Handle announcing objects several times correctly. Don't send useless zero coordinates for new nodes, position in visible area. Rewrite and clean up Machine code. Update help. git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4954 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/MachinaCanvas.hpp')
-rw-r--r--src/gui/MachinaCanvas.hpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/gui/MachinaCanvas.hpp b/src/gui/MachinaCanvas.hpp
index c396931..52e2d74 100644
--- a/src/gui/MachinaCanvas.hpp
+++ b/src/gui/MachinaCanvas.hpp
@@ -40,9 +40,6 @@ class MachinaCanvas
public:
MachinaCanvas(MachinaGUI* app, int width, int height);
- //void build(SPtr<const machina::Machine> machine, bool show_labels);
- //void update_edges();
-
void on_new_object(SPtr<machina::client::ClientObject> object);
void on_erase_object(SPtr<machina::client::ClientObject> object);
@@ -51,21 +48,15 @@ public:
protected:
bool on_event(GdkEvent* event);
- bool node_clicked(WPtr<NodeView> item, GdkEventButton* ev);
+ bool node_clicked(NodeView* node, GdkEventButton* ev);
private:
- //SPtr<NodeView> create_node_view(SPtr<machina::Node> node);
-
void action_create_node(double x, double y);
+ void action_connect(NodeView* tail, NodeView* head);
+ void action_disconnect(NodeView* tail, NodeView* head);
- void action_connect(SPtr<NodeView> port1,
- SPtr<NodeView> port2);
-
- void action_disconnect(SPtr<NodeView> port1,
- SPtr<NodeView> port2);
-
- MachinaGUI* _app;
- WPtr<NodeView> _last_clicked;
+ MachinaGUI* _app;
+ NodeView* _last_clicked;
};
} // namespace machina