#include <gtkmm2ext/stop_signal.h>
#include <gtkmm2ext/window_title.h>
-#include <ardour/session.h>
-#include <ardour/session_route.h>
-#include <ardour/audio_diskstream.h>
-#include <ardour/plugin.h>
-#include <ardour/plugin_manager.h>
-#include <ardour/ardour.h>
-#include <ardour/session.h>
-#include <ardour/route.h>
-#include <ardour/audio_track.h>
-#include <ardour/send.h>
-#include <ardour/plugin_insert.h>
-#include <ardour/port_insert.h>
+#include "ardour/ardour.h"
+#include "ardour/audio_diskstream.h"
+#include "ardour/audio_track.h"
+#include "ardour/plugin.h"
+#include "ardour/plugin_insert.h"
+#include "ardour/plugin_manager.h"
+#include "ardour/port_insert.h"
+#include "ardour/return.h"
+#include "ardour/route.h"
+#include "ardour/send.h"
+#include "ardour/session.h"
+#include "ardour/session.h"
+#include "ardour/session_route.h"
-#include "route_params_ui.h"
+#include "ardour_ui.h"
+#include "gui_thread.h"
+#include "io_selector.h"
#include "keyboard.h"
#include "mixer_strip.h"
#include "plugin_selector.h"
-#include "ardour_ui.h"
#include "plugin_ui.h"
-#include "io_selector.h"
+#include "return_ui.h"
+#include "route_params_ui.h"
#include "send_ui.h"
#include "utils.h"
-#include "gui_thread.h"
#include "i18n.h"
// setup the treeview
route_display.set_model(route_display_model);
- route_display.append_column(_("Tracks/Buses"), route_display_columns.text);
+ route_display.append_column(_("Tracks/Busses"), route_display_columns.text);
route_display.set_name(X_("RouteParamsListDisplay"));
route_display.get_selection()->set_mode(Gtk::SELECTION_SINGLE); // default
route_display.set_reorderable(false);
}
void
-RouteParams_UI::add_routes (Session::RouteList& routes)
+RouteParams_UI::add_routes (RouteList& routes)
{
ENSURE_GUI_THREAD(bind (mem_fun(*this, &RouteParams_UI::add_routes), routes));
- for (Session::RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
+ for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
- if (route->hidden()) {
+ if (route->is_hidden()) {
return;
}
cleanup_processor_boxes();
// construct new redirect boxes
- pre_insert_box = new ProcessorBox(PreFader, *session, _route, *_plugin_selector, _rr_selection);
- post_insert_box = new ProcessorBox(PostFader, *session, _route, *_plugin_selector, _rr_selection);
+ pre_insert_box = new ProcessorBox(PreFader, *session, *_plugin_selector, _rr_selection, 0);
+ post_insert_box = new ProcessorBox(PostFader, *session, *_plugin_selector, _rr_selection, 0);
+
+ pre_insert_box->set_route (_route);
+ post_insert_box->set_route (_route);
pre_redir_hpane.pack1 (*pre_insert_box);
post_redir_hpane.pack1 (*post_insert_box);
- pre_insert_box->InsertSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader));
- pre_insert_box->InsertUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader));
- post_insert_box->InsertSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader));
- post_insert_box->InsertUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader));
+ pre_insert_box->ProcessorSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader));
+ pre_insert_box->ProcessorUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PreFader));
+ post_insert_box->ProcessorSelected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader));
+ post_insert_box->ProcessorUnselected.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_selected), PostFader));
pre_redir_hpane.show_all();
post_redir_hpane.show_all();
cleanup_io_frames();
// input
- _input_iosel = new IOSelector (*session, _route, true);
- _input_iosel->redisplay ();
+ _input_iosel = new IOSelector (*session, _route, false);
+ _input_iosel->setup ();
input_frame.add (*_input_iosel);
input_frame.show_all();
// output
- _output_iosel = new IOSelector (*session, _route, false);
- _output_iosel->redisplay ();
+ _output_iosel = new IOSelector (*session, _route, true);
+ _output_iosel->setup ();
output_frame.add (*_output_iosel);
output_frame.show_all();
}
RouteParams_UI::cleanup_pre_view (bool stopupdate)
{
if (_active_pre_view) {
- LadspaPluginUI * plugui = 0;
+ GenericPluginUI * plugui = 0;
- if (stopupdate && (plugui = dynamic_cast<LadspaPluginUI*>(_active_pre_view)) != 0) {
+ if (stopupdate && (plugui = dynamic_cast<GenericPluginUI*>(_active_pre_view)) != 0) {
plugui->stop_updating (0);
}
RouteParams_UI::cleanup_post_view (bool stopupdate)
{
if (_active_post_view) {
- LadspaPluginUI * plugui = 0;
+ GenericPluginUI * plugui = 0;
- if (stopupdate && (plugui = dynamic_cast<LadspaPluginUI*>(_active_post_view)) != 0) {
+ if (stopupdate && (plugui = dynamic_cast<GenericPluginUI*>(_active_post_view)) != 0) {
plugui->stop_updating (0);
}
_post_plugin_conn.disconnect();
route_display_model->clear();
if (session) {
- boost::shared_ptr<Session::RouteList> r = session->get_routes();
+ boost::shared_ptr<RouteList> r = session->get_routes();
add_routes (*r);
session->GoingAway.connect (mem_fun(*this, &ArdourDialog::session_gone));
session->RouteAdded.connect (mem_fun(*this, &RouteParams_UI::add_routes));
}
boost::shared_ptr<Send> send;
+ boost::shared_ptr<Return> retrn;
boost::shared_ptr<PluginInsert> plugin_insert;
boost::shared_ptr<PortInsert> port_insert;
if (place == PreFader) {
cleanup_pre_view();
- _pre_plugin_conn = send->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
+ _pre_plugin_conn = send->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::redirect_going_away),
+ insert));
_active_pre_view = send_ui;
pre_redir_hpane.add2 (*_active_pre_view);
pre_redir_hpane.show_all();
- }
- else {
+ } else {
cleanup_post_view();
- _post_plugin_conn = send->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
+ _post_plugin_conn = send->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::redirect_going_away),
+ insert));
_active_post_view = send_ui;
post_redir_hpane.add2 (*_active_post_view);
post_redir_hpane.show_all();
}
+
+ } else if ((retrn = boost::dynamic_pointer_cast<Return> (insert)) != 0) {
+
+ ReturnUI *return_ui = new ReturnUI (retrn, *session);
+
+ if (place == PreFader) {
+ cleanup_pre_view();
+ _pre_plugin_conn = retrn->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::redirect_going_away),
+ insert));
+ _active_pre_view = return_ui;
+
+ pre_redir_hpane.add2 (*_active_pre_view);
+ pre_redir_hpane.show_all();
+ } else {
+ cleanup_post_view();
+ _post_plugin_conn = retrn->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::redirect_going_away),
+ insert));
+ _active_post_view = return_ui;
+
+ post_redir_hpane.add2 (*_active_post_view);
+ post_redir_hpane.show_all();
+ }
+
} else if ((plugin_insert = boost::dynamic_pointer_cast<PluginInsert> (insert)) != 0) {
- LadspaPluginUI *plugin_ui = new LadspaPluginUI (plugin_insert, session->frame_rate(), session->engine().frames_per_cycle(), true);
+ GenericPluginUI *plugin_ui = new GenericPluginUI (plugin_insert, true);
if (place == PreFader) {
cleanup_pre_view();
- _pre_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PreFader));
+ _pre_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::plugin_going_away),
+ PreFader));
plugin_ui->start_updating (0);
_active_pre_view = plugin_ui;
pre_redir_hpane.pack2 (*_active_pre_view);
pre_redir_hpane.show_all();
- }
- else {
+ } else {
cleanup_post_view();
- _post_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::plugin_going_away), PostFader));
+ _post_plugin_conn = plugin_insert->plugin()->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::plugin_going_away),
+ PostFader));
plugin_ui->start_updating (0);
_active_post_view = plugin_ui;
post_redir_hpane.pack2 (*_active_post_view);
if (place == PreFader) {
cleanup_pre_view();
- _pre_plugin_conn = port_insert->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
+ _pre_plugin_conn = port_insert->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::redirect_going_away),
+ insert));
_active_pre_view = portinsert_ui;
pre_redir_hpane.pack2 (*_active_pre_view);
portinsert_ui->redisplay();
pre_redir_hpane.show_all();
- }
- else {
+ } else {
cleanup_post_view();
- _post_plugin_conn = port_insert->GoingAway.connect (bind (mem_fun(*this, &RouteParams_UI::redirect_going_away), insert));
+ _post_plugin_conn = port_insert->GoingAway.connect (bind (
+ mem_fun(*this, &RouteParams_UI::redirect_going_away),
+ insert));
_active_post_view = portinsert_ui;
post_redir_hpane.pack2 (*_active_post_view);
portinsert_ui->redisplay();