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"
61 class RouteParams_UI : public ArdourWindow, public PBD::ScopedConnectionList
67 void set_session (ARDOUR::Session*);
68 void session_going_away ();
69 PluginSelector* plugin_selector();
72 Gtk::VBox list_vpacker;
73 Gtk::ScrolledWindow route_select_scroller;
75 Gtk::Notebook notebook;
76 Gtk::Frame input_frame;
77 Gtk::Frame output_frame;
78 ArdourWidgets::HPane redir_hpane;
80 Gtk::Frame route_select_frame;
82 Gtk::HBox route_hpacker;
83 Gtk::VBox route_vpacker;
85 ProcessorBox* insert_box;
87 ArdourWidgets::HPane list_hpane;
89 ArdourWidgets::HPane right_hpane;
91 Gtk::Frame route_param_frame;
93 Gtk::VBox choice_vpacker;
96 Gtk::ToggleButton input_button;
97 Gtk::ToggleButton output_button;
98 Gtk::Label track_input_label;
100 Gtk::Label title_label;
102 Gtk::Container * _active_view;
103 IOSelector * _input_iosel;
104 IOSelector * _output_iosel;
106 ProcessorSelection _p_selection;
108 boost::shared_ptr<ARDOUR::Route> _route;
109 PBD::ScopedConnection _route_processors_connection;
110 PBD::ScopedConnectionList route_connections;
112 boost::shared_ptr<ARDOUR::Processor> _processor;
113 PBD::ScopedConnection _processor_going_away_connection;
121 PORTINSERT_CONFIG_VIEW,
125 ConfigView _current_view;
129 struct RouteDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
130 RouteDisplayModelColumns() {
134 Gtk::TreeModelColumn<std::string> text;
135 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
138 RouteDisplayModelColumns route_display_columns ;
139 Gtk::TreeView route_display;
140 Glib::RefPtr<Gtk::ListStore> route_display_model;
143 void add_routes (ARDOUR::RouteList&);
145 void route_property_changed (const PBD::PropertyChange&, boost::weak_ptr<ARDOUR::Route> route);
146 void route_removed (boost::weak_ptr<ARDOUR::Route> route);
150 void route_selected();
151 //void route_unselected (gint row, gint col, GdkEvent *ev);
153 void setup_io_selector();
154 void cleanup_io_selector();
155 void cleanup_view(bool stopupdate = true);
157 void processors_changed (ARDOUR::RouteProcessorChange);
159 void setup_processor_boxes();
160 void cleanup_processor_boxes();
162 void redirect_selected (boost::shared_ptr<ARDOUR::Processor>);
164 void plugin_going_away (ARDOUR::Placement);
165 void processor_going_away (boost::weak_ptr<ARDOUR::Processor>);
167 gint edit_input_configuration (GdkEventButton *ev);
168 gint edit_output_configuration (GdkEventButton *ev);
170 void update_routeinfo (ARDOUR::Route * route);
172 Gtk::Menu *track_menu;
173 void show_track_menu();
175 void update_title ();
176 //void unselect_all_redirects ();
178 sigc::connection update_connection;
179 void update_views ();
181 void start_updating ();
182 void stop_updating ();
186 #endif /* __ardour_route_params_ui_h__ */