/* This file is part of Patchage. * Copyright (C) 2007 Dave Robillard * * Patchage 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. * * Patchage 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 PATCHAGE_H #define PATCHAGE_H #include #include #include #include #include CONFIG_H_PATH #include "Widget.hpp" class PatchageCanvas; class JackDriver; class AlsaDriver; class LashDriver; class StateManager; class JackSettingsDialog; class Patchage { public: Patchage(int argc, char** argv); ~Patchage(); boost::shared_ptr canvas() const { return _canvas; } Gtk::Window* window() { return _main_win.get(); } StateManager* state_manager() const { return _state_manager; } JackDriver* jack_driver() const { return _jack_driver; } #ifdef HAVE_ALSA AlsaDriver* alsa_driver() const { return _alsa_driver; } #endif #ifdef HAVE_LASH LashDriver* lash_driver() const { return _lash_driver; } #endif void attach(); void quit() { _main_win->hide(); } void refresh(); inline void queue_refresh() { _refresh = true; } void clear_load(); void status_message(const std::string& msg); void update_state(); void store_window_location(); int max_pane_position() { return _main_paned->property_max_position() - _messages_expander->get_label_widget()->get_height() - 10; } protected: void connect_widgets(); void on_arrange(); void on_help_about(); void on_quit(); void on_show_messages(); void on_store_positions(); void on_view_toolbar(); void zoom(double z); void zoom_changed(); bool idle_callback(); bool update_load(); void update_toolbar(); void buffer_size_changed(); void on_pane_position_changed(); void on_messages_expander_changed(); Glib::RefPtr xml; #ifdef HAVE_LASH LashDriver* _lash_driver; Widget _menu_open_session; Widget _menu_save_session; Widget _menu_save_session_as; Widget _menu_close_session; Widget _menu_lash_connect; Widget _menu_lash_disconnect; void menu_open_session(); void menu_save_session(); void menu_save_session_as(); void menu_close_session(); void menu_lash_connect(); void menu_lash_disconnect(); #endif #ifdef HAVE_ALSA AlsaDriver* _alsa_driver; Widget _menu_alsa_connect; Widget _menu_alsa_disconnect; void menu_alsa_connect(); void menu_alsa_disconnect(); #endif boost::shared_ptr _canvas; JackDriver* _jack_driver; StateManager* _state_manager; Gtk::Main* _gtk_main; std::string _settings_filename; bool _refresh; bool _enable_refresh; bool _pane_closed; bool _update_pane_position; int _user_pane_position; JackSettingsDialog* _jack_settings_dialog; Widget _about_win; Widget _buffer_size_combo; Widget _clear_load_but; Widget _main_paned; Widget _main_scrolledwin; Widget _main_win; Widget _main_xrun_progress; Widget _menu_file_quit; Widget _menu_help_about; Widget _menu_jack_connect; Widget _menu_jack_disconnect; Widget _menu_jack_settings; Widget _menu_store_positions; Widget _menu_view_arrange; Widget _menu_view_messages; Widget _menu_view_refresh; Widget _menu_view_toolbar; Widget _messages_expander; Widget _play_but; Widget _rewind_but; Widget _sample_rate_label; Widget _status_text; Widget _stop_but; Widget _toolbar; Widget _toolbars_box; Widget _zoom_full_but; Widget _zoom_normal_but; }; #endif // PATCHAGE_H