X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fautomation_selection.h;h=204f4f19becd9188ed902289c8a9ca8babebd498;hb=dc0139d4af4d246f6dcafb04425e3f1198c347c3;hp=05063e144e7b736fe9385d074f79660ce24c594b;hpb=666e0870554705f4fb466fc6b188fe9b4000ca49;p=ardour.git diff --git a/gtk2_ardour/automation_selection.h b/gtk2_ardour/automation_selection.h index 05063e144e..204f4f19be 100644 --- a/gtk2_ardour/automation_selection.h +++ b/gtk2_ardour/automation_selection.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 Paul Davis + Copyright (C) 2000-2007 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,10 +22,23 @@ #include -namespace ARDOUR { - class AutomationList; -} - -struct AutomationSelection : list {}; +#include "ardour/automation_list.h" +#include "evoral/Parameter.hpp" + +class AutomationSelection : public std::list > { +public: + const_iterator + get_nth(const Evoral::Parameter& param, size_t nth) const { + size_t count = 0; + for (const_iterator l = begin(); l != end(); ++l) { + if ((*l)->parameter() == param) { + if (count++ == nth) { + return l; + } + } + } + return end(); + } +}; #endif /* __ardour_gtk_automation_selection_h__ */