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.
20 #ifndef __ardour_route_params_ui_h__
21 #define __ardour_route_params_ui_h__
25 #include <gtkmm/box.h>
26 #include <gtkmm/button.h>
27 #include <gtkmm/eventbox.h>
28 #include <gtkmm/frame.h>
29 #include <gtkmm/label.h>
30 #include <gtkmm/scrolledwindow.h>
31 #include <gtkmm/togglebutton.h>
32 #include <gtkmm/treeview.h>
34 #include "pbd/stateful.h"
35 #include "pbd/signals.h"
37 #include "ardour/ardour.h"
39 #include <widgets/pane.h>
41 #include "ardour_window.h"
42 #include "processor_box.h"
43 #include "processor_selection.h"
44 #include "latency_gui.h"
59 class RouteParams_UI : public ArdourWindow, public PBD::ScopedConnectionList
65 void set_session (ARDOUR::Session*);
66 void session_going_away ();
67 PluginSelector* plugin_selector() { return _plugin_selector; }
70 Gtk::VBox list_vpacker;
71 Gtk::ScrolledWindow route_select_scroller;
73 Gtk::Notebook notebook;
74 Gtk::Frame input_sample;
75 Gtk::Frame output_sample;
76 ArdourWidgets::HPane redir_hpane;
78 Gtk::Frame route_select_sample;
80 Gtk::HBox route_hpacker;
81 Gtk::VBox route_vpacker;
83 ProcessorBox* insert_box;
85 ArdourWidgets::HPane list_hpane;
87 ArdourWidgets::HPane right_hpane;
89 Gtk::Frame route_param_sample;
91 Gtk::VBox choice_vpacker;
93 Gtk::Frame latency_sample;
94 Gtk::VBox latency_packer;
95 Gtk::HButtonBox latency_button_box;
96 Gtk::Button latency_apply_button;
97 LatencyGUI* latency_widget;
98 Gtk::Label delay_label;
100 PBD::ScopedConnectionList latency_connections;
101 sigc::connection latency_click_connection;
103 void refresh_latency ();
105 Gtk::ToggleButton input_button;
106 Gtk::ToggleButton output_button;
107 Gtk::Label track_input_label;
109 Gtk::Label title_label;
111 Gtk::Container * _active_view;
112 IOSelector * _input_iosel;
113 IOSelector * _output_iosel;
115 PluginSelector *_plugin_selector;
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_samples();
164 void cleanup_io_samples();
165 void cleanup_view(bool stopupdate = true);
166 void cleanup_latency_sample ();
167 void setup_latency_sample ();
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__ */