aboutsummaryrefslogtreecommitdiffstats
path: root/src/gui/MachinaGUI.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-02-08 03:56:42 +0000
committerDavid Robillard <d@drobilla.net>2007-02-08 03:56:42 +0000
commit4543288514e1b0a83c6ed003dfb22e175e07bfaa (patch)
treeef076ca889b88c0635d4e29df6b96148b6594336 /src/gui/MachinaGUI.hpp
parentc803c07346142f93dd2d7929cd100764d9e43273 (diff)
downloadmachina-4543288514e1b0a83c6ed003dfb22e175e07bfaa.tar.gz
machina-4543288514e1b0a83c6ed003dfb22e175e07bfaa.tar.bz2
machina-4543288514e1b0a83c6ed003dfb22e175e07bfaa.zip
Circular nodes in FlowCanvas, related necessary redesign work and changes for API update.
Beginnings of a Machina GUI. git-svn-id: http://svn.drobilla.net/lad/machina@290 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/MachinaGUI.hpp')
-rw-r--r--src/gui/MachinaGUI.hpp88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/gui/MachinaGUI.hpp b/src/gui/MachinaGUI.hpp
new file mode 100644
index 0000000..27b7f4f
--- /dev/null
+++ b/src/gui/MachinaGUI.hpp
@@ -0,0 +1,88 @@
+/* This file is part of Machina.
+ * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
+ *
+ * Machina 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.
+ *
+ * Machina 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 Street, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef MACHINA_GUI_H
+#define MACHINA_GUI_H
+
+//#include "config.h"
+#include <string>
+#include <boost/shared_ptr.hpp>
+#include <libgnomecanvasmm.h>
+
+using namespace std;
+
+class MachinaCanvas;
+
+
+class MachinaGUI
+{
+public:
+ MachinaGUI(/*int argc, char** argv*/);
+ ~MachinaGUI();
+
+ boost::shared_ptr<MachinaCanvas> canvas() { return _canvas; }
+
+ Gtk::Window* window() { return _main_window; }
+
+ void attach();
+ void quit() { _main_window->hide(); }
+
+ void status_message(const string& msg);
+ inline void queue_refresh() { _refresh = true; }
+
+ int max_pane_position()
+ { return _main_paned->property_max_position() - _messages_expander->get_label_widget()->get_height() - 8; }
+
+protected:
+ void connect_widgets();
+
+ void menu_file_quit();
+ void show_messages_toggled();
+ void menu_view_refresh();
+ void menu_help_about();
+ void zoom(double z);
+ void zoom_changed();
+ bool idle_callback();
+
+ void on_pane_position_changed();
+ void on_messages_expander_changed();
+
+ bool _pane_closed;
+ bool _update_pane_position;
+ int _user_pane_position;
+
+ boost::shared_ptr<MachinaCanvas> _canvas;
+
+ Gtk::Main* _gtk_main;
+
+ bool _refresh;
+
+ Gtk::Window* _main_window;
+ Gtk::AboutDialog* _about_window;
+ Gtk::MenuItem* _menu_file_quit;
+ Gtk::CheckMenuItem* _menu_view_messages;
+ Gtk::MenuItem* _menu_view_refresh;
+ Gtk::MenuItem* _menu_help_about;
+ Gtk::ScrolledWindow* _canvas_scrolledwindow;
+ Gtk::TextView* _status_text;
+ Gtk::Paned* _main_paned;
+ Gtk::Expander* _messages_expander;
+ Gtk::ToolButton* _zoom_normal_button;
+ Gtk::ToolButton* _zoom_full_button;
+};
+
+#endif // MACHINA_GUI_H