diff options
author | David Robillard <d@drobilla.net> | 2006-06-09 02:18:57 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-09 02:18:57 +0000 |
commit | 2f0e092964f800c0ff82cbd08bf2ee05db814e7b (patch) | |
tree | d35a09dc50535aae9292f8ca3262adc5526fe2a6 /src/Patchage.h | |
download | patchage-2f0e092964f800c0ff82cbd08bf2ee05db814e7b.tar.gz patchage-2f0e092964f800c0ff82cbd08bf2ee05db814e7b.tar.bz2 patchage-2f0e092964f800c0ff82cbd08bf2ee05db814e7b.zip |
Added patchage
git-svn-id: http://svn.drobilla.net/lad/patchage@5 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Patchage.h')
-rw-r--r-- | src/Patchage.h | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/src/Patchage.h b/src/Patchage.h new file mode 100644 index 0000000..f686e49 --- /dev/null +++ b/src/Patchage.h @@ -0,0 +1,116 @@ +/* This file is part of Patchage. Copyright (C) 2005 Dave Robillard. + * + * Om 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. + * + * Om 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., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef PATCHAGE_H +#define PATCHAGE_H + +#include "config.h" +#include <string> +#include <libgnomecanvasmm.h> + +using namespace std; + +class PatchageFlowCanvas; +class JackDriver; +class AlsaDriver; +class LashDriver; +class StateManager; + + +class Patchage +{ +public: + Patchage(int argc, char** argv); + ~Patchage(); + + PatchageFlowCanvas* canvas() { return m_canvas; } + StateManager* state_manager() { return m_state_manager; } + Gtk::Window* window() { return m_main_window; } + JackDriver* jack_driver() { return m_jack_driver; } +#ifdef HAVE_ALSA + AlsaDriver* alsa_driver() { return m_alsa_driver; } +#endif +#ifdef HAVE_LASH + LashDriver* lash_driver() { return m_lash_driver; } +#endif + + void attach(); + void quit() { m_main_window->hide(); } + + void update_state(); + void store_window_location(); + + void status_message(const string& msg); + inline void queue_refresh() { m_refresh = true; } + +protected: + void update_menu_items(); + + void menu_jack_launch(); + void menu_jack_connect(); + void menu_jack_disconnect(); + void menu_file_save(); + void menu_file_quit(); + void menu_view_refresh(); + void menu_help_about(); + void close_about(); + void zoom_changed(); + bool idle_callback(); + +#ifdef HAVE_LASH + LashDriver* m_lash_driver; + Gtk::MenuItem* m_menu_lash_launch; + Gtk::MenuItem* m_menu_lash_connect; + Gtk::MenuItem* m_menu_lash_disconnect; + void menu_lash_launch(); + void menu_lash_connect(); + void menu_lash_disconnect(); +#endif + +#ifdef HAVE_ALSA + AlsaDriver* m_alsa_driver; + Gtk::MenuItem* m_menu_alsa_connect; + Gtk::MenuItem* m_menu_alsa_disconnect; + void menu_alsa_connect(); + void menu_alsa_disconnect(); +#endif + + PatchageFlowCanvas* m_canvas; + JackDriver* m_jack_driver; + StateManager* m_state_manager; + + Gtk::Main* m_gtk_main; + + string m_settings_filename; + bool m_refresh; + + Gtk::Window* m_main_window; + Gtk::Window* m_about_window; + Gtk::Label* m_about_project_label; + Gtk::MenuItem* m_menu_jack_launch; + Gtk::MenuItem* m_menu_jack_connect; + Gtk::MenuItem* m_menu_jack_disconnect; + Gtk::MenuItem* m_menu_file_save; + Gtk::MenuItem* m_menu_file_quit; + Gtk::MenuItem* m_menu_view_refresh; + Gtk::MenuItem* m_menu_help_about; + Gtk::ScrolledWindow* m_canvas_scrolledwindow; + Gtk::HScale* m_zoom_slider; + Gtk::Button* m_about_close_button; + Gtk::Label* m_status_label; +}; + +#endif // PATCHAGE_H |