#include "gui_thread.h"
#include "public_editor.h"
+#include "mixer_ui.h"
#include "ui_config.h"
#include "vca_time_axis.h"
, gain_meter (s, true, 75, 14) // XXX stupid magic numbers, match sizes in RouteTimeAxisView
, automation_action_menu (0)
{
+
+ controls_base_selected_name = X_("ControlMasterBaseSelected");
+ controls_base_unselected_name = X_("ControlMasterBaseUnselected");
+
solo_button.set_name ("solo button");
set_tooltip (solo_button, _("Solo slaves"));
solo_button.signal_button_release_event().connect (sigc::mem_fun (*this, &VCATimeAxisView::solo_release), false);
automation_button.show ();
gain_meter.get_gain_slider().show ();
- controls_ebox.set_name ("ControlMasterBaseUnselected");
- time_axis_frame.set_name ("ControlMasterBaseUnselected");
+ controls_ebox.set_name (controls_base_unselected_name);
+ time_axis_frame.set_name (controls_base_unselected_name);
s->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&VCATimeAxisView::parameter_changed, this, _1), gui_context());
Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&VCATimeAxisView::parameter_changed, this, _1), gui_context());
}
}
+void
+VCATimeAxisView::build_display_menu ()
+{
+ using namespace Menu_Helpers;
+ /* prepare it */
+ TimeAxisView::build_display_menu ();
+
+ MenuList& items = display_menu->items();
+ items.push_back (MenuElem (_("Color..."), sigc::mem_fun (*this, &VCATimeAxisView::choose_color)));
+ if (_size_menu) {
+ detach_menu (*_size_menu);
+ }
+ build_size_menu ();
+ items.push_back (MenuElem (_("Height"), *_size_menu));
+ items.push_back (SeparatorElem());
+
+ build_automation_action_menu (true);
+ items.push_back (MenuElem (_("Automation"), *automation_action_menu));
+
+ items.push_back (SeparatorElem());
+ items.push_back (MenuElem (_("Drop All Slaves"), sigc::mem_fun (*this, &VCATimeAxisView::drop_all_slaves)));
+ items.push_back (SeparatorElem());
+ items.push_back (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks)));
+}
+
+
void
VCATimeAxisView::build_automation_action_menu (bool for_selection)
{
no_redraw = false;
request_redraw ();
}
+
+void
+VCATimeAxisView::drop_all_slaves ()
+{
+ _vca->Drop (); /* EMIT SIGNAL */
+
+ if (Mixer_UI::instance()->showing_spill_for (_vca)) {
+ Mixer_UI::instance()->show_spill (boost::shared_ptr<Stripable>());
+ }
+}
+
+void
+VCATimeAxisView::choose_color () {
+ _color_picker.popup (_vca);
+}