widget "*BusControlsBaseSelected" style:highest "track_header_selected"
widget "*AutomationTrackControlsBase" style:highest "automation_track_header"
widget "*AutomationTrackControlsBaseSelected" style:highest "track_header_selected"
+widget "*ControlMasterBaseSelected" style:highest "track_header_selected"
widget "*PluginParameterLabel" style:highest "medium_text"
widget "*ParameterValueDisplay" style:highest "medium_bold_entry"
widget "*PluginUIClickBox*" style:highest "medium_bold_entry"
void stop_updating_meters ();
bool meters_running;
- void select_next_route ();
- void select_prev_route ();
+ void select_next_stripable (bool routes_only = true);
+ void select_prev_stripable (bool routes_only = true);
void snap_to_internal (ARDOUR::MusicFrame& first,
ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
reg_sens (editor_actions, "select-all-in-punch-range", _("Select All in Punch Range"), sigc::mem_fun(*this, &Editor::select_all_selectables_using_punch));
reg_sens (editor_actions, "select-all-in-loop-range", _("Select All in Loop Range"), sigc::mem_fun(*this, &Editor::select_all_selectables_using_loop));
- reg_sens (editor_actions, "select-next-route", _("Select Next Track or Bus"), sigc::mem_fun(*this, &Editor::select_next_route));
- reg_sens (editor_actions, "select-prev-route", _("Select Previous Track or Bus"), sigc::mem_fun(*this, &Editor::select_prev_route));
+ reg_sens (editor_actions, "select-next-route", _("Select Next Track or Bus"), sigc::bind (sigc::mem_fun(*this, &Editor::select_next_stripable), true));
+ reg_sens (editor_actions, "select-prev-route", _("Select Previous Track or Bus"), sigc::bind (sigc::mem_fun(*this, &Editor::select_prev_stripable), true));
+
+ reg_sens (editor_actions, "select-next-stripable", _("Select Next Strip"), sigc::bind (sigc::mem_fun(*this, &Editor::select_next_stripable), false));
+ reg_sens (editor_actions, "select-prev-stripable", _("Select Previous Strip"), sigc::bind (sigc::mem_fun(*this, &Editor::select_prev_stripable), false));
act = reg_sens (editor_actions, "track-record-enable-toggle", _("Toggle Record Enable"), sigc::mem_fun(*this, &Editor::toggle_record_enable));
ActionManager::track_selection_sensitive_actions.push_back (act);
}
void
-Editor::select_next_route()
+Editor::select_next_stripable (bool routes_only)
{
if (selection->tracks.empty()) {
selection->set (track_views.front());
TimeAxisView* current = selection->tracks.front();
- RouteUI *rui;
+ bool valid;
do {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
}
}
- rui = dynamic_cast<RouteUI *>(current);
+ if (routes_only) {
+ RouteUI* rui = dynamic_cast<RouteUI *>(current);
+ valid = rui && rui->route()->active();
+ } else {
+ valid = 0 != current->stripable ().get();
+ }
- } while (current->hidden() || (rui == NULL) || !rui->route()->active());
+ } while (current->hidden() || !valid);
selection->set (current);
}
void
-Editor::select_prev_route()
+Editor::select_prev_stripable (bool routes_only)
{
if (selection->tracks.empty()) {
selection->set (track_views.front());
TimeAxisView* current = selection->tracks.front();
- RouteUI *rui;
+ bool valid;
do {
for (TrackViewList::reverse_iterator i = track_views.rbegin(); i != track_views.rend(); ++i) {
break;
}
}
- rui = dynamic_cast<RouteUI *>(current);
+ if (routes_only) {
+ RouteUI* rui = dynamic_cast<RouteUI *>(current);
+ valid = rui && rui->route()->active();
+ } else {
+ valid = 0 != current->stripable ().get();
+ }
- } while (current->hidden() || (rui == NULL) || !rui->route()->active());
+ } while (current->hidden() || !valid);
selection->set (current);
TreeModel::iterator iter = model->get_iter (path);
if (iter) {
boost::shared_ptr<Stripable> stripable = (*iter)[_columns.stripable];
- if (boost::dynamic_pointer_cast<VCA> (stripable)) {
- return false;
- }
}
return true;
favorite_plugins_display.show();
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
+ VCAMasterStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_master, this, _1), gui_context());
/* handle escape */
row[stripable_columns.strip] = vms;
row[stripable_columns.stripable] = vca;
- vms->CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_master, this, _1), gui_context());
+ vms->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::vca_button_release_event), vms));
} else if ((route = boost::dynamic_pointer_cast<Route> (*s))) {
if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) {
move_stripable_into_view ((*_selection.axes.begin())->stripable());
}
+
+ TreeModel::Children rows = track_model->children();
+ for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
+ AxisView* av = (*i)[stripable_columns.strip];
+ VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
+ if (!vms) {
+ continue;
+ }
+ if (vms->vca() && vms->vca()->is_selected()) {
+ _selection.add (vms);
+ } else {
+ _selection.remove (vms);
+ }
+ }
}
redisplay_track_list ();
}
}
+ TreeModel::Children rows = track_model->children();
+ for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
+ AxisView* av = (*i)[stripable_columns.strip];
+ VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
+ if (vms && vms->stripable () == s) {
+ return av;
+ }
+ }
+
return 0;
}
return true;
}
+bool
+Mixer_UI::vca_button_release_event (GdkEventButton *ev, VCAMasterStrip *strip)
+{
+ _selection.set (strip);
+ return true;
+}
+
void
Mixer_UI::set_session (Session* sess)
{
void group_display_selection_changed ();
bool strip_button_release_event (GdkEventButton*, MixerStrip*);
+ bool vca_button_release_event (GdkEventButton*, VCAMasterStrip*);
Width _strip_width;
void
Selection::toggle (TimeAxisView* track)
{
- if (dynamic_cast<VCATimeAxisView*> (track)) {
- return;
- }
-
TrackViewList tr;
tr.push_back (track);
toggle (tr);
void
Selection::add (TimeAxisView* track)
{
- if (dynamic_cast<VCATimeAxisView*> (track)) {
- return;
- }
-
TrackViewList tr;
tr.push_back (track);
add (tr);
void
Selection::remove (TimeAxisView* track)
{
- if (dynamic_cast<VCATimeAxisView*> (track)) {
- return;
- }
-
TrackViewList tvl;
tvl.push_back (track);
remove (tvl);
void
Selection::set (TimeAxisView* track)
{
- if (dynamic_cast<VCATimeAxisView*> (track)) {
- return;
- }
-
TrackViewList tvl;
tvl.push_back (track);
set (tvl);
number_label.set_alignment (.5, .5);
number_label.set_fallthrough_to_parent (true);
number_label.set_inactive_color (_vca->presentation_info().color ());
- number_label.signal_button_release_event().connect (sigc::mem_fun (*this, &VCAMasterStrip::number_button_press));
+ number_label.signal_button_release_event().connect (sigc::mem_fun (*this, &VCAMasterStrip::number_button_press), false);
update_bottom_padding ();
build_context_menu ();
}
context_menu->popup (1, ev->time);
+ return true;
}
- return true;
+ return false;
}
void
, 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 set_height (uint32_t h, TrackHeightMode m = OnlySelf);
- bool selectable() const { return false; }
bool marked_for_display () const;
bool set_marked_for_display (bool);