triggerbox: add Forward/ReverseTrigger follow actions (GUI edition)
This commit is contained in:
parent
0f6aa118f0
commit
66b170075b
|
@ -277,6 +277,8 @@ CueBoxUI::context_menu (uint64_t 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)));
|
||||
|
||||
|
|
|
@ -144,6 +144,8 @@ SlotPropertyTable::SlotPropertyTable ()
|
|||
_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.set_sizing_text (longest_follow);
|
||||
|
@ -154,6 +156,8 @@ SlotPropertyTable::SlotPropertyTable ()
|
|||
_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.set_sizing_text (longest_follow);
|
||||
|
|
|
@ -354,6 +354,8 @@ TriggerMaster::context_menu ()
|
|||
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)));
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ TriggerUI::TriggerUI ()
|
|||
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));
|
||||
|
@ -577,6 +579,16 @@ TriggerUI::follow_context_menu ()
|
|||
if (trigger ()->follow_action (0) == Trigger::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) {
|
||||
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) {
|
||||
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) {
|
||||
|
@ -738,6 +750,10 @@ TriggerUI::follow_action_to_string (Trigger::FollowAction fa)
|
|||
return _("Next");
|
||||
case Trigger::PrevTrigger:
|
||||
return _("Prev");
|
||||
case Trigger::ForwardTrigger:
|
||||
return _("Forward");
|
||||
case Trigger::ReverseTrigger:
|
||||
return _("Reverse");
|
||||
case Trigger::FirstTrigger:
|
||||
return _("First");
|
||||
case Trigger::LastTrigger:
|
||||
|
|
|
@ -217,6 +217,21 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, Trigger::
|
|||
context->arc (size / 2, 5 * scale, 1.5 * scale, 0, 2 * M_PI); // arrow head
|
||||
context->fill ();
|
||||
break;
|
||||
/* XXX Ben to add new icons for next two */
|
||||
case Trigger::ForwardTrigger:
|
||||
context->move_to (size / 2, 3 * scale);
|
||||
context->line_to (size / 2, size - 5 * scale);
|
||||
context->stroke ();
|
||||
context->arc (size / 2, size - 5 * scale, 1.5 * scale, 0, 2 * M_PI); // arrow head
|
||||
context->fill ();
|
||||
break;
|
||||
case Trigger::ReverseTrigger:
|
||||
context->move_to (size / 2, 5 * scale);
|
||||
context->line_to (size / 2, size - 3 * scale);
|
||||
context->stroke ();
|
||||
context->arc (size / 2, 5 * scale, 1.5 * scale, 0, 2 * M_PI); // arrow head
|
||||
context->fill ();
|
||||
break;
|
||||
case Trigger::QueuedTrigger: {
|
||||
Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (context);
|
||||
layout->set_font_description (UIConfiguration::instance ().get_SmallMonospaceFont ());
|
||||
|
|
Loading…
Reference in New Issue
Block a user