triggerbox: support for ReTrigger launch style
This commit is contained in:
parent
58d4c1e317
commit
aa3806d875
@ -286,6 +286,7 @@ CueBoxUI::context_menu (uint64_t idx)
|
||||
MenuList& litems = launch_menu->items ();
|
||||
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::OneShot), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_launch_style), Trigger::OneShot, idx)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::ReTrigger), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_launch_style), Trigger::ReTrigger, idx)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::Gate), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_launch_style), Trigger::Gate, idx)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::Toggle), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_launch_style), Trigger::Toggle, idx)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::Repeat), sigc::bind (sigc::mem_fun (*this, &CueBoxUI::set_all_launch_style), Trigger::Repeat, idx)));
|
||||
|
@ -165,6 +165,7 @@ SlotPropertyTable::SlotPropertyTable ()
|
||||
_launch_style_button.set_name("FollowAction");
|
||||
_launch_style_button.set_sizing_text (longest_launch);
|
||||
_launch_style_button.AddMenuElem (MenuElem (launch_style_to_string (Trigger::OneShot), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_launch_style), Trigger::OneShot)));
|
||||
_launch_style_button.AddMenuElem (MenuElem (launch_style_to_string (Trigger::ReTrigger), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_launch_style), Trigger::ReTrigger)));
|
||||
_launch_style_button.AddMenuElem (MenuElem (launch_style_to_string (Trigger::Gate), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_launch_style), Trigger::Gate)));
|
||||
_launch_style_button.AddMenuElem (MenuElem (launch_style_to_string (Trigger::Toggle), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_launch_style), Trigger::Toggle)));
|
||||
_launch_style_button.AddMenuElem (MenuElem (launch_style_to_string (Trigger::Repeat), sigc::bind (sigc::mem_fun (*this, &SlotPropertyTable::set_launch_style), Trigger::Repeat)));
|
||||
|
@ -363,6 +363,7 @@ TriggerMaster::context_menu ()
|
||||
MenuList& litems = launch_menu->items ();
|
||||
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::OneShot), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_launch_style), Trigger::OneShot)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::ReTrigger), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_launch_style), Trigger::ReTrigger)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::Gate), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_launch_style), Trigger::Gate)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::Toggle), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_launch_style), Trigger::Toggle)));
|
||||
litems.push_back (MenuElem (TriggerUI::launch_style_to_string(Trigger::Repeat), sigc::bind (sigc::mem_fun (*this, &TriggerMaster::set_all_launch_style), Trigger::Repeat)));
|
||||
|
@ -92,6 +92,7 @@ TriggerUI::TriggerUI ()
|
||||
}
|
||||
|
||||
launch_strings.push_back (launch_style_to_string (Trigger::OneShot));
|
||||
launch_strings.push_back (launch_style_to_string (Trigger::ReTrigger));
|
||||
launch_strings.push_back (launch_style_to_string (Trigger::Gate));
|
||||
launch_strings.push_back (launch_style_to_string (Trigger::Toggle));
|
||||
launch_strings.push_back (launch_style_to_string (Trigger::Repeat));
|
||||
@ -451,6 +452,10 @@ TriggerUI::launch_context_menu ()
|
||||
if (trigger ()->launch_style () == Trigger::OneShot) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&litems.back ())->set_active (true);
|
||||
}
|
||||
litems.push_back (RadioMenuElem (lagroup, TriggerUI::launch_style_to_string(Trigger::ReTrigger), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_launch_style), Trigger::ReTrigger)));
|
||||
if (trigger ()->launch_style () == Trigger::ReTrigger) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&litems.back ())->set_active (true);
|
||||
}
|
||||
litems.push_back (RadioMenuElem (lagroup, TriggerUI::launch_style_to_string(Trigger::Gate), sigc::bind(sigc::mem_fun (*this, &TriggerUI::set_launch_style), Trigger::Gate)));
|
||||
if (trigger ()->launch_style () == Trigger::Gate) {
|
||||
dynamic_cast<Gtk::CheckMenuItem*> (&litems.back ())->set_active (true);
|
||||
@ -694,6 +699,8 @@ TriggerUI::launch_style_to_string (Trigger::LaunchStyle ls)
|
||||
switch (ls) {
|
||||
case Trigger::OneShot:
|
||||
return _("One Shot");
|
||||
case Trigger::ReTrigger:
|
||||
return _("Retrigger");
|
||||
case Trigger::Gate:
|
||||
return _("Gate");
|
||||
case Trigger::Toggle:
|
||||
|
@ -325,6 +325,14 @@ TriggerEntry::draw_launch_icon (Cairo::RefPtr<Cairo::Context> context, float sz,
|
||||
context->line_to (margin, margin);
|
||||
context->stroke ();
|
||||
break;
|
||||
/* XXX ben this needs a new icon */
|
||||
case Trigger::ReTrigger:
|
||||
context->move_to (margin, margin);
|
||||
context->rel_line_to (0, size);
|
||||
context->rel_line_to (size, -size/2);
|
||||
context->line_to (margin, margin);
|
||||
context->stroke ();
|
||||
break;
|
||||
case Trigger::Gate: //diamond shape
|
||||
context->move_to ( margin+size/2, margin );
|
||||
context->rel_line_to ( size/2, size/2);
|
||||
|
Loading…
Reference in New Issue
Block a user