| 28 | } // namespace |
| 29 | |
| 30 | bool EffectUI::DoEffect( |
| 31 | const PluginID& ID, AudacityProject& project, unsigned flags) |
| 32 | { |
| 33 | auto getShowEffectHostInterfaceCb = |
| 34 | [window = &GetProjectFrame(project)]( |
| 35 | Effect& effect, std::shared_ptr<EffectInstance>& pInstance, |
| 36 | SimpleEffectSettingsAccess& access) { |
| 37 | const auto pServices = dynamic_cast<EffectUIServices*>(&effect); |
| 38 | return pServices && pServices->ShowHostInterface( |
| 39 | effect, *window, EffectUI::DialogFactory, |
| 40 | pInstance, access, true); |
| 41 | }; |
| 42 | auto selectAllIfNoneCb = [&]() { |
| 43 | SelectUtilities::SelectAllIfNone(project); |
| 44 | }; |
| 45 | return AudacityApplicationLogic::DoEffect( |
| 46 | ID, project, flags, std::move(getShowEffectHostInterfaceCb), |
| 47 | StopPlaybackCb(project), std::move(selectAllIfNoneCb)); |
| 48 | } |
nothing calls this directly
no test coverage detected