summaryrefslogtreecommitdiffstats
path: root/src/gui/Window.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-11-16 04:08:14 +0000
committerDavid Robillard <d@drobilla.net>2009-11-16 04:08:14 +0000
commit4ae2cca91a7482d23837f27b4c5130b0dbde98f3 (patch)
treebf5182fdae8d4dc0aefeb685371643acb8bb128a /src/gui/Window.hpp
parent720dc98574c6ec13f3d9c61d67a7144cb8200a2c (diff)
downloadingen-4ae2cca91a7482d23837f27b4c5130b0dbde98f3.tar.gz
ingen-4ae2cca91a7482d23837f27b4c5130b0dbde98f3.tar.bz2
ingen-4ae2cca91a7482d23837f27b4c5130b0dbde98f3.zip
Make all windows respond to ctrl+w.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2269 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Window.hpp')
-rw-r--r--src/gui/Window.hpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/gui/Window.hpp b/src/gui/Window.hpp
new file mode 100644
index 00000000..b8bc0047
--- /dev/null
+++ b/src/gui/Window.hpp
@@ -0,0 +1,77 @@
+/* This file is part of Ingen.
+ * Copyright (C) 2009 Dave Robillard <http://drobilla.net>
+ *
+ * Ingen is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef WINDOW_HPP
+#define WINDOW_HPP
+
+#include <gtkmm.h>
+#include <libglademm.h>
+
+namespace Raul { class Path; }
+
+namespace Ingen {
+
+namespace Client { class ClientStore; }
+
+namespace GUI {
+
+class PatchWindow;
+class PatchTreeView;
+
+
+/** Ingen GUI Window
+ * \ingroup GUI
+ */
+class Window : public Gtk::Window
+{
+public:
+ Window() : Gtk::Window() {}
+ Window(BaseObjectType* cobject) : Gtk::Window(cobject) {}
+
+ bool on_key_press_event(GdkEventKey* event) {
+ if (Ingen::GUI::Window::key_press_handler(this, event))
+ return true;
+ else
+ return Gtk::Window::on_key_press_event(event);
+ }
+
+ static bool key_press_handler(Gtk::Window* win, GdkEventKey* event);
+};
+
+
+/** Ingen GUI Dialog
+ * \ingroup GUI
+ */
+class Dialog : public Gtk::Dialog
+{
+public:
+ Dialog() : Gtk::Dialog() {}
+ Dialog(BaseObjectType* cobject) : Gtk::Dialog(cobject) {}
+
+ bool on_key_press_event(GdkEventKey* event) {
+ if (Ingen::GUI::Window::key_press_handler(this, event))
+ return true;
+ else
+ return Gtk::Dialog::on_key_press_event(event);
+ }
+};
+
+
+} // namespace GUI
+} // namespace Ingen
+
+#endif // WINDOW_HPP