triggerbox: change FollowActions into an object with a target list (GUI edition)
This commit is contained in:
parent
95edfbac4a
commit
2152e7ba3b
|
@ -244,15 +244,15 @@ CueBoxUI::context_menu (uint64_t idx)
|
|||
Menu* follow_menu = manage (new Menu);
|
||||
MenuList& fitems = follow_menu->items ();
|
||||
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::None), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::None, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Stop), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::Stop, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::Again, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::PrevTrigger, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::NextTrigger, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::ReverseTrigger, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::ForwardTrigger, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::AnyTrigger, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), Trigger::OtherTrigger, idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::None)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::None), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::Stop)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::Stop), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::Again), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::PrevTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::PrevTrigger), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::NextTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::NextTrigger), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::ReverseTrigger), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::ForwardTrigger), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::AnyTrigger), idx)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::OtherTrigger), idx)));
|
||||
|
||||
Menu* launch_menu = manage (new Menu);
|
||||
MenuList& litems = launch_menu->items ();
|
||||
|
@ -355,7 +355,7 @@ CueBoxUI::set_all_colors (uint64_t idx)
|
|||
}
|
||||
|
||||
void
|
||||
CueBoxUI::set_all_follow_action (Trigger::FollowAction fa, uint64_t idx)
|
||||
CueBoxUI::set_all_follow_action (FollowAction const & fa, uint64_t idx)
|
||||
{
|
||||
TriggerList tl;
|
||||
get_slots(tl, idx);
|
||||
|
@ -426,7 +426,7 @@ CueBoxUI::build ()
|
|||
|
||||
_slots.clear ();
|
||||
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) { // TODO
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) { // TODO
|
||||
CueEntry* te = new CueEntry (this, n);
|
||||
|
||||
_slots.push_back (te);
|
||||
|
@ -446,7 +446,7 @@ CueBoxUI::_size_allocate (ArdourCanvas::Rect const& alloc)
|
|||
const float width = alloc.width ();
|
||||
const float height = alloc.height ();
|
||||
|
||||
const float slot_h = height / TriggerBox::default_triggers_per_box; // TODO
|
||||
const float slot_h = height / default_triggers_per_box; // TODO
|
||||
|
||||
float ypos = 0;
|
||||
for (auto& slot : _slots) {
|
||||
|
@ -508,10 +508,10 @@ CueBoxWidget::on_unmap ()
|
|||
|
||||
CueBoxWindow::CueBoxWindow ()
|
||||
{
|
||||
CueBoxWidget* tbw = manage (new CueBoxWidget (-1., TriggerBox::default_triggers_per_box * 16.));
|
||||
CueBoxWidget* tbw = manage (new CueBoxWidget (-1., default_triggers_per_box * 16.));
|
||||
set_title (_("CueBox for XXXX"));
|
||||
|
||||
set_default_size (-1., TriggerBox::default_triggers_per_box * 16.);
|
||||
set_default_size (-1., default_triggers_per_box * 16.);
|
||||
add (*tbw);
|
||||
tbw->show ();
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ private:
|
|||
|
||||
void clear_all_triggers(uint64_t idx);
|
||||
void set_all_colors (uint64_t idx);
|
||||
void set_all_follow_action (ARDOUR::Trigger::FollowAction, uint64_t idx);
|
||||
void set_all_follow_action (ARDOUR::FollowAction const &, uint64_t idx);
|
||||
void set_all_launch_style (ARDOUR::Trigger::LaunchStyle, uint64_t idx);
|
||||
void set_all_quantization (Temporal::BBT_Offset const&, uint64_t idx);
|
||||
|
||||
|
|
|
@ -1149,7 +1149,7 @@ Editor::finish_bringing_in_material (boost::shared_ptr<Region> region,
|
|||
|
||||
if (mode == ImportAsTrigger) {
|
||||
boost::shared_ptr<Region> copy (RegionFactory::create (region, true));
|
||||
for (int s = 0; s < TriggerBox::default_triggers_per_box; ++s) {
|
||||
for (int s = 0; s < default_triggers_per_box; ++s) {
|
||||
if (!existing_track->triggerbox ()->trigger (s)->region ()) {
|
||||
existing_track->triggerbox ()->set_from_selection (s, copy);
|
||||
break;
|
||||
|
|
|
@ -4186,7 +4186,7 @@ Editor::bounce_range_selection (BounceTarget target, bool enable_processing)
|
|||
HBox* tbox = manage (new HBox);
|
||||
tslot = manage (new ArdourDropdown ());
|
||||
|
||||
for (int c = 0; c < TriggerBox::default_triggers_per_box; ++c) {
|
||||
for (int c = 0; c < default_triggers_per_box; ++c) {
|
||||
// XXX ('A' + x) is not translatable, TODO abstract using nth_letter()
|
||||
tslot->AddMenuElem (Menu_Helpers::MenuElem (string_compose ("%1", (char)('A' + c)), sigc::bind ([] (uint32_t* t, uint32_t v) {*t = v;}, &trigger_slot, c)));
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ Editor::popup_ruler_menu (timepos_t const & where, ItemType t)
|
|||
cme = static_cast<Gtk::CheckMenuItem*> (&ruler_items.back());
|
||||
cme->set_active (Config->get_cue_behavior() != ARDOUR::FollowCues);
|
||||
cme->signal_activate().connect (sigc::mem_fun (*this, &Editor::toggle_cue_behavior));
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) {
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) {
|
||||
/* XXX the "letter" names of the cues need to be subject to i18n somehow */
|
||||
ruler_items.push_back (MenuElem (string_compose (_("Cue %1"), (char) ('A' + n)), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_add_new_marker), where, Location::IsCueMarker, n)));
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, bool in_mixer)
|
|||
, processor_box (sess, boost::bind (&MixerStrip::plugin_selector, this), mx.selection(), this, in_mixer)
|
||||
, gpm (sess, 250)
|
||||
, panners (sess)
|
||||
, trigger_display (-1., TriggerBox::default_triggers_per_box*16.)
|
||||
, trigger_display (-1., default_triggers_per_box*16.)
|
||||
, button_size_group (Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL))
|
||||
, rec_mon_table (2, 2)
|
||||
, solo_iso_table (1, 2)
|
||||
|
|
|
@ -137,27 +137,27 @@ SlotPropertyTable::SlotPropertyTable ()
|
|||
_follow_probability_slider.set_name("FollowAction");
|
||||
|
||||
_follow_left.set_name("FollowAction");
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::None), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::None, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::Stop), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::Stop, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::Again, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::PrevTrigger, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::NextTrigger, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ReverseTrigger, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ForwardTrigger, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::AnyTrigger, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::OtherTrigger, 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::None)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::None), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::Stop)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::Stop), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::Again), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::PrevTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::PrevTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::NextTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::NextTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ReverseTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ForwardTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::AnyTrigger), 0)));
|
||||
_follow_left.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::OtherTrigger), 0)));
|
||||
_follow_left.set_sizing_text (longest_follow);
|
||||
|
||||
_follow_right.set_name("FollowAction");
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::None), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::None, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::Stop), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::Stop, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::Again, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::PrevTrigger, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::NextTrigger, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ReverseTrigger, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::ForwardTrigger, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::AnyTrigger, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), Trigger::OtherTrigger, 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::None)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::None), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::Stop)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::Stop), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::Again), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::PrevTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::PrevTrigger), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::NextTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::NextTrigger), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ReverseTrigger), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::ForwardTrigger), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::AnyTrigger), 1)));
|
||||
_follow_right.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::OtherTrigger), 1)));
|
||||
_follow_right.set_sizing_text (longest_follow);
|
||||
|
||||
_launch_style_button.set_name("FollowAction");
|
||||
|
@ -468,7 +468,7 @@ SlotPropertyTable::set_launch_style (Trigger::LaunchStyle ls)
|
|||
}
|
||||
|
||||
void
|
||||
SlotPropertyTable::set_follow_action (Trigger::FollowAction fa, uint64_t idx)
|
||||
SlotPropertyTable::set_follow_action (FollowAction const & fa, uint64_t idx)
|
||||
{
|
||||
if (_ignore_changes) {
|
||||
return;
|
||||
|
@ -538,7 +538,7 @@ SlotPropertyTable::on_trigger_changed (PropertyChange const& pc)
|
|||
_follow_left.set_text (follow_action_to_string (trigger()->follow_action (0)));
|
||||
|
||||
/* set widget sensitivity based on 'left' follow action */
|
||||
bool follow_widgets_sensitive = trigger()->follow_action (0) != Trigger::None;
|
||||
bool follow_widgets_sensitive = trigger()->follow_action (0).type != FollowAction::None;
|
||||
if (follow_widgets_sensitive) {
|
||||
_follow_right.set_sensitive(true);
|
||||
_follow_count_spinner.set_sensitive(true);
|
||||
|
|
|
@ -109,7 +109,7 @@ class SlotPropertyTable : public TriggerUI, public Gtk::Table
|
|||
|
||||
void set_quantize (Temporal::BBT_Offset);
|
||||
void set_launch_style (ARDOUR::Trigger::LaunchStyle);
|
||||
void set_follow_action (ARDOUR::Trigger::FollowAction, uint64_t);
|
||||
void set_follow_action (ARDOUR::FollowAction const &, uint64_t);
|
||||
|
||||
void on_trigger_changed (PBD::PropertyChange const& );
|
||||
|
||||
|
|
|
@ -341,15 +341,15 @@ TriggerMaster::context_menu ()
|
|||
Menu* follow_menu = manage (new Menu);
|
||||
MenuList& fitems = follow_menu->items ();
|
||||
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::None), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::None)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Stop), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::Stop)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::Again)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::PrevTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::NextTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::ForwardTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::ReverseTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::AnyTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), Trigger::OtherTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::None)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::None))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::Stop)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::Stop))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::Again))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::PrevTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::PrevTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::NextTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::NextTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::ForwardTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::ReverseTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::AnyTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::OtherTrigger))));
|
||||
|
||||
Menu* launch_menu = manage (new Menu);
|
||||
MenuList& litems = launch_menu->items ();
|
||||
|
@ -441,7 +441,7 @@ TriggerMaster::set_all_colors ()
|
|||
case Gtk::RESPONSE_ACCEPT: {
|
||||
c = _color_dialog.get_colorsel()->get_current_color();
|
||||
color_t ct = ARDOUR_UI_UTILS::gdk_color_to_rgba(c);
|
||||
for (int n = 0; n< TriggerBox::default_triggers_per_box; n++) {
|
||||
for (int n = 0; n < default_triggers_per_box; n++) {
|
||||
_triggerbox->trigger (n)->set_color(ct);
|
||||
}
|
||||
} break;
|
||||
|
@ -453,10 +453,10 @@ TriggerMaster::set_all_colors ()
|
|||
}
|
||||
|
||||
void
|
||||
TriggerMaster::set_all_follow_action (Trigger::FollowAction fa)
|
||||
TriggerMaster::set_all_follow_action (FollowAction const & fa)
|
||||
{
|
||||
_triggerbox->set_all_follow_action(fa);
|
||||
_triggerbox->set_all_probability(0);
|
||||
_triggerbox->set_all_follow_action (fa);
|
||||
_triggerbox->set_all_probability (0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -722,15 +722,15 @@ CueMaster::context_menu ()
|
|||
Menu* follow_menu = manage (new Menu);
|
||||
MenuList& fitems = follow_menu->items ();
|
||||
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::None), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::None)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Stop), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::Stop)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::Again), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::Again)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::PrevTrigger), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::PrevTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::NextTrigger), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::NextTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ForwardTrigger), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::ForwardTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::ReverseTrigger), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::ReverseTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::AnyTrigger), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::AnyTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(Trigger::OtherTrigger), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), Trigger::OtherTrigger)));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::None)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::None))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::Stop)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::Stop))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::Again))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::PrevTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::PrevTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::NextTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::NextTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::ForwardTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::ReverseTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::AnyTrigger))));
|
||||
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::OtherTrigger))));
|
||||
|
||||
Menu* launch_menu = manage (new Menu);
|
||||
MenuList& litems = launch_menu->items ();
|
||||
|
@ -823,7 +823,7 @@ CueMaster::clear_all_triggers ()
|
|||
|
||||
|
||||
void
|
||||
CueMaster::set_all_follow_action (Trigger::FollowAction fa)
|
||||
CueMaster::set_all_follow_action (FollowAction const & fa)
|
||||
{
|
||||
TriggerBoxList tl;
|
||||
get_boxen(tl);
|
||||
|
|
|
@ -85,7 +85,7 @@ private:
|
|||
|
||||
void clear_all_triggers();
|
||||
void set_all_colors();
|
||||
void set_all_follow_action (ARDOUR::Trigger::FollowAction);
|
||||
void set_all_follow_action (ARDOUR::FollowAction const &);
|
||||
void set_all_launch_style (ARDOUR::Trigger::LaunchStyle);
|
||||
void set_all_quantization (Temporal::BBT_Offset const&);
|
||||
|
||||
|
@ -134,7 +134,7 @@ private:
|
|||
|
||||
void get_boxen (TriggerBoxList &boxlist);
|
||||
void clear_all_triggers();
|
||||
void set_all_follow_action (ARDOUR::Trigger::FollowAction);
|
||||
void set_all_follow_action (ARDOUR::FollowAction const &);
|
||||
void set_all_launch_style (ARDOUR::Trigger::LaunchStyle);
|
||||
void set_all_quantization (Temporal::BBT_Offset const&);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ using namespace std;
|
|||
TriggerPage::TriggerPage ()
|
||||
: Tabbable (_content, _("Trigger Drom"), X_("trigger"))
|
||||
, _cue_area_frame (0.5, 0, 1.0, 0)
|
||||
, _cue_box (32, 16 * TriggerBox::default_triggers_per_box)
|
||||
, _cue_box (32, 16 * default_triggers_per_box)
|
||||
, _master_widget (32, 16)
|
||||
, _master (_master_widget.root ())
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ TriggerStrip::TriggerStrip (Session* s, boost::shared_ptr<ARDOUR::Route> rt)
|
|||
, _pb_selection ()
|
||||
, _tmaster_widget (-1, 16)
|
||||
, _processor_box (s, boost::bind (&TriggerStrip::plugin_selector, this), _pb_selection, 0)
|
||||
, _trigger_display (-1., TriggerBox::default_triggers_per_box * 16.)
|
||||
, _trigger_display (-1., default_triggers_per_box * 16.)
|
||||
, _panners (s)
|
||||
, _level_meter (s)
|
||||
{
|
||||
|
|
|
@ -76,18 +76,18 @@ TriggerUI::TriggerUI ()
|
|||
, _ignore_menu_action (false)
|
||||
{
|
||||
if (follow_strings.empty()) {
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::None));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::Stop));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::Again));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::QueuedTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::NextTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::PrevTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::ForwardTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::ReverseTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::FirstTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::LastTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::AnyTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (Trigger::OtherTrigger));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::None)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::Stop)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::Again)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::QueuedTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::NextTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::PrevTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::ForwardTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::ReverseTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::FirstTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::LastTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::AnyTrigger)));
|
||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::OtherTrigger)));
|
||||
|
||||
for (std::vector<std::string>::const_iterator i = follow_strings.begin(); i != follow_strings.end(); ++i) {
|
||||
if (i->length() > longest_follow.length()) {
|
||||
|
@ -159,7 +159,7 @@ TriggerUI::register_actions ()
|
|||
{
|
||||
trigger_actions = ActionManager::create_action_group (bindings, X_("Triggers"));
|
||||
|
||||
for (int32_t n = 0; n < TriggerBox::default_triggers_per_box; ++n) {
|
||||
for (int32_t n = 0; n < default_triggers_per_box; ++n) {
|
||||
const std::string action_name = string_compose ("trigger-scene-%1", n);
|
||||
const std::string display_name = string_compose (_("Scene %1"), n);
|
||||
|
||||
|
@ -591,58 +591,58 @@ TriggerUI::follow_context_menu ()
|
|||
|
||||
_ignore_menu_action = true;
|
||||
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::None), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::None)));
|
||||
if (trigger ()->follow_action (0) == Trigger::None) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::None)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::None))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::None) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::Stop), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::Stop)));
|
||||
if (trigger ()->follow_action (0) == Trigger::Stop) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::Stop)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::Stop))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::Stop) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::Again), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::Again)));
|
||||
if (trigger ()->follow_action (0) == Trigger::Again) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::Again)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::Again))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::Again) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
#if QUEUED_SLOTS_IMPLEMENTED
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::QueuedTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::QueuedTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::QueuedTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::QueuedTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::QueuedTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::QueuedTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
#endif
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::PrevTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::PrevTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::PrevTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::PrevTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::PrevTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::PrevTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::NextTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::NextTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::NextTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::NextTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::NextTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::NextTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::ForwardTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::ForwardTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::ForwardTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::ForwardTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::ForwardTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::ForwardTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::ReverseTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::ReverseTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::ReverseTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::ReverseTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::ReverseTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::ReverseTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
|
||||
#if 0
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::FirstTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::FirstTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::FirstTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::FirstTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::FirstTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::FirstTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::LastTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::LastTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::LastTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::LastTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::LastTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::LastTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
#endif
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::AnyTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::AnyTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::AnyTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::AnyTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::AnyTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::AnyTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(Trigger::OtherTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), Trigger::OtherTrigger)));
|
||||
if (trigger ()->follow_action (0) == Trigger::OtherTrigger) {
|
||||
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::OtherTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::OtherTrigger))));
|
||||
if (trigger ()->follow_action (0) == FollowAction::OtherTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||
}
|
||||
|
||||
|
@ -684,7 +684,7 @@ TriggerUI::edit_trigger ()
|
|||
}
|
||||
|
||||
void
|
||||
TriggerUI::set_follow_action (Trigger::FollowAction fa)
|
||||
TriggerUI::set_follow_action (FollowAction const & fa)
|
||||
{
|
||||
if (_ignore_menu_action) {
|
||||
return;
|
||||
|
@ -778,32 +778,32 @@ TriggerUI::quantize_length_to_string (BBT_Offset const & ql)
|
|||
}
|
||||
|
||||
std::string
|
||||
TriggerUI::follow_action_to_string (Trigger::FollowAction fa)
|
||||
TriggerUI::follow_action_to_string (FollowAction const & fa)
|
||||
{
|
||||
switch (fa) {
|
||||
case Trigger::None:
|
||||
switch (fa.type) {
|
||||
case FollowAction::None:
|
||||
return _("None");
|
||||
case Trigger::Stop:
|
||||
case FollowAction::Stop:
|
||||
return _("Stop");
|
||||
case Trigger::Again:
|
||||
case FollowAction::Again:
|
||||
return _("Again");
|
||||
case Trigger::QueuedTrigger:
|
||||
case FollowAction::QueuedTrigger:
|
||||
return _("Queued");
|
||||
case Trigger::NextTrigger:
|
||||
case FollowAction::NextTrigger:
|
||||
return _("Next");
|
||||
case Trigger::PrevTrigger:
|
||||
case FollowAction::PrevTrigger:
|
||||
return _("Prev");
|
||||
case Trigger::ForwardTrigger:
|
||||
case FollowAction::ForwardTrigger:
|
||||
return _("Forward");
|
||||
case Trigger::ReverseTrigger:
|
||||
case FollowAction::ReverseTrigger:
|
||||
return _("Reverse");
|
||||
case Trigger::FirstTrigger:
|
||||
case FollowAction::FirstTrigger:
|
||||
return _("First");
|
||||
case Trigger::LastTrigger:
|
||||
case FollowAction::LastTrigger:
|
||||
return _("Last");
|
||||
case Trigger::AnyTrigger:
|
||||
case FollowAction::AnyTrigger:
|
||||
return _("Any");
|
||||
case Trigger::OtherTrigger:
|
||||
case FollowAction::OtherTrigger:
|
||||
return _("Other");
|
||||
}
|
||||
/*NOTREACHED*/
|
||||
|
|
|
@ -45,8 +45,7 @@ public:
|
|||
|
||||
virtual void on_trigger_changed (PBD::PropertyChange const& ) = 0;
|
||||
|
||||
static std::string follow_action_to_string (ARDOUR::Trigger::FollowAction);
|
||||
static ARDOUR::Trigger::FollowAction string_to_follow_action (std::string const &);
|
||||
static std::string follow_action_to_string (ARDOUR::FollowAction const &);
|
||||
static std::string quantize_length_to_string (Temporal::BBT_Offset const &);
|
||||
static std::string launch_style_to_string (ARDOUR::Trigger::LaunchStyle);
|
||||
static std::string stretch_mode_to_string (ARDOUR::Trigger::StretchMode);
|
||||
|
@ -74,7 +73,7 @@ public:
|
|||
void follow_context_menu ();
|
||||
void context_menu ();
|
||||
|
||||
void set_follow_action (ARDOUR::Trigger::FollowAction);
|
||||
void set_follow_action (ARDOUR::FollowAction const &);
|
||||
void set_launch_style (ARDOUR::Trigger::LaunchStyle);
|
||||
void set_quantization (Temporal::BBT_Offset const&);
|
||||
void set_from_selection ();
|
||||
|
|
|
@ -178,7 +178,7 @@ TriggerEntry::_size_allocate (ArdourCanvas::Rect const& alloc)
|
|||
}
|
||||
|
||||
void
|
||||
TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, Trigger::FollowAction icon, float size, float scale) const
|
||||
TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, FollowAction const & icon, float size, float scale) const
|
||||
{
|
||||
uint32_t bg_color = fill_color ();
|
||||
uint32_t fg_color = UIConfiguration::instance ().color ("neutral:midground");
|
||||
|
@ -199,32 +199,32 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, Trigger::
|
|||
set_source_rgba (context, fg_color);
|
||||
context->set_line_width (1 * scale);
|
||||
|
||||
switch (icon) {
|
||||
case Trigger::Stop:
|
||||
switch (icon.type) {
|
||||
case FollowAction::Stop:
|
||||
context->rectangle (6 * scale, 6 * scale, size - 12 * scale, size - 12 * scale);
|
||||
context->stroke ();
|
||||
break;
|
||||
case Trigger::Again:
|
||||
case FollowAction::Again:
|
||||
context->arc (size / 2, size / 2, size * 0.20, 60. * (M_PI / 180.0), 2 * M_PI);
|
||||
context->stroke ();
|
||||
context->arc (size / 2 + size * 0.2, size / 2, 1.5 * scale, 0, 2 * M_PI); // arrow head
|
||||
context->fill ();
|
||||
break;
|
||||
case Trigger::NextTrigger:
|
||||
case FollowAction::NextTrigger:
|
||||
context->move_to (size / 2, 3 * scale);
|
||||
context->line_to (size / 2, size - 5 * scale);
|
||||
context->stroke ();
|
||||
context->arc (size / 2, size - 5 * scale, 2 * scale, 0, 2 * M_PI); // arrow head
|
||||
context->fill ();
|
||||
break;
|
||||
case Trigger::PrevTrigger:
|
||||
case FollowAction::PrevTrigger:
|
||||
context->move_to (size / 2, 5 * scale);
|
||||
context->line_to (size / 2, size - 3 * scale);
|
||||
context->stroke ();
|
||||
context->arc (size / 2, 5 * scale, 2 * scale, 0, 2 * M_PI); // arrow head
|
||||
context->fill ();
|
||||
break;
|
||||
case Trigger::ForwardTrigger:
|
||||
case FollowAction::ForwardTrigger:
|
||||
context->move_to (size / 2, 3 * scale);
|
||||
context->line_to (size / 2, size - 3 * scale);
|
||||
context->stroke ();
|
||||
|
@ -241,7 +241,7 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, Trigger::
|
|||
context->arc (size / 2, size - 3 * scale, 2 * scale, 0, 2 * M_PI); // arrow head
|
||||
context->fill ();
|
||||
break;
|
||||
case Trigger::ReverseTrigger:
|
||||
case FollowAction::ReverseTrigger:
|
||||
context->arc (size / 2, 3 * scale, 2 * scale, 0, 2 * M_PI); // arrow head
|
||||
set_source_rgba (context, fg_color);
|
||||
context->fill ();
|
||||
|
@ -259,17 +259,17 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, Trigger::
|
|||
context->fill ();
|
||||
|
||||
break;
|
||||
case Trigger::QueuedTrigger: {
|
||||
case FollowAction::QueuedTrigger: {
|
||||
Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (context);
|
||||
layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
|
||||
layout->set_text (icon == Trigger::AnyTrigger ? "&" : "@");
|
||||
layout->set_text (icon == FollowAction::AnyTrigger ? "&" : "@");
|
||||
int tw, th;
|
||||
layout->get_pixel_size (tw, th);
|
||||
context->move_to (size / 2, size / 2);
|
||||
context->rel_move_to (-tw / 2, -th / 2);
|
||||
layout->show_in_cairo_context (context);
|
||||
} break;
|
||||
case Trigger::AnyTrigger: {
|
||||
case FollowAction::AnyTrigger: {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
Cairo::Matrix m = context->get_matrix ();
|
||||
context->translate (size / 2, size / 2);
|
||||
|
@ -281,7 +281,7 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, Trigger::
|
|||
}
|
||||
context->set_identity_matrix ();
|
||||
} break;
|
||||
case Trigger::OtherTrigger: {
|
||||
case FollowAction::OtherTrigger: {
|
||||
context->set_line_width (1.5 * scale);
|
||||
set_source_rgba (context, HSV (UIConfiguration::instance ().color ("neutral:midground")).lighter (0.25).color ()); // needs to be brighter to maintain balance
|
||||
for (int i = 0; i < 6; i++) {
|
||||
|
@ -295,7 +295,7 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, Trigger::
|
|||
}
|
||||
context->set_identity_matrix ();
|
||||
} break;
|
||||
case Trigger::None:
|
||||
case FollowAction::None:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -924,7 +924,7 @@ TriggerBoxUI::_size_allocate (ArdourCanvas::Rect const& alloc)
|
|||
const float width = alloc.width ();
|
||||
const float height = alloc.height ();
|
||||
|
||||
const float slot_h = height / TriggerBox::default_triggers_per_box; // TODO
|
||||
const float slot_h = height / default_triggers_per_box; // TODO
|
||||
|
||||
float ypos = 0;
|
||||
for (auto& slot : _slots) {
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
ArdourCanvas::Text* name_text;
|
||||
|
||||
void draw_launch_icon (Cairo::RefPtr<Cairo::Context> context, float size, float scale) const;
|
||||
void draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, ARDOUR::Trigger::FollowAction icon, float size, float scale) const;
|
||||
void draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, ARDOUR::FollowAction const & icon, float size, float scale) const;
|
||||
|
||||
void render (ArdourCanvas::Rect const& area, Cairo::RefPtr<Cairo::Context> context) const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue