mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
Allow to select VCAs
This commit is contained in:
parent
d18a43422c
commit
0ae9cda51d
11 changed files with 68 additions and 37 deletions
|
|
@ -1152,6 +1152,7 @@ widget "*MidiTrackControlsBaseSelected" style:highest "track_header_selected"
|
||||||
widget "*BusControlsBaseSelected" style:highest "track_header_selected"
|
widget "*BusControlsBaseSelected" style:highest "track_header_selected"
|
||||||
widget "*AutomationTrackControlsBase" style:highest "automation_track_header"
|
widget "*AutomationTrackControlsBase" style:highest "automation_track_header"
|
||||||
widget "*AutomationTrackControlsBaseSelected" style:highest "track_header_selected"
|
widget "*AutomationTrackControlsBaseSelected" style:highest "track_header_selected"
|
||||||
|
widget "*ControlMasterBaseSelected" style:highest "track_header_selected"
|
||||||
widget "*PluginParameterLabel" style:highest "medium_text"
|
widget "*PluginParameterLabel" style:highest "medium_text"
|
||||||
widget "*ParameterValueDisplay" style:highest "medium_bold_entry"
|
widget "*ParameterValueDisplay" style:highest "medium_bold_entry"
|
||||||
widget "*PluginUIClickBox*" style:highest "medium_bold_entry"
|
widget "*PluginUIClickBox*" style:highest "medium_bold_entry"
|
||||||
|
|
|
||||||
|
|
@ -2175,8 +2175,8 @@ private:
|
||||||
void stop_updating_meters ();
|
void stop_updating_meters ();
|
||||||
bool meters_running;
|
bool meters_running;
|
||||||
|
|
||||||
void select_next_route ();
|
void select_next_stripable (bool routes_only = true);
|
||||||
void select_prev_route ();
|
void select_prev_stripable (bool routes_only = true);
|
||||||
|
|
||||||
void snap_to_internal (ARDOUR::MusicFrame& first,
|
void snap_to_internal (ARDOUR::MusicFrame& first,
|
||||||
ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
|
ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
|
||||||
|
|
|
||||||
|
|
@ -237,8 +237,11 @@ Editor::register_actions ()
|
||||||
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-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-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-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::mem_fun(*this, &Editor::select_prev_route));
|
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));
|
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);
|
ActionManager::track_selection_sensitive_actions.push_back (act);
|
||||||
|
|
|
||||||
|
|
@ -6375,7 +6375,7 @@ Editor::split_region ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::select_next_route()
|
Editor::select_next_stripable (bool routes_only)
|
||||||
{
|
{
|
||||||
if (selection->tracks.empty()) {
|
if (selection->tracks.empty()) {
|
||||||
selection->set (track_views.front());
|
selection->set (track_views.front());
|
||||||
|
|
@ -6384,7 +6384,7 @@ Editor::select_next_route()
|
||||||
|
|
||||||
TimeAxisView* current = selection->tracks.front();
|
TimeAxisView* current = selection->tracks.front();
|
||||||
|
|
||||||
RouteUI *rui;
|
bool valid;
|
||||||
do {
|
do {
|
||||||
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
|
||||||
|
|
||||||
|
|
@ -6400,9 +6400,14 @@ Editor::select_next_route()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
selection->set (current);
|
||||||
|
|
||||||
|
|
@ -6410,7 +6415,7 @@ Editor::select_next_route()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::select_prev_route()
|
Editor::select_prev_stripable (bool routes_only)
|
||||||
{
|
{
|
||||||
if (selection->tracks.empty()) {
|
if (selection->tracks.empty()) {
|
||||||
selection->set (track_views.front());
|
selection->set (track_views.front());
|
||||||
|
|
@ -6419,7 +6424,7 @@ Editor::select_prev_route()
|
||||||
|
|
||||||
TimeAxisView* current = selection->tracks.front();
|
TimeAxisView* current = selection->tracks.front();
|
||||||
|
|
||||||
RouteUI *rui;
|
bool valid;
|
||||||
do {
|
do {
|
||||||
for (TrackViewList::reverse_iterator i = track_views.rbegin(); i != track_views.rend(); ++i) {
|
for (TrackViewList::reverse_iterator i = track_views.rbegin(); i != track_views.rend(); ++i) {
|
||||||
|
|
||||||
|
|
@ -6433,9 +6438,14 @@ Editor::select_prev_route()
|
||||||
break;
|
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);
|
selection->set (current);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1463,9 +1463,6 @@ EditorRoutes::selection_filter (Glib::RefPtr<TreeModel> const& model, TreeModel:
|
||||||
TreeModel::iterator iter = model->get_iter (path);
|
TreeModel::iterator iter = model->get_iter (path);
|
||||||
if (iter) {
|
if (iter) {
|
||||||
boost::shared_ptr<Stripable> stripable = (*iter)[_columns.stripable];
|
boost::shared_ptr<Stripable> stripable = (*iter)[_columns.stripable];
|
||||||
if (boost::dynamic_pointer_cast<VCA> (stripable)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,7 @@ Mixer_UI::Mixer_UI ()
|
||||||
favorite_plugins_display.show();
|
favorite_plugins_display.show();
|
||||||
|
|
||||||
MixerStrip::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::remove_strip, this, _1), gui_context());
|
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 */
|
/* handle escape */
|
||||||
|
|
||||||
|
|
@ -535,7 +536,7 @@ Mixer_UI::add_stripables (StripableList& slist)
|
||||||
row[stripable_columns.strip] = vms;
|
row[stripable_columns.strip] = vms;
|
||||||
row[stripable_columns.stripable] = vca;
|
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))) {
|
} else if ((route = boost::dynamic_pointer_cast<Route> (*s))) {
|
||||||
|
|
||||||
|
|
@ -828,6 +829,20 @@ Mixer_UI::sync_treeview_from_presentation_info (PropertyChange const & what_chan
|
||||||
if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) {
|
if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) {
|
||||||
move_stripable_into_view ((*_selection.axes.begin())->stripable());
|
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 ();
|
redisplay_track_list ();
|
||||||
|
|
@ -867,6 +882,15 @@ Mixer_UI::axis_view_by_stripable (boost::shared_ptr<Stripable> s) const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -972,6 +996,13 @@ Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Mixer_UI::vca_button_release_event (GdkEventButton *ev, VCAMasterStrip *strip)
|
||||||
|
{
|
||||||
|
_selection.set (strip);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_UI::set_session (Session* sess)
|
Mixer_UI::set_session (Session* sess)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -328,6 +328,7 @@ private:
|
||||||
void group_display_selection_changed ();
|
void group_display_selection_changed ();
|
||||||
|
|
||||||
bool strip_button_release_event (GdkEventButton*, MixerStrip*);
|
bool strip_button_release_event (GdkEventButton*, MixerStrip*);
|
||||||
|
bool vca_button_release_event (GdkEventButton*, VCAMasterStrip*);
|
||||||
|
|
||||||
Width _strip_width;
|
Width _strip_width;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1462,10 +1462,6 @@ Selection::toggle (const TrackViewList& track_list)
|
||||||
void
|
void
|
||||||
Selection::toggle (TimeAxisView* track)
|
Selection::toggle (TimeAxisView* track)
|
||||||
{
|
{
|
||||||
if (dynamic_cast<VCATimeAxisView*> (track)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackViewList tr;
|
TrackViewList tr;
|
||||||
tr.push_back (track);
|
tr.push_back (track);
|
||||||
toggle (tr);
|
toggle (tr);
|
||||||
|
|
@ -1489,10 +1485,6 @@ Selection::add (TrackViewList const & track_list)
|
||||||
void
|
void
|
||||||
Selection::add (TimeAxisView* track)
|
Selection::add (TimeAxisView* track)
|
||||||
{
|
{
|
||||||
if (dynamic_cast<VCATimeAxisView*> (track)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackViewList tr;
|
TrackViewList tr;
|
||||||
tr.push_back (track);
|
tr.push_back (track);
|
||||||
add (tr);
|
add (tr);
|
||||||
|
|
@ -1501,10 +1493,6 @@ Selection::add (TimeAxisView* track)
|
||||||
void
|
void
|
||||||
Selection::remove (TimeAxisView* track)
|
Selection::remove (TimeAxisView* track)
|
||||||
{
|
{
|
||||||
if (dynamic_cast<VCATimeAxisView*> (track)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackViewList tvl;
|
TrackViewList tvl;
|
||||||
tvl.push_back (track);
|
tvl.push_back (track);
|
||||||
remove (tvl);
|
remove (tvl);
|
||||||
|
|
@ -1526,10 +1514,6 @@ Selection::remove (const TrackViewList& t)
|
||||||
void
|
void
|
||||||
Selection::set (TimeAxisView* track)
|
Selection::set (TimeAxisView* track)
|
||||||
{
|
{
|
||||||
if (dynamic_cast<VCATimeAxisView*> (track)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackViewList tvl;
|
TrackViewList tvl;
|
||||||
tvl.push_back (track);
|
tvl.push_back (track);
|
||||||
set (tvl);
|
set (tvl);
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
|
||||||
number_label.set_alignment (.5, .5);
|
number_label.set_alignment (.5, .5);
|
||||||
number_label.set_fallthrough_to_parent (true);
|
number_label.set_fallthrough_to_parent (true);
|
||||||
number_label.set_inactive_color (_vca->presentation_info().color ());
|
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 ();
|
update_bottom_padding ();
|
||||||
|
|
||||||
|
|
@ -407,8 +407,9 @@ VCAMasterStrip::number_button_press (GdkEventButton* ev)
|
||||||
build_context_menu ();
|
build_context_menu ();
|
||||||
}
|
}
|
||||||
context_menu->popup (1, ev->time);
|
context_menu->popup (1, ev->time);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,10 @@ VCATimeAxisView::VCATimeAxisView (PublicEditor& ed, Session* s, ArdourCanvas::Ca
|
||||||
, gain_meter (s, true, 75, 14) // XXX stupid magic numbers, match sizes in RouteTimeAxisView
|
, gain_meter (s, true, 75, 14) // XXX stupid magic numbers, match sizes in RouteTimeAxisView
|
||||||
, automation_action_menu (0)
|
, automation_action_menu (0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
controls_base_selected_name = X_("ControlMasterBaseSelected");
|
||||||
|
controls_base_unselected_name = X_("ControlMasterBaseUnselected");
|
||||||
|
|
||||||
solo_button.set_name ("solo button");
|
solo_button.set_name ("solo button");
|
||||||
set_tooltip (solo_button, _("Solo slaves"));
|
set_tooltip (solo_button, _("Solo slaves"));
|
||||||
solo_button.signal_button_release_event().connect (sigc::mem_fun (*this, &VCATimeAxisView::solo_release), false);
|
solo_button.signal_button_release_event().connect (sigc::mem_fun (*this, &VCATimeAxisView::solo_release), false);
|
||||||
|
|
@ -105,8 +109,8 @@ VCATimeAxisView::VCATimeAxisView (PublicEditor& ed, Session* s, ArdourCanvas::Ca
|
||||||
automation_button.show ();
|
automation_button.show ();
|
||||||
gain_meter.get_gain_slider().show ();
|
gain_meter.get_gain_slider().show ();
|
||||||
|
|
||||||
controls_ebox.set_name ("ControlMasterBaseUnselected");
|
controls_ebox.set_name (controls_base_unselected_name);
|
||||||
time_axis_frame.set_name ("ControlMasterBaseUnselected");
|
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());
|
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());
|
Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&VCATimeAxisView::parameter_changed, this, _1), gui_context());
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ public:
|
||||||
|
|
||||||
void set_height (uint32_t h, TrackHeightMode m = OnlySelf);
|
void set_height (uint32_t h, TrackHeightMode m = OnlySelf);
|
||||||
|
|
||||||
bool selectable() const { return false; }
|
|
||||||
bool marked_for_display () const;
|
bool marked_for_display () const;
|
||||||
bool set_marked_for_display (bool);
|
bool set_marked_for_display (bool);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue