From 23d74f838521320dc1682426341d1874061337a6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Jul 2007 22:18:33 +0000 Subject: Make canvas grab events. Remove silly ctrl+click zoom event grabs. Add concept of "edit mode", old behaviour = edit mode, edit mode off = no connections or module moving. git-svn-id: http://svn.drobilla.net/lad/ingen@641 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/PatchModel.hpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/libs/client/PatchModel.hpp') diff --git a/src/libs/client/PatchModel.hpp b/src/libs/client/PatchModel.hpp index af1ef101..16e145e9 100644 --- a/src/libs/client/PatchModel.hpp +++ b/src/libs/client/PatchModel.hpp @@ -52,6 +52,15 @@ public: const string& filename() const { return _filename; } bool enabled() const { return _enabled; } bool polyphonic() const; + + /** "editable" = arranging,connecting,adding,deleting,etc + * not editable (control mode) you can just change controllers (performing) + */ + bool get_editable() const { return _editable; } + void set_editable(bool e) { if (_editable != e) { + _editable = e; + editable_sig.emit(e); + } } // Signals sigc::signal > new_node_sig; @@ -60,6 +69,7 @@ public: sigc::signal > removed_connection_sig; sigc::signal enabled_sig; sigc::signal disabled_sig; + sigc::signal editable_sig; private: friend class Store; @@ -67,7 +77,8 @@ private: PatchModel(const Path& patch_path, size_t internal_poly) : NodeModel("ingen:patch", patch_path, false), // FIXME _enabled(false), - _poly(internal_poly) + _poly(internal_poly), + _editable(true) { } @@ -76,9 +87,6 @@ private: void enable(); void disable(); void clear(); - void set_path(const Path& path); - //void add_node(SharedPtr nm); - //void remove_node(SharedPtr nm); void add_child(SharedPtr c); bool remove_child(SharedPtr c); @@ -92,6 +100,7 @@ private: string _filename; bool _enabled; size_t _poly; + bool _editable; }; typedef Table > PatchModelMap; -- cgit v1.2.1