mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
triggerbox UI: jump follow action, part one
This commit is contained in:
parent
413f2e9d1b
commit
46e2a03863
5 changed files with 29 additions and 0 deletions
|
|
@ -253,6 +253,7 @@ CueBoxUI::context_menu (uint64_t 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::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::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)));
|
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)));
|
||||||
|
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_follow_action), FollowAction (FollowAction::JumpTrigger), idx)));
|
||||||
|
|
||||||
Menu* launch_menu = manage (new Menu);
|
Menu* launch_menu = manage (new Menu);
|
||||||
MenuList& litems = launch_menu->items ();
|
MenuList& litems = launch_menu->items ();
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ SlotPropertyTable::SlotPropertyTable ()
|
||||||
_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::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::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.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.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::JumpTrigger), 0)));
|
||||||
_follow_left.set_sizing_text (longest_follow);
|
_follow_left.set_sizing_text (longest_follow);
|
||||||
|
|
||||||
_follow_right.set_name("FollowAction");
|
_follow_right.set_name("FollowAction");
|
||||||
|
|
@ -158,6 +159,7 @@ SlotPropertyTable::SlotPropertyTable ()
|
||||||
_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::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::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.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.AddMenuElem (MenuElem (follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_follow_action), FollowAction (FollowAction::JumpTrigger), 1)));
|
||||||
_follow_right.set_sizing_text (longest_follow);
|
_follow_right.set_sizing_text (longest_follow);
|
||||||
|
|
||||||
_launch_style_button.set_name("FollowAction");
|
_launch_style_button.set_name("FollowAction");
|
||||||
|
|
|
||||||
|
|
@ -350,6 +350,7 @@ TriggerMaster::context_menu ()
|
||||||
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::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::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))));
|
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))));
|
||||||
|
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_follow_action), FollowAction (FollowAction::JumpTrigger))));
|
||||||
|
|
||||||
Menu* launch_menu = manage (new Menu);
|
Menu* launch_menu = manage (new Menu);
|
||||||
MenuList& litems = launch_menu->items ();
|
MenuList& litems = launch_menu->items ();
|
||||||
|
|
@ -731,6 +732,8 @@ CueMaster::context_menu ()
|
||||||
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::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::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))));
|
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))));
|
||||||
|
fitems.push_back (MenuElem (TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind (sigc::mem_fun (*this, &CueMaster::set_all_follow_action), FollowAction (FollowAction::JumpTrigger))));
|
||||||
|
|
||||||
|
|
||||||
Menu* launch_menu = manage (new Menu);
|
Menu* launch_menu = manage (new Menu);
|
||||||
MenuList& litems = launch_menu->items ();
|
MenuList& litems = launch_menu->items ();
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ TriggerUI::TriggerUI ()
|
||||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::LastTrigger)));
|
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::AnyTrigger)));
|
||||||
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::OtherTrigger)));
|
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::OtherTrigger)));
|
||||||
|
follow_strings.push_back (follow_action_to_string (FollowAction (FollowAction::JumpTrigger)));
|
||||||
|
|
||||||
for (std::vector<std::string>::const_iterator i = follow_strings.begin(); i != follow_strings.end(); ++i) {
|
for (std::vector<std::string>::const_iterator i = follow_strings.begin(); i != follow_strings.end(); ++i) {
|
||||||
if (i->length() > longest_follow.length()) {
|
if (i->length() > longest_follow.length()) {
|
||||||
|
|
@ -646,6 +647,11 @@ TriggerUI::follow_context_menu ()
|
||||||
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fitems.push_back (RadioMenuElem (fagroup, TriggerUI::follow_action_to_string(FollowAction (FollowAction::JumpTrigger)), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_follow_action), FollowAction (FollowAction::JumpTrigger))));
|
||||||
|
if (trigger ()->follow_action (0) == FollowAction::JumpTrigger) {
|
||||||
|
dynamic_cast<Gtk::CheckMenuItem*> (&fitems.back ())->set_active (true);
|
||||||
|
}
|
||||||
|
|
||||||
_ignore_menu_action = false;
|
_ignore_menu_action = false;
|
||||||
|
|
||||||
items.push_back (MenuElem (_("Follow Action..."), *follow_menu));
|
items.push_back (MenuElem (_("Follow Action..."), *follow_menu));
|
||||||
|
|
@ -805,6 +811,8 @@ TriggerUI::follow_action_to_string (FollowAction const & fa)
|
||||||
return _("Any");
|
return _("Any");
|
||||||
case FollowAction::OtherTrigger:
|
case FollowAction::OtherTrigger:
|
||||||
return _("Other");
|
return _("Other");
|
||||||
|
case FollowAction::JumpTrigger:
|
||||||
|
return _("Jump");
|
||||||
}
|
}
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
return std::string();
|
return std::string();
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,21 @@ TriggerEntry::draw_follow_icon (Cairo::RefPtr<Cairo::Context> context, FollowAct
|
||||||
context->set_matrix (m);
|
context->set_matrix (m);
|
||||||
}
|
}
|
||||||
context->set_identity_matrix ();
|
context->set_identity_matrix ();
|
||||||
|
} break;
|
||||||
|
/* ben: new shape here ? */
|
||||||
|
case FollowAction::JumpTrigger: {
|
||||||
|
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++) {
|
||||||
|
Cairo::Matrix m = context->get_matrix ();
|
||||||
|
context->translate (size / 2, size / 2);
|
||||||
|
context->rotate (i * M_PI / 3);
|
||||||
|
context->move_to (0, 2 * scale);
|
||||||
|
context->line_to (0, (size / 2) - 4 * scale);
|
||||||
|
context->stroke ();
|
||||||
|
context->set_matrix (m);
|
||||||
|
}
|
||||||
|
context->set_identity_matrix ();
|
||||||
} break;
|
} break;
|
||||||
case FollowAction::None:
|
case FollowAction::None:
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue