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

Functions

void OnPlotSpectrum (const CommandContext &context)
 

Variables

AttachedWindows::RegisteredFactory sFrequencyWindowKey
 
AttachedItem sAttachment
 

Function Documentation

◆ OnPlotSpectrum()

void anonymous_namespace{FreqWindow.cpp}::OnPlotSpectrum ( const CommandContext context)

Definition at line 1157 of file FreqWindow.cpp.

1158{
1159 auto &project = context.project;
1161 auto freqWindow = &GetAttachedWindows(project)
1163
1164 freqWindow->Show(true);
1165 freqWindow->Raise();
1166 freqWindow->SetFocus();
1167}
AUDACITY_DLL_API AttachedWindows & GetAttachedWindows(AudacityProject &project)
const auto project
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
Definition: ClientData.h:318
AudacityProject & project
void RegisterLastAnalyzer(const CommandContext &context)
static CommandManager & Get(AudacityProject &project)
Displays a spectrum plot of the waveform. Has options for selecting parameters of the plot.
Definition: FreqWindow.h:58
bool Show(bool show=true) override
Definition: FreqWindow.cpp:545
AttachedWindows::RegisteredFactory sFrequencyWindowKey

References CommandManager::Get(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetAttachedWindows(), CommandContext::project, project, CommandManager::RegisterLastAnalyzer(), sFrequencyWindowKey, and FrequencyPlotDialog::Show().

Here is the call graph for this function:

Variable Documentation

◆ sAttachment

AttachedItem anonymous_namespace{FreqWindow.cpp}::sAttachment
Initial value:
{
Command( wxT("PlotSpectrum"), XXO("Plot Spectrum..."),
wxT("Analyze/Analyzers/Windows")
}
wxT("CloseDown"))
const ReservedCommandFlag & AudioIONotBusyFlag()
const ReservedCommandFlag & TimeSelectedFlag()
const ReservedCommandFlag & WaveTracksSelectedFlag()
XXO("&Cut/Copy/Paste Toolbar")
constexpr auto Command
Definition: MenuRegistry.h:456
void OnPlotSpectrum(const CommandContext &context)

Definition at line 1172 of file FreqWindow.cpp.

◆ sFrequencyWindowKey

AttachedWindows::RegisteredFactory anonymous_namespace{FreqWindow.cpp}::sFrequencyWindowKey
Initial value:
{
[]( AudacityProject &parent ) -> wxWeakRef< wxWindow > {
auto &window = GetProjectFrame(parent);
&window, -1, parent, FrequencyAnalysisTitle,
wxPoint{ 150, 150 }
);
}
}
#define FrequencyAnalysisTitle
Definition: FreqWindow.cpp:95
#define safenew
Definition: MemoryX.h:10
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90

Definition at line 1146 of file FreqWindow.cpp.

Referenced by OnPlotSpectrum().