diff options
author | David Robillard <d@drobilla.net> | 2006-10-03 22:24:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-10-03 22:24:22 +0000 |
commit | 91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a (patch) | |
tree | cb70af457552eb1b87f745989f41c31da8220583 /src/progs/ingenuity/PatchPortModule.h | |
parent | 35a5d92cfcf6815553a0939c3e2bf77c1108fd31 (diff) | |
download | ingen-91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a.tar.gz ingen-91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a.tar.bz2 ingen-91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a.zip |
shared_ptr bugfixes.
Updated Ingen to work with new FlowCanvas.
Updated Patchage to work with new(er) FlowCanvas.
git-svn-id: http://svn.drobilla.net/lad/ingen@152 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/PatchPortModule.h')
-rw-r--r-- | src/progs/ingenuity/PatchPortModule.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h index 98bc1b1d..3cf55192 100644 --- a/src/progs/ingenuity/PatchPortModule.h +++ b/src/progs/ingenuity/PatchPortModule.h @@ -18,6 +18,7 @@ #define OMPORTMODULE_H #include <string> +#include <boost/enable_shared_from_this.hpp> #include <libgnomecanvasmm.h> #include <flowcanvas/Module.h> #include "util/Atom.h" @@ -43,10 +44,12 @@ class Port; * * \ingroup Ingenuity */ -class PatchPortModule : public LibFlowCanvas::Module +class PatchPortModule : public LibFlowCanvas::Module//, public boost::enable_shared_from_this<LibFlowCanvas::Module> { public: - PatchPortModule(PatchCanvas* canvas, CountedPtr<PortModel> port); + static boost::shared_ptr<PatchPortModule> create (boost::shared_ptr<PatchCanvas> canvas, + CountedPtr<PortModel> port); + virtual ~PatchPortModule() {} virtual void store_location(); @@ -56,13 +59,15 @@ public: CountedPtr<PortModel> port() const { return m_port; } protected: + PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<PortModel> port); + //virtual void on_double_click(GdkEventButton* ev) { show_control_window(); } //virtual void on_middle_click(GdkEventButton* ev) { show_control_window(); } void metadata_update(const string& key, const Atom& value); - CountedPtr<PortModel> m_port; - Port* m_patch_port; ///< Port on this 'anonymous' module + CountedPtr<PortModel> m_port; + boost::shared_ptr<Port> m_patch_port; ///< Port on this 'anonymous' module }; |