summaryrefslogtreecommitdiffstats
path: root/src/gui/Window.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-22 03:08:06 +0000
committerDavid Robillard <d@drobilla.net>2011-10-22 03:08:06 +0000
commitac1d6d135bda8d739fdb8bf564f89c38b664c097 (patch)
treed750da79dd88b64ab2a88cca1651c2a5a240bd72 /src/gui/Window.hpp
parent143968e38cc2f058dd7c500e984904a39864d652 (diff)
downloadingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.tar.gz
ingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.tar.bz2
ingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.zip
De-singleton-ify GUI.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3584 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Window.hpp')
-rw-r--r--src/gui/Window.hpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/Window.hpp b/src/gui/Window.hpp
index cbe72fbb..372c248e 100644
--- a/src/gui/Window.hpp
+++ b/src/gui/Window.hpp
@@ -20,16 +20,11 @@
#include <gtkmm.h>
-namespace Raul { class Path; }
-
namespace Ingen {
-namespace Client { class ClientStore; }
-
namespace GUI {
-class PatchWindow;
-class PatchTreeView;
+class App;
/** Ingen GUI Window
* \ingroup GUI
@@ -37,8 +32,10 @@ class PatchTreeView;
class Window : public Gtk::Window
{
public:
- Window() : Gtk::Window() {}
- Window(BaseObjectType* cobject) : Gtk::Window(cobject) {}
+ Window() : Gtk::Window(), _app(NULL) {}
+ Window(BaseObjectType* cobject) : Gtk::Window(cobject), _app(NULL) {}
+
+ virtual void init_window(App& app) { _app = &app; }
bool on_key_press_event(GdkEventKey* event) {
if (Ingen::GUI::Window::key_press_handler(this, event))
@@ -48,6 +45,8 @@ public:
}
static bool key_press_handler(Gtk::Window* win, GdkEventKey* event);
+
+ App* _app;
};
/** Ingen GUI Dialog
@@ -56,8 +55,10 @@ public:
class Dialog : public Gtk::Dialog
{
public:
- Dialog() : Gtk::Dialog() {}
- Dialog(BaseObjectType* cobject) : Gtk::Dialog(cobject) {}
+ Dialog() : Gtk::Dialog(), _app(NULL) {}
+ Dialog(BaseObjectType* cobject) : Gtk::Dialog(cobject), _app(NULL) {}
+
+ virtual void init_dialog(App& app) { _app = &app; }
bool on_key_press_event(GdkEventKey* event) {
if (Ingen::GUI::Window::key_press_handler(this, event))
@@ -65,6 +66,8 @@ public:
else
return Gtk::Dialog::on_key_press_event(event);
}
+
+ App* _app;
};
} // namespace GUI