X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Froute_params_ui.cc;h=5c709d80bfebeb9ab944042d8cfb89be1bf1b816;hb=6001b8d28dd764bada8b9198a5f91e0a2f5251f6;hp=30a939022e6786f7e45b081b1c5fd12c27504b9d;hpb=70b939da4f9d4097160e32f2373a7a5ff8f4957f;p=ardour.git diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc index 30a939022e..5c709d80bf 100644 --- a/gtk2_ardour/route_params_ui.cc +++ b/gtk2_ardour/route_params_ui.cc @@ -26,29 +26,31 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#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" @@ -229,8 +231,8 @@ RouteParams_UI::setup_processor_boxes() cleanup_processor_boxes(); // construct new redirect boxes - pre_insert_box = new ProcessorBox(PreFader, *session, *_plugin_selector, _rr_selection); - post_insert_box = new ProcessorBox(PostFader, *session, *_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); @@ -559,6 +561,7 @@ RouteParams_UI::redirect_selected (boost::shared_ptr insert, } boost::shared_ptr send; + boost::shared_ptr retrn; boost::shared_ptr plugin_insert; boost::shared_ptr port_insert; @@ -568,35 +571,66 @@ RouteParams_UI::redirect_selected (boost::shared_ptr 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 (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 (insert)) != 0) { 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); @@ -609,15 +643,18 @@ RouteParams_UI::redirect_selected (boost::shared_ptr insert, 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();