Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
anonymous_namespace{SpectrumView.cpp}::Handler Struct Reference
Inheritance diagram for anonymous_namespace{SpectrumView.cpp}::Handler:
[legend]
Collaboration diagram for anonymous_namespace{SpectrumView.cpp}::Handler:
[legend]

Public Member Functions

void OnToggleSpectralSelection (const CommandContext &context)
 
void OnNextHigherPeakFrequency (const CommandContext &context)
 
void OnNextLowerPeakFrequency (const CommandContext &context)
 
- Public Member Functions inherited from ClientData::Base
virtual ~Base ()
 

Public Attributes

double mLastF0 { SelectedRegion::UndefinedFrequency }
 
double mLastF1 { SelectedRegion::UndefinedFrequency }
 

Detailed Description

Definition at line 1127 of file SpectrumView.cpp.

Member Function Documentation

◆ OnNextHigherPeakFrequency()

void anonymous_namespace{SpectrumView.cpp}::Handler::OnNextHigherPeakFrequency ( const CommandContext context)
inline

Definition at line 1156 of file SpectrumView.cpp.

1157{
1158 auto &project = context.project;
1160}
const auto project
AudacityProject & project
void DoNextPeakFrequency(AudacityProject &project, bool up)

References anonymous_namespace{SpectrumView.cpp}::DoNextPeakFrequency(), CommandContext::project, and project.

Here is the call graph for this function:

◆ OnNextLowerPeakFrequency()

void anonymous_namespace{SpectrumView.cpp}::Handler::OnNextLowerPeakFrequency ( const CommandContext context)
inline

Definition at line 1162 of file SpectrumView.cpp.

1163{
1164 auto &project = context.project;
1166}

References anonymous_namespace{SpectrumView.cpp}::DoNextPeakFrequency(), CommandContext::project, and project.

Here is the call graph for this function:

◆ OnToggleSpectralSelection()

void anonymous_namespace{SpectrumView.cpp}::Handler::OnToggleSpectralSelection ( const CommandContext context)
inline

Definition at line 1133 of file SpectrumView.cpp.

1134{
1135 auto &project = context.project;
1136 auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
1137
1138 const double f0 = selectedRegion.f0();
1139 const double f1 = selectedRegion.f1();
1140 const bool haveSpectralSelection =
1143 if (haveSpectralSelection)
1144 {
1145 mLastF0 = f0;
1146 mLastF1 = f1;
1147 selectedRegion.setFrequencies
1149 }
1150 else
1151 selectedRegion.setFrequencies(mLastF0, mLastF1);
1152
1154}
double f0() const
Definition: ViewInfo.h:37
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
static const int UndefinedFrequency
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:216
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:235

References NotifyingSelectedRegion::f0(), ProjectHistory::Get(), ViewInfo::Get(), ProjectHistory::ModifyState(), CommandContext::project, project, ViewInfo::selectedRegion, and SelectedRegion::UndefinedFrequency.

Here is the call graph for this function:

Member Data Documentation

◆ mLastF0

double anonymous_namespace{SpectrumView.cpp}::Handler::mLastF0 { SelectedRegion::UndefinedFrequency }

Definition at line 1130 of file SpectrumView.cpp.

◆ mLastF1

double anonymous_namespace{SpectrumView.cpp}::Handler::mLastF1 { SelectedRegion::UndefinedFrequency }

Definition at line 1131 of file SpectrumView.cpp.


The documentation for this struct was generated from the following file: