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 <ardour/ardour.h>
37 #include <ardour/stateful.h>
38 #include <ardour/io.h>
39 #include <ardour/redirect.h>
41 #include "io_selector.h"
42 #include "ardour_dialog.h"
43 #include "keyboard_target.h"
44 #include "redirect_box.h"
45 #include "route_redirect_selection.h"
59 class RouteParams_UI : public ArdourDialog
62 RouteParams_UI (ARDOUR::AudioEngine&);
65 void set_session (ARDOUR::Session *);
67 PluginSelector& plugin_selector() { return *_plugin_selector; }
70 ARDOUR::AudioEngine& engine;
72 Gtk::HBox global_hpacker;
73 Gtk::VBox global_vpacker;
74 Gtk::ScrolledWindow scroller;
75 Gtk::EventBox scroller_base;
76 Gtk::HBox scroller_hpacker;
77 Gtk::VBox mixer_scroller_vpacker;
79 Gtk::VBox list_vpacker;
80 Gtk::Label route_list_button_label;
81 Gtk::Button route_list_button;
82 Gtk::ScrolledWindow route_select_scroller;
84 Gtk::Notebook notebook;
85 Gtk::Frame input_frame;
86 Gtk::Frame output_frame;
87 Gtk::HPaned pre_redir_hpane;
88 Gtk::HPaned post_redir_hpane;
90 Gtk::Frame route_select_frame;
92 Gtk::HBox route_hpacker;
93 Gtk::VBox route_vpacker;
95 RedirectBox * pre_redirect_box;
96 RedirectBox * post_redirect_box;
98 Gtk::HPaned list_hpane;
100 Gtk::HPaned right_hpane;
102 Gtk::Frame route_choice_frame;
104 Gtk::Frame route_param_frame;
106 Gtk::VBox choice_vpacker;
109 Gtk::ToggleButton input_button;
110 Gtk::ToggleButton output_button;
111 Gtk::Label track_input_label;
113 Gtk::Label title_label;
115 Gtk::Container * _active_pre_view;
116 Gtk::Container * _active_post_view;
117 IOSelector * _input_iosel;
118 IOSelector * _output_iosel;
120 PluginSelector *_plugin_selector;
121 RouteRedirectSelection _rr_selection;
123 ARDOUR::Route *_route;
124 sigc::connection _route_conn;
125 sigc::connection _route_ds_conn;
127 ARDOUR::Redirect * _pre_redirect;
128 sigc::connection _pre_plugin_conn;
130 ARDOUR::Redirect * _post_redirect;
131 sigc::connection _post_plugin_conn;
139 PORTINSERT_CONFIG_VIEW,
143 ConfigView _current_view;
147 struct RouteDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
148 RouteDisplayModelColumns() {
152 Gtk::TreeModelColumn<Glib::ustring> text;
153 Gtk::TreeModelColumn<ARDOUR::Route*> route;
156 RouteDisplayModelColumns route_display_columns ;
157 Gtk::TreeView route_display;
158 Glib::RefPtr<Gtk::ListStore> route_display_model;
161 void add_route (ARDOUR::Route*);
163 void route_name_changed (void *src, ARDOUR::Route *route);
164 void route_removed (ARDOUR::Route *route);
167 void route_selected();
168 //void route_unselected (gint row, gint col, GdkEvent *ev);
170 void setup_io_frames();
171 void cleanup_io_frames();
172 void cleanup_pre_view(bool stopupdate = true);
173 void cleanup_post_view(bool stopupdate = true);
177 void redirects_changed (void *src);
179 void setup_redirect_boxes();
180 void cleanup_redirect_boxes();
182 void redirect_selected (ARDOUR::Redirect *, ARDOUR::Placement);
183 void redirect_unselected (ARDOUR::Redirect *);
185 void plugin_going_away (ARDOUR::Plugin *foo, ARDOUR::Placement);
186 void redirect_going_away (ARDOUR::Redirect *foo);
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__ */