summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/PatchWindow.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/PatchWindow.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/PatchWindow.h')
-rw-r--r--src/progs/ingenuity/PatchWindow.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h
index 07a3e92e..d538db78 100644
--- a/src/progs/ingenuity/PatchWindow.h
+++ b/src/progs/ingenuity/PatchWindow.h
@@ -23,9 +23,11 @@
#include <libglademm/xml.h>
#include <libglademm.h>
#include "util/Path.h"
-
+#include "util/CountedPtr.h"
+#include "PatchController.h"
using std::string; using std::list;
+
namespace Ingen { namespace Client {
class PatchModel;
class NodeModel;
@@ -40,7 +42,6 @@ namespace Ingenuity {
class PatchController;
class OmFlowCanvas;
-class PatchView;
class LoadPluginWindow;
class LoadPatchWindow;
class NewSubpatchWindow;
@@ -63,18 +64,13 @@ public:
PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
~PatchWindow();
- void patch(const Path& path);
- void patch_controller(PatchController* pc);
+ void set_patch_from_path(const Path& path);
+ void set_patch(CountedPtr<PatchController> pc);
- PatchController* patch_controller() const { return m_patch; }
- LoadPluginWindow* load_plugin_window() const { return m_load_plugin_window; }
- LoadSubpatchWindow* load_subpatch_window() const { return m_load_subpatch_window; }
- NewSubpatchWindow* new_subpatch_window() const { return m_new_subpatch_window; }
-
- // Breadcrumb management
- void node_removed(const string& name);
- void node_renamed(const string& old_path, const string& new_path);
- void patch_renamed(const string& new_path);
+ CountedPtr<PatchController> patch_controller() const { return m_patch; }
+ LoadPluginWindow* load_plugin_window() const { return m_load_plugin_window; }
+ LoadSubpatchWindow* load_subpatch_window() const { return m_load_subpatch_window; }
+ NewSubpatchWindow* new_subpatch_window() const { return m_new_subpatch_window; }
Gtk::MenuItem* menu_view_control_window() { return m_menu_view_control_window; }
@@ -83,14 +79,12 @@ public:
protected:
void on_show();
void on_hide();
- bool on_delete_event(GdkEventAny* ev);
bool on_key_press_event(GdkEventKey* event);
private:
void event_import();
void event_save();
void event_save_as();
- void event_close();
void event_quit();
void event_destroy();
void event_clear();
@@ -99,7 +93,8 @@ private:
void event_show_controls();
void event_show_engine();
- PatchController* m_patch;
+ CountedPtr<PatchController> m_patch;
+
LoadPluginWindow* m_load_plugin_window;
LoadPatchWindow* m_load_patch_window;
NewSubpatchWindow* m_new_subpatch_window;