2 Copyright (C) 2000 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __ardour_route_params_ui_h__
22 #define __ardour_route_params_ui_h__
26 #include <gtkmm/box.h>
27 #include <gtkmm/button.h>
28 #include <gtkmm/eventbox.h>
29 #include <gtkmm/frame.h>
30 #include <gtkmm/label.h>
31 #include <gtkmm/paned.h>
32 #include <gtkmm/scrolledwindow.h>
33 #include <gtkmm/togglebutton.h>
34 #include <gtkmm/treeview.h>
36 #include <pbd/stateful.h>
38 #include <ardour/ardour.h>
39 #include <ardour/io.h>
40 #include <ardour/redirect.h>
42 #include "io_selector.h"
43 #include "ardour_dialog.h"
44 #include "keyboard_target.h"
45 #include "redirect_box.h"
46 #include "route_redirect_selection.h"
60 class RouteParams_UI : public ArdourDialog
63 RouteParams_UI (ARDOUR::AudioEngine&);
66 void set_session (ARDOUR::Session *);
68 PluginSelector& plugin_selector() { return *_plugin_selector; }
71 ARDOUR::AudioEngine& engine;
73 Gtk::HBox global_hpacker;
74 Gtk::VBox global_vpacker;
75 Gtk::ScrolledWindow scroller;
76 Gtk::EventBox scroller_base;
77 Gtk::HBox scroller_hpacker;
78 Gtk::VBox mixer_scroller_vpacker;
80 Gtk::VBox list_vpacker;
81 Gtk::Label route_list_button_label;
82 Gtk::Button route_list_button;
83 Gtk::ScrolledWindow route_select_scroller;
85 Gtk::Notebook notebook;
86 Gtk::Frame input_frame;
87 Gtk::Frame output_frame;
88 Gtk::HPaned pre_redir_hpane;
89 Gtk::HPaned post_redir_hpane;
91 Gtk::Frame route_select_frame;
93 Gtk::HBox route_hpacker;
94 Gtk::VBox route_vpacker;
96 RedirectBox * pre_redirect_box;
97 RedirectBox * post_redirect_box;
99 Gtk::HPaned list_hpane;
101 Gtk::HPaned right_hpane;
103 Gtk::Frame route_choice_frame;
105 Gtk::Frame route_param_frame;
107 Gtk::VBox choice_vpacker;
110 Gtk::ToggleButton input_button;
111 Gtk::ToggleButton output_button;
112 Gtk::Label track_input_label;
114 Gtk::Label title_label;
116 Gtk::Container * _active_pre_view;
117 Gtk::Container * _active_post_view;
118 IOSelector * _input_iosel;
119 IOSelector * _output_iosel;
121 PluginSelector *_plugin_selector;
122 RouteRedirectSelection _rr_selection;
124 boost::shared_ptr<ARDOUR::Route> _route;
125 sigc::connection _route_conn;
126 sigc::connection _route_ds_conn;
128 boost::shared_ptr<ARDOUR::Redirect> _pre_redirect;
129 sigc::connection _pre_plugin_conn;
131 boost::shared_ptr<ARDOUR::Redirect> _post_redirect;
132 sigc::connection _post_plugin_conn;
140 PORTINSERT_CONFIG_VIEW,
144 ConfigView _current_view;
148 struct RouteDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
149 RouteDisplayModelColumns() {
153 Gtk::TreeModelColumn<Glib::ustring> text;
154 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
157 RouteDisplayModelColumns route_display_columns ;
158 Gtk::TreeView route_display;
159 Glib::RefPtr<Gtk::ListStore> route_display_model;
162 void add_routes (ARDOUR::Session::RouteList&);
164 void route_name_changed (void *src, boost::shared_ptr<ARDOUR::Route> route);
165 void route_removed (boost::shared_ptr<ARDOUR::Route> route);
168 void route_selected();
169 //void route_unselected (gint row, gint col, GdkEvent *ev);
171 void setup_io_frames();
172 void cleanup_io_frames();
173 void cleanup_pre_view(bool stopupdate = true);
174 void cleanup_post_view(bool stopupdate = true);
178 void redirects_changed (void *src);
180 void setup_redirect_boxes();
181 void cleanup_redirect_boxes();
183 void redirect_selected (boost::shared_ptr<ARDOUR::Redirect>, ARDOUR::Placement);
185 void plugin_going_away (ARDOUR::Placement);
186 void redirect_going_away (boost::shared_ptr<ARDOUR::Redirect>);
188 gint edit_input_configuration (GdkEventButton *ev);
189 gint edit_output_configuration (GdkEventButton *ev);
191 void update_routeinfo (ARDOUR::Route * route);
193 Gtk::Menu *track_menu;
194 void show_track_menu();
196 void update_title ();
197 //void unselect_all_redirects ();
199 sigc::connection update_connection;
200 void update_views ();
202 void start_updating ();
203 void stop_updating ();
207 #endif /* __ardour_route_params_ui_h__ */