From 91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 3 Oct 2006 22:24:22 +0000 Subject: 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 --- src/progs/ingenuity/PatchPortModule.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/progs/ingenuity/PatchPortModule.h') 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 +#include #include #include #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 { public: - PatchPortModule(PatchCanvas* canvas, CountedPtr port); + static boost::shared_ptr create (boost::shared_ptr canvas, + CountedPtr port); + virtual ~PatchPortModule() {} virtual void store_location(); @@ -56,13 +59,15 @@ public: CountedPtr port() const { return m_port; } protected: + PatchPortModule(boost::shared_ptr canvas, CountedPtr 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 m_port; - Port* m_patch_port; ///< Port on this 'anonymous' module + CountedPtr m_port; + boost::shared_ptr m_patch_port; ///< Port on this 'anonymous' module }; -- cgit v1.2.1