summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/PatchController.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-11 11:10:35 +0000
committerDavid Robillard <d@drobilla.net>2006-09-11 11:10:35 +0000
commitb15864870d34a1188eda93ad215734275037278e (patch)
tree224a1669a29091ea4198425d4a002e448cde8b30 /src/progs/ingenuity/PatchController.h
parent22bf43352ddfc48452d776f10ad4d12161255049 (diff)
downloadingen-b15864870d34a1188eda93ad215734275037278e.tar.gz
ingen-b15864870d34a1188eda93ad215734275037278e.tar.bz2
ingen-b15864870d34a1188eda93ad215734275037278e.zip
Switched homebrew CountedPtr to boost::shared_ptr.
Factories for patch windows, controller. Robustness updated in many places. Tons of cleanups, rewrites, bugfixes, etc. git-svn-id: http://svn.drobilla.net/lad/ingen@128 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/PatchController.h')
-rw-r--r--src/progs/ingenuity/PatchController.h35
1 files changed, 14 insertions, 21 deletions
diff --git a/src/progs/ingenuity/PatchController.h b/src/progs/ingenuity/PatchController.h
index a5370826..2ee01738 100644
--- a/src/progs/ingenuity/PatchController.h
+++ b/src/progs/ingenuity/PatchController.h
@@ -19,9 +19,9 @@
#include <string>
#include <gtkmm.h>
+#include "util/CountedPtr.h"
#include "NodeController.h"
#include "PatchModel.h"
-template <class T> class CountedPtr;
namespace Ingen { namespace Client {
class PatchModel;
@@ -60,7 +60,6 @@ class NodeController;
class PatchController : public NodeController
{
public:
- PatchController(CountedPtr<PatchModel> model);
virtual ~PatchController();
/*
@@ -68,16 +67,14 @@ public:
virtual void remove_from_store();
*/
- virtual void destroy();
-
virtual void metadata_update(const string& key, const string& value);
- virtual void add_port(CountedPtr<PortModel> pm);
- virtual void remove_port(const Path& path, bool resize_module);
+ //virtual void add_port(CountedPtr<PortModel> pm);
+ //virtual void remove_port(const Path& path, bool resize_module);
void connection(CountedPtr<ConnectionModel> cm);
void disconnection(const Path& src_port_path, const Path& dst_port_path);
- void clear();
+ //void clear();
void show_control_window();
void show_properties_window();
@@ -86,35 +83,31 @@ public:
void claim_patch_view();
void create_module(OmFlowCanvas* canvas);
- void create_view();
- PatchView* view() const { return m_patch_view; }
+ CountedPtr<PatchView> get_view();
PatchWindow* window() const { return m_window; }
void window(PatchWindow* pw) { m_window = pw; }
- inline string name() const { return m_model->name(); }
- inline const Path& path() const { return m_model->path(); }
-
void set_path(const Path& new_path);
//void enable();
//void disable();
- CountedPtr<PatchModel> patch_model() const { return m_patch_model; }
+ const CountedPtr<PatchModel> patch_model() const { return m_patch_model; }
- void enable_controls_menuitem();
- void disable_controls_menuitem();
-
private:
- void add_node(CountedPtr<NodeModel> object);
- void remove_node(const string& name);
+ friend class ControllerFactory;
+ PatchController(CountedPtr<PatchModel> model);
- NodeController* create_controller_for_node(CountedPtr<NodeModel> node);
+ void destroy();
+ void add_node(CountedPtr<NodeModel> object);
+
PatchPropertiesWindow* m_properties_window;
- PatchWindow* m_window; ///< Patch Window currently showing m_patch_view
- PatchView* m_patch_view; ///< View (canvas) of this patch
+ // FIXME: remove these
+ PatchWindow* m_window; ///< Patch Window currently showing m_patch_view
+ CountedPtr<PatchView> m_patch_view; ///< View (canvas) of this patch
CountedPtr<PatchModel> m_patch_model;