#include <ardour/panner.h>
#include <ardour/send.h>
#include <ardour/processor.h>
+#include <ardour/profile.h>
#include <ardour/ladspa_plugin.h>
-#include <ardour/bundle.h>
+#include <ardour/auto_bundle.h>
+#include <ardour/user_bundle.h>
#include "ardour_ui.h"
#include "ardour_dialog.h"
: AxisView(sess),
RouteUI (rt, sess, _("Mute"), _("Solo"), _("Record")),
_mixer(mx),
+ _mixer_owned (in_mixer),
pre_processor_box (PreFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
post_processor_box (PostFader, sess, rt, mx.plugin_selector(), mx.selection(), in_mixer),
gpm (_route, sess),
input_selector = 0;
output_selector = 0;
group_menu = 0;
- _marked_for_display = false;
+ if (!_route->is_hidden()) {
+ _marked_for_display = true;
+ }
route_ops_menu = 0;
ignore_comment_edit = false;
ignore_toggle = false;
bottom_button_table.attach (group_button, 0, 1, 0, 1);
if (is_audio_track()) {
-
- rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press), false);
- rec_enable_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::rec_enable_release));
-
- rec_enable_button->set_name ("MixerRecordEnableButton");
-
boost::shared_ptr<AudioTrack> at = audio_track();
at->FreezeChange.connect (mem_fun(*this, &MixerStrip::map_frozen));
button_table.attach (speed_frame, 0, 2, 5, 6);
#endif /* VARISPEED_IN_MIXER_STRIP */
+ }
+
+ if(rec_enable_button) {
+ rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press), false);
+ rec_enable_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::rec_enable_release));
+
+ rec_enable_button->set_name ("MixerRecordEnableButton");
button_table.attach (*rec_enable_button, 0, 2, 2, 3);
}
-
+
name_button.add (name_label);
name_button.set_name ("MixerNameButton");
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
global_vpacker.pack_start (*gain_meter_alignment,Gtk::PACK_SHRINK);
global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK);
global_vpacker.pack_start (post_processor_box, true, true);
- if (!is_midi_track())
+ if (!is_midi_track()) {
global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
+ }
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
global_vpacker.pack_start (comment_button, Gtk::PACK_SHRINK);
whvbox->show();
hide_icon->show();
width_icon->show();
- gain_meter_alignment->show();
+ gain_meter_alignment->show_all();
pre_processor_box.show();
- hide_button.show();
+
+ if (!route()->is_master() && !route()->is_control()) {
+ /* we don't allow master or control routes to be hidden */
+ hide_button.show();
+ }
width_button.show();
width_hide_box.show();
global_frame.show();
_width_owner = owner;
- if (_width == w) {
- return;
- }
-
ensure_xml_node ();
_width = w;
switch (ev->button) {
case 1:
+ {
output_menu.set_name ("ArdourContextMenu");
citems.clear();
citems.push_back (SeparatorElem());
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_output)));
citems.push_back (SeparatorElem());
-
- _session.foreach_bundle (
- bind (mem_fun (*this, &MixerStrip::add_bundle_to_output_menu), _route->output_bundle ())
- );
+
+ std::vector<boost::shared_ptr<Bundle> > current = _route->bundles_connected_to_outputs ();
+
+ _session.foreach_bundle (
+ bind (mem_fun (*this, &MixerStrip::add_bundle_to_output_menu), current)
+ );
output_menu.popup (1, ev->time);
break;
+ }
default:
break;
switch (ev->button) {
case 1:
+ {
citems.push_back (MenuElem (_("Edit"), mem_fun(*this, &MixerStrip::edit_input_configuration)));
citems.push_back (SeparatorElem());
citems.push_back (MenuElem (_("Disconnect"), mem_fun (*(static_cast<RouteUI*>(this)), &RouteUI::disconnect_input)));
citems.push_back (SeparatorElem());
-
+
+ std::vector<boost::shared_ptr<Bundle> > current = _route->bundles_connected_to_inputs ();
+
_session.foreach_bundle (
- bind (mem_fun (*this, &MixerStrip::add_bundle_to_input_menu), _route->input_bundle ())
+ bind (mem_fun (*this, &MixerStrip::add_bundle_to_input_menu), current)
);
input_menu.popup (1, ev->time);
break;
-
+ }
default:
break;
}
}
void
-MixerStrip::add_bundle_to_input_menu (boost::shared_ptr<Bundle> b, boost::shared_ptr<Bundle> current)
+MixerStrip::add_bundle_to_input_menu (boost::shared_ptr<Bundle> b, std::vector<boost::shared_ptr<Bundle> > const & current)
{
using namespace Menu_Helpers;
/* the input menu needs to contain only output bundles (that we
can connect inputs to */
- if (boost::dynamic_pointer_cast<OutputBundle, Bundle> (b) == 0) {
- return;
- }
+ if (b->ports_are_outputs() == false) {
+ return;
+ }
MenuList& citems = input_menu.items();
- if (b->nchannels() == _route->n_inputs().n_total()) {
+ if (b->nchannels() == _route->n_inputs()) {
citems.push_back (CheckMenuElem (b->name(), bind (mem_fun(*this, &MixerStrip::bundle_input_chosen), b)));
-
- if (current == b) {
+
+ if (std::find (current.begin(), current.end(), b) != current.end()) {
ignore_toggle = true;
dynamic_cast<CheckMenuItem *> (&citems.back())->set_active (true);
ignore_toggle = false;
}
void
-MixerStrip::add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, boost::shared_ptr<Bundle> current)
+MixerStrip::add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, std::vector<boost::shared_ptr<Bundle> > const & current)
{
using namespace Menu_Helpers;
/* the output menu needs to contain only input bundles (that we
can connect outputs to */
- if (boost::dynamic_pointer_cast<InputBundle, Bundle> (b) == 0) {
- return;
- }
+ if (b->ports_are_inputs() == false) {
+ return;
+ }
-
- if (b->nchannels() == _route->n_outputs().n_total()) {
+ if (b->nchannels() == _route->n_outputs()) {
MenuList& citems = output_menu.items();
citems.push_back (CheckMenuElem (b->name(), bind (mem_fun(*this, &MixerStrip::bundle_output_chosen), b)));
- if (current == b) {
+ if (std::find (current.begin(), current.end(), b) != current.end()) {
ignore_toggle = true;
dynamic_cast<CheckMenuItem *> (&citems.back())->set_active (true);
ignore_toggle = false;
{
if (is_track()) {
- map_frozen ();
-
- update_input_display ();
-
if (input_selector) {
input_selector->hide_all ();
}
} else {
- map_frozen ();
-
- update_input_display ();
show_passthru_color ();
}
}
void
MixerStrip::update_input_display ()
{
- boost::shared_ptr<ARDOUR::Bundle> c;
+ std::vector<boost::shared_ptr<ARDOUR::Bundle> > c = _route->bundles_connected_to_inputs ();
- if ((c = _route->input_bundle()) != 0) {
- input_label.set_text (c->name());
+ /* XXX: how do we represent >1 connected bundle? */
+ if (c.empty() == false) {
+ input_label.set_text (c[0]->name());
} else {
switch (_width) {
case Wide:
void
MixerStrip::update_output_display ()
{
- boost::shared_ptr<ARDOUR::Bundle> c;
+ std::vector<boost::shared_ptr<ARDOUR::Bundle> > c = _route->bundles_connected_to_outputs ();
- if ((c = _route->output_bundle()) != 0) {
- output_label.set_text (c->name());
+ /* XXX: how do we represent >1 connected bundle? */
+ if (c.empty() == false) {
+ output_label.set_text (c[0]->name());
} else {
switch (_width) {
case Wide:
MixerStrip::input_changed (IOChange change, void *src)
{
Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_input_display));
+ set_width(_width, this);
}
void
MixerStrip::output_changed (IOChange change, void *src)
{
Gtkmm2ext::UI::instance()->call_slot (mem_fun(*this, &MixerStrip::update_output_display));
+ set_width(_width, this);
}
build_remote_control_menu ();
items.push_back (SeparatorElem());
- items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
+ if (!Profile->get_sae()) {
+ items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
+ }
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
pre_processor_box.set_sensitive (true);
post_processor_box.set_sensitive (true);
speed_spinner.set_sensitive (true);
+ // XXX need some way, maybe, to retoggle redirect editors
break;
}
}
+
+ hide_redirect_editors ();
+}
+
+void
+MixerStrip::hide_redirect_editors ()
+{
_route->foreach_processor (this, &MixerStrip::hide_processor_editor);
}
}
gpm.setup_meters ();
+ // reset peak when meter point changes
+ gpm.reset_peak_display();
+ set_width(_width, this);
}