remove gui/jack_proxy module
[ladish.git] / gui / Patchage.hpp
blob0b7df522c3d594b20d8dcd84dd820a21949f2922
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*
3 * LADI Session Handler (ladish)
5 * Copyright (C) 2008, 2009 Nedko Arnaudov <nedko@arnaudov.name>
6 * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
8 **************************************************************************
9 * This file contains interface of the application class
10 **************************************************************************
12 * LADI Session Handler is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * LADI Session Handler is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with LADI Session Handler. If not, see <http://www.gnu.org/licenses/>
24 * or write to the Free Software Foundation, Inc.,
25 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28 #ifndef PATCHAGE_PATCHAGE_HPP
29 #define PATCHAGE_PATCHAGE_HPP
31 #include "common.h"
32 #include "Widget.hpp"
33 #include <gtkmm.h>
35 class PatchageCanvas;
36 class a2j_proxy;
37 class lash_proxy;
38 class project_list;
39 class session;
41 class Patchage {
42 public:
43 Patchage(int argc, char** argv);
44 ~Patchage();
46 Gtk::Window* window() { return _main_win.get(); }
48 void quit() { _main_win->hide(); }
50 void refresh();
52 void clear_load();
53 void info_msg(const std::string& msg);
54 void error_msg(const std::string& msg);
55 void status_msg(const std::string& msg);
56 void update_state();
58 void set_studio_availability(bool available);
59 void set_a2j_status(unsigned int status);
61 void load_project_ask();
62 void load_project(const std::string& project_name);
63 void save_all_projects();
64 void save_project(const std::string& project_name);
65 void close_project(const std::string& project_name);
66 void close_all_projects();
68 protected:
69 void connect_widgets();
71 void on_arrange();
72 void on_help_about();
73 void on_quit();
74 void on_show_projects();
75 void on_view_toolbar();
76 bool on_scroll(GdkEventScroll* ev);
78 void zoom(double z);
79 bool idle_callback();
80 void update_load();
81 void update_toolbar();
83 void jack_status_changed(bool started);
85 void buffer_size_changed();
87 #if 0
88 void
89 get_port_jack_names(
90 boost::shared_ptr<PatchagePort> port,
91 std::string& jack_client_name,
92 std::string& jack_port_name);
94 boost::shared_ptr<PatchagePort>
95 lookup_port(
96 const char * jack_client_name,
97 const char * jack_port_name);
98 #endif
100 a2j_proxy * _a2j;
101 session * _session;
102 lash_proxy * _lash;
103 project_list * _project_list;
105 Gtk::Main* _gtk_main;
107 float _max_dsp_load;
109 Widget<Gtk::AboutDialog> _about_win;
110 Widget<Gtk::ComboBox> _buffer_size_combo;
111 Widget<Gtk::ToolButton> _clear_load_but;
112 Widget<Gtk::ScrolledWindow> _main_scrolledwin;
113 Widget<Gtk::Window> _main_win;
114 Widget<Gtk::ProgressBar> _main_xrun_progress;
115 Widget<Gtk::Label> _main_a2j_status_label;
116 Widget<Gtk::MenuItem> _menu_file_quit;
117 Widget<Gtk::MenuItem> _menu_help_about;
118 Widget<Gtk::MenuItem> _menu_jack_start;
119 Widget<Gtk::MenuItem> _menu_jack_stop;
120 Widget<Gtk::MenuItem> _menu_a2j_start;
121 Widget<Gtk::MenuItem> _menu_a2j_stop;
122 Widget<Gtk::MenuItem> _menu_load_project;
123 Widget<Gtk::MenuItem> _menu_save_all_projects;
124 Widget<Gtk::MenuItem> _menu_close_all_projects;
125 Widget<Gtk::MenuItem> _menu_store_positions;
126 Widget<Gtk::MenuItem> _menu_view_arrange;
127 Widget<Gtk::CheckMenuItem> _menu_view_projects;
128 Widget<Gtk::MenuItem> _menu_view_refresh;
129 Widget<Gtk::CheckMenuItem> _menu_view_toolbar;
130 Widget<Gtk::Viewport> _project_list_viewport;
131 Widget<Gtk::Label> _sample_rate_label;
132 Widget<Gtk::Toolbar> _toolbar;
133 Widget<Gtk::ToolButton> _zoom_full_but;
134 Widget<Gtk::ToolButton> _zoom_normal_but;
137 #endif // PATCHAGE_PATCHAGE_HPP