mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
trigger_ui: stretch_mode selector (gtk part)
This commit is contained in:
parent
ac97b30e55
commit
f0843e3cd9
4 changed files with 59 additions and 11 deletions
|
|
@ -61,6 +61,8 @@ std::vector<std::string> TriggerUI::quantize_strings;
|
|||
std::string TriggerUI::longest_quantize;
|
||||
std::vector<std::string> TriggerUI::launch_strings;
|
||||
std::string TriggerUI::longest_launch;
|
||||
std::vector<std::string> TriggerUI::stretch_mode_strings;
|
||||
std::string TriggerUI::longest_stretch_mode;
|
||||
|
||||
Gtkmm2ext::Bindings* TriggerUI::bindings = 0;
|
||||
Glib::RefPtr<Gtk::ActionGroup> TriggerUI::trigger_actions;
|
||||
|
|
@ -104,6 +106,16 @@ TriggerUI::TriggerUI ()
|
|||
longest_launch = *i;
|
||||
}
|
||||
}
|
||||
|
||||
stretch_mode_strings.push_back (stretch_mode_to_string (Trigger::Crisp));
|
||||
stretch_mode_strings.push_back (stretch_mode_to_string (Trigger::Mixed));
|
||||
stretch_mode_strings.push_back (stretch_mode_to_string (Trigger::Smooth));
|
||||
|
||||
for (std::vector<std::string>::const_iterator i = stretch_mode_strings.begin(); i != stretch_mode_strings.end(); ++i) {
|
||||
if (i->length() > longest_stretch_mode.length()) {
|
||||
longest_stretch_mode = *i;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -799,6 +811,21 @@ TriggerUI::follow_action_to_string (Trigger::FollowAction fa)
|
|||
return std::string();
|
||||
}
|
||||
|
||||
std::string
|
||||
TriggerUI::stretch_mode_to_string (Trigger::StretchMode sm)
|
||||
{
|
||||
switch (sm) {
|
||||
case Trigger::Crisp:
|
||||
return _("Crisp");
|
||||
case Trigger::Mixed:
|
||||
return _("Mixed");
|
||||
case Trigger::Smooth:
|
||||
return _("Smooth");
|
||||
}
|
||||
/*NOTREACHED*/
|
||||
return std::string();
|
||||
}
|
||||
|
||||
TriggerPtr
|
||||
TriggerUI::trigger() const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue