2 * Copyright (C) 2005-2007 Taybin Rutkin <taybin@taybin.com>
3 * Copyright (C) 2005-2017 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2007-2011 David Robillard <d@drobilla.net>
5 * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
6 * Copyright (C) 2014-2019 Robin Gareus <robin@gareus.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __ardour_route_params_ui_h__
24 #define __ardour_route_params_ui_h__
28 #include <gtkmm/box.h>
29 #include <gtkmm/button.h>
30 #include <gtkmm/eventbox.h>
31 #include <gtkmm/frame.h>
32 #include <gtkmm/label.h>
33 #include <gtkmm/scrolledwindow.h>
34 #include <gtkmm/togglebutton.h>
35 #include <gtkmm/treeview.h>
37 #include "pbd/stateful.h"
38 #include "pbd/signals.h"
40 #include "ardour/ardour.h"
42 #include <widgets/pane.h>
44 #include "ardour_window.h"
45 #include "processor_box.h"
46 #include "processor_selection.h"
47 #include "latency_gui.h"
62 class RouteParams_UI : public ArdourWindow, public PBD::ScopedConnectionList
68 void set_session (ARDOUR::Session*);
69 void session_going_away ();
70 PluginSelector* plugin_selector();
73 Gtk::VBox list_vpacker;
74 Gtk::ScrolledWindow route_select_scroller;
76 Gtk::Notebook notebook;
77 Gtk::Frame input_frame;
78 Gtk::Frame output_frame;
79 ArdourWidgets::HPane redir_hpane;
81 Gtk::Frame route_select_frame;
83 Gtk::HBox route_hpacker;
84 Gtk::VBox route_vpacker;
86 ProcessorBox* insert_box;
88 ArdourWidgets::HPane list_hpane;
90 ArdourWidgets::HPane right_hpane;
92 Gtk::Frame route_param_frame;
94 Gtk::VBox choice_vpacker;
96 Gtk::Frame latency_frame;
97 Gtk::VBox latency_packer;
98 LatencyGUI* latency_widget;
99 Gtk::Label delay_label;
101 PBD::ScopedConnectionList latency_connections;
102 sigc::connection latency_click_connection;
104 void refresh_latency ();
106 Gtk::ToggleButton input_button;
107 Gtk::ToggleButton output_button;
108 Gtk::Label track_input_label;
110 Gtk::Label title_label;
112 Gtk::Container * _active_view;
113 IOSelector * _input_iosel;
114 IOSelector * _output_iosel;
116 ProcessorSelection _p_selection;
118 boost::shared_ptr<ARDOUR::Route> _route;
119 PBD::ScopedConnection _route_processors_connection;
120 PBD::ScopedConnectionList route_connections;
122 boost::shared_ptr<ARDOUR::Processor> _processor;
123 PBD::ScopedConnection _processor_going_away_connection;
131 PORTINSERT_CONFIG_VIEW,
135 ConfigView _current_view;
139 struct RouteDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
140 RouteDisplayModelColumns() {
144 Gtk::TreeModelColumn<std::string> text;
145 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
148 RouteDisplayModelColumns route_display_columns ;
149 Gtk::TreeView route_display;
150 Glib::RefPtr<Gtk::ListStore> route_display_model;
153 void add_routes (ARDOUR::RouteList&);
155 void route_property_changed (const PBD::PropertyChange&, boost::weak_ptr<ARDOUR::Route> route);
156 void route_removed (boost::weak_ptr<ARDOUR::Route> route);
160 void route_selected();
161 //void route_unselected (gint row, gint col, GdkEvent *ev);
163 void setup_io_selector();
164 void cleanup_io_selector();
165 void cleanup_view(bool stopupdate = true);
166 void cleanup_latency_frame ();
167 void setup_latency_frame ();
169 void processors_changed (ARDOUR::RouteProcessorChange);
171 void setup_processor_boxes();
172 void cleanup_processor_boxes();
174 void redirect_selected (boost::shared_ptr<ARDOUR::Processor>);
176 void plugin_going_away (ARDOUR::Placement);
177 void processor_going_away (boost::weak_ptr<ARDOUR::Processor>);
179 gint edit_input_configuration (GdkEventButton *ev);
180 gint edit_output_configuration (GdkEventButton *ev);
182 void update_routeinfo (ARDOUR::Route * route);
184 Gtk::Menu *track_menu;
185 void show_track_menu();
187 void update_title ();
188 //void unselect_all_redirects ();
190 sigc::connection update_connection;
191 void update_views ();
193 void start_updating ();
194 void stop_updating ();
198 #endif /* __ardour_route_params_ui_h__ */