Audacity 3.2.0
Classes | Functions | Variables
anonymous_namespace{RealtimeEffectPanel.cpp} Namespace Reference

Classes

class  DropHintLine
 
class  EffectListUIDelegate
 
class  EffectsMenuHelper
 
class  HyperLinkCtrlWrapper
 
class  RealtimeEffectControl
 
class  RealtimeEffectsMenuVisitor
 

Functions

const PluginDescriptorGetPlugin (const PluginID &ID)
 
TranslatableString GetEffectName (RealtimeEffectState &state)
 
template<typename Visitor >
void VisitRealtimeEffectStateUIs (const RealtimeEffectList &effects, Visitor &&visitor)
 
template<typename Visitor >
void VisitRealtimeEffectStateUIs (const Track &track, Visitor &&visitor)
 
void UpdateRealtimeEffectUIData (const Track &track)
 
void UpdateRealtimeEffectUIData (const AudacityProject &project)
 
void ReopenRealtimeEffectUIData (AudacityProject &project, SampleTrack &track)
 
static wxString GetSafeVendor (const PluginDescriptor &descriptor)
 

Variables

AttachedWindows::RegisteredFactory sKey
 

Function Documentation

◆ GetEffectName()

TranslatableString anonymous_namespace{RealtimeEffectPanel.cpp}::GetEffectName ( RealtimeEffectState state)

Definition at line 235 of file RealtimeEffectPanel.cpp.

236 {
237 const auto &ID = state.GetID();
238 const auto desc = GetPlugin(ID);
239 return desc
240 ? desc->GetSymbol().Msgid()
241 : XO("%s (missing)")
242 .Format(PluginManager::GetEffectNameFromID(ID).GET());
243 }
XO("Cut/Copy/Paste")
static Identifier GetEffectNameFromID(const PluginID &ID)
const PluginID & GetID() const noexcept
const TranslatableString desc
Definition: ExportPCM.cpp:51
const PluginDescriptor * GetPlugin(const PluginID &ID)

References anonymous_namespace{ExportPCM.cpp}::desc, PluginManager::GetEffectNameFromID(), RealtimeEffectState::GetID(), GetPlugin(), and XO().

Referenced by anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::OnChangeButtonClicked(), anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::RemoveFromList(), and anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::SetEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPlugin()

const PluginDescriptor * anonymous_namespace{RealtimeEffectPanel.cpp}::GetPlugin ( const PluginID ID)

Definition at line 230 of file RealtimeEffectPanel.cpp.

230 {
231 auto desc = PluginManager::Get().GetPlugin(ID);
232 return desc;
233 }
const PluginDescriptor * GetPlugin(const PluginID &ID) const
static PluginManager & Get()

References anonymous_namespace{ExportPCM.cpp}::desc, PluginManager::Get(), and PluginManager::GetPlugin().

Referenced by anonymous_namespace{PluginHost.cpp}::Discover(), EffectManager::GetEffectFamilyName(), GetEffectName(), EffectManager::GetVendorName(), and anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::SetEffect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSafeVendor()

static wxString anonymous_namespace{RealtimeEffectPanel.cpp}::GetSafeVendor ( const PluginDescriptor descriptor)
static

Definition at line 696 of file RealtimeEffectPanel.cpp.

697 {
698 if (descriptor.GetVendor().empty())
699 return XO("Unknown").Translation();
700
701 return descriptor.GetVendor();
702 }
const wxString & GetVendor() const

References PluginDescriptor::GetVendor(), and XO().

Here is the call graph for this function:

◆ ReopenRealtimeEffectUIData()

void anonymous_namespace{RealtimeEffectPanel.cpp}::ReopenRealtimeEffectUIData ( AudacityProject project,
SampleTrack track 
)

Definition at line 277 of file RealtimeEffectPanel.cpp.

278 {
281 [&](auto& ui)
282 {
283 if (ui.IsShown())
284 {
285 ui.Hide(&project);
286 ui.Show(project);
287 }
288 });
289 }
static RealtimeEffectList & Get(AudacityProject &project)
void VisitRealtimeEffectStateUIs(const Track &track, Visitor &&visitor)

References RealtimeEffectList::Get(), and VisitRealtimeEffectStateUIs().

Referenced by RealtimeEffectPanel::PrefsListenerHelper::UpdatePrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateRealtimeEffectUIData() [1/2]

void anonymous_namespace{RealtimeEffectPanel.cpp}::UpdateRealtimeEffectUIData ( const AudacityProject project)

Definition at line 269 of file RealtimeEffectPanel.cpp.

270 {
271 const auto& name = project.GetProjectName();
273 RealtimeEffectList::Get(project), [&](auto& ui) { ui.SetTargetName(name); }
274 );
275 }
wxString name
Definition: TagsEditor.cpp:166
const auto project

References RealtimeEffectList::Get(), name, project, and VisitRealtimeEffectStateUIs().

Referenced by ProjectEffectListDelegate::ProjectEffectListDelegate(), RealtimeEffectPanel::RealtimeEffectPanel(), and TrackEffectListUIDelegate::TrackEffectListUIDelegate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateRealtimeEffectUIData() [2/2]

void anonymous_namespace{RealtimeEffectPanel.cpp}::UpdateRealtimeEffectUIData ( const Track track)

Definition at line 262 of file RealtimeEffectPanel.cpp.

263 {
264 const auto& name = track.GetName();
266 RealtimeEffectList::Get(track), [&](auto& ui) { ui.SetTargetName(name); });
267 }
const wxString & GetName() const
Name is always the same for all channels of a group.
Definition: Track.cpp:64

References RealtimeEffectList::Get(), Track::GetName(), name, and VisitRealtimeEffectStateUIs().

Here is the call graph for this function:

◆ VisitRealtimeEffectStateUIs() [1/2]

template<typename Visitor >
void anonymous_namespace{RealtimeEffectPanel.cpp}::VisitRealtimeEffectStateUIs ( const RealtimeEffectList effects,
Visitor &&  visitor 
)

Definition at line 246 of file RealtimeEffectPanel.cpp.

247 {
248 effects.Visit(
249 [visitor](auto& effectState, bool)
250 {
251 auto& ui = RealtimeEffectStateUI::Get(effectState);
252 visitor(ui);
253 });
254 }
void Visit(const StateVisitor &func)
Apply the function to all states sequentially.
static RealtimeEffectStateUI & Get(RealtimeEffectState &state)

References RealtimeEffectStateUI::Get(), and RealtimeEffectList::Visit().

Here is the call graph for this function:

◆ VisitRealtimeEffectStateUIs() [2/2]

template<typename Visitor >
void anonymous_namespace{RealtimeEffectPanel.cpp}::VisitRealtimeEffectStateUIs ( const Track track,
Visitor &&  visitor 
)

Definition at line 257 of file RealtimeEffectPanel.cpp.

258 {
259 VisitRealtimeEffectStateUIs(RealtimeEffectList::Get(track), std::forward<Visitor>(visitor));
260 }

References RealtimeEffectList::Get(), and VisitRealtimeEffectStateUIs().

Referenced by RealtimeEffectPanel::RealtimeEffectPanel(), ReopenRealtimeEffectUIData(), UpdateRealtimeEffectUIData(), and VisitRealtimeEffectStateUIs().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sKey

AttachedWindows::RegisteredFactory anonymous_namespace{RealtimeEffectPanel.cpp}::sKey
Initial value:
{
[](AudacityProject &project) -> wxWeakRef<wxWindow> {
constexpr auto EffectsPanelMinWidth { 255 };
const auto pProjectWindow = &ProjectWindow::Get(project);
pProjectWindow->GetContainerWindow(),
wxID_ANY,
wxDefaultPosition,
wxDefaultSize,
wxNO_BORDER | wxSP_LIVE_UPDATE | wxSP_THIN_SASH
);
effectsPanel->SetMinSize({EffectsPanelMinWidth, -1});
effectsPanel->SetName(_("Realtime effects"));
effectsPanel->SetBackgroundColorIndex(clrMedium);
effectsPanel->Hide();
return effectsPanel;
}
}
#define _(s)
Definition: Internat.h:73
#define safenew
Definition: MemoryX.h:10
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static ProjectWindow & Get(AudacityProject &project)

Definition at line 1125 of file RealtimeEffectPanel.cpp.

Referenced by RealtimeEffectPanel::Get().