Audacity 3.2.0
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SelectFrequenciesCommand Class Reference

Command for changing the frequency selection. More...

#include <SelectCommand.h>

Inheritance diagram for SelectFrequenciesCommand:
[legend]
Collaboration diagram for SelectFrequenciesCommand:
[legend]

Public Member Functions

ComponentInterfaceSymbol GetSymbol () const override
 
TranslatableString GetDescription () const override
 
template<bool Const>
bool VisitSettings (SettingsVisitorBase< Const > &S)
 
bool VisitSettings (SettingsVisitor &S) override
 
bool VisitSettings (ConstSettingsVisitor &S) override
 
void PopulateOrExchange (ShuttleGui &S) override
 
bool Apply (const CommandContext &context) override
 
ManualPageID ManualPage () override
 
- Public Member Functions inherited from AudacityCommand
 AudacityCommand ()
 
virtual ~AudacityCommand ()
 
PluginPath GetPath () const override
 
VendorSymbol GetVendor () const override
 
wxString GetVersion () const override
 
ComponentInterfaceSymbol GetSymbol () const override=0
 
virtual TranslatableString GetDescription () const override
 
virtual ManualPageID ManualPage ()
 
virtual bool IsBatchProcessing () const
 
virtual void SetBatchProcessing (bool start)
 
virtual bool Apply (const CommandContext &WXUNUSED(context))
 
bool ShowInterface (wxWindow *parent, bool forceModal=false)
 
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
 
bool SaveSettingsAsString (wxString &parms)
 
bool LoadSettingsFromString (const wxString &parms)
 
bool DoAudacityCommand (wxWindow *parent, const CommandContext &context, bool shouldPrompt=true)
 
int MessageBox (const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
 
virtual bool Init ()
 
virtual bool PromptUser (wxWindow *parent)
 
virtual bool CheckWhetherSkipAudacityCommand ()
 
virtual void End ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual bool TransferDataToWindow ()
 
virtual bool TransferDataFromWindow ()
 
virtual bool VisitSettings (SettingsVisitor &)
 
virtual bool VisitSettings (ConstSettingsVisitor &)
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual PluginPath GetPath () const =0
 
virtual ComponentInterfaceSymbol GetSymbol () const =0
 
virtual VendorSymbol GetVendor () const =0
 
virtual wxString GetVersion () const =0
 
virtual TranslatableString GetDescription () const =0
 
TranslatableString GetName () const
 

Public Attributes

bool bHasBottom
 
bool bHasTop
 
double mBottom
 
double mTop
 

Static Public Attributes

static const ComponentInterfaceSymbol Symbol { XO("Select Frequencies") }
 

Additional Inherited Members

- Public Types inherited from AudacityCommand
enum  : long { DefaultMessageBoxStyle = wxOK | wxCENTRE }
 
- Protected Attributes inherited from AudacityCommand
ProgressDialogmProgress
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 

Detailed Description

Command for changing the frequency selection.

Definition at line 55 of file SelectCommand.h.

Member Function Documentation

◆ Apply()

bool SelectFrequenciesCommand::Apply ( const CommandContext context)
override

Definition at line 188 of file SelectCommand.cpp.

188 {
189 if( !bHasBottom && !bHasTop )
190 return true;
191
192 // Defaults if no value...
193 if( !bHasTop )
194 mTop = 0.0;
195 if( !bHasBottom )
196 mBottom = 0.0;
197
200 mBottom, mTop, false);// false for not done.
201 return true;
202}
AudacityProject & project
void ModifySpectralSelection(double nyquist, double &bottom, double &top, bool done)
static ProjectSelectionManager & Get(AudacityProject &project)
static double ProjectNyquistFrequency(const AudacityProject &project)
Definition: WaveTrack.cpp:744

References bHasBottom, bHasTop, ProjectSelectionManager::Get(), mBottom, ProjectSelectionManager::ModifySpectralSelection(), mTop, CommandContext::project, and WaveTrack::ProjectNyquistFrequency().

Referenced by SelectCommand::Apply().

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

◆ GetDescription()

TranslatableString SelectFrequenciesCommand::GetDescription ( ) const
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 62 of file SelectCommand.h.

62{return XO("Selects a frequency range.");};
XO("Cut/Copy/Paste")

References XO().

Here is the call graph for this function:

◆ GetSymbol()

ComponentInterfaceSymbol SelectFrequenciesCommand::GetSymbol ( ) const
inlineoverridevirtual

Implements AudacityCommand.

Definition at line 61 of file SelectCommand.h.

61{return Symbol;};
static const ComponentInterfaceSymbol Symbol
Definition: SelectCommand.h:58

References Symbol.

◆ ManualPage()

ManualPageID SelectFrequenciesCommand::ManualPage ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 70 of file SelectCommand.h.

70{return L"Extra_Menu:_Scriptables_I#select_frequencies";}

◆ PopulateOrExchange()

void SelectFrequenciesCommand::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 175 of file SelectCommand.cpp.

176{
177 S.AddSpace(0, 5);
178
179 S.StartMultiColumn(3, wxEXPAND);
180 {
181 S.SetStretchyCol( 2 );
182 S.Optional( bHasTop ).TieTextBox(XXO("High:"), mTop);
183 S.Optional( bHasBottom ).TieTextBox(XXO("Low:"), mBottom);
184 }
185 S.EndMultiColumn();
186}
XXO("&Cut/Copy/Paste Toolbar")
#define S(N)
Definition: ToChars.cpp:64

References bHasBottom, bHasTop, mBottom, mTop, S, and XXO().

Referenced by SelectCommand::PopulateOrExchange().

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

◆ VisitSettings() [1/3]

bool SelectFrequenciesCommand::VisitSettings ( ConstSettingsVisitor )
overridevirtual

Visit settings, if defined. false means no defined settings. Default implementation returns false

Reimplemented from AudacityCommand.

Definition at line 172 of file SelectCommand.cpp.

173 { return VisitSettings<true>(S); }

References S.

◆ VisitSettings() [2/3]

bool SelectFrequenciesCommand::VisitSettings ( SettingsVisitor )
overridevirtual

Visit settings, if defined. false means no defined settings. Default implementation returns false

Reimplemented from AudacityCommand.

Definition at line 169 of file SelectCommand.cpp.

170 { return VisitSettings<false>(S); }

References S.

◆ VisitSettings() [3/3]

template<bool Const>
bool SelectFrequenciesCommand::VisitSettings ( SettingsVisitorBase< Const > &  S)

Definition at line 163 of file SelectCommand.cpp.

163 {
164 S.OptionalN( bHasTop ).Define( mTop, wxT("High"), 0.0, 0.0, (double)FLT_MAX);
165 S.OptionalN( bHasBottom ).Define( mBottom, wxT("Low"), 0.0, 0.0, (double)FLT_MAX);
166 return true;
167}
wxT("CloseDown"))

References bHasBottom, bHasTop, mBottom, mTop, S, and wxT().

Referenced by SelectCommand::VisitSettings().

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

Member Data Documentation

◆ bHasBottom

bool SelectFrequenciesCommand::bHasBottom

Definition at line 72 of file SelectCommand.h.

Referenced by Apply(), PopulateOrExchange(), and VisitSettings().

◆ bHasTop

bool SelectFrequenciesCommand::bHasTop

Definition at line 73 of file SelectCommand.h.

Referenced by Apply(), PopulateOrExchange(), and VisitSettings().

◆ mBottom

double SelectFrequenciesCommand::mBottom

Definition at line 75 of file SelectCommand.h.

Referenced by Apply(), PopulateOrExchange(), and VisitSettings().

◆ mTop

double SelectFrequenciesCommand::mTop

Definition at line 76 of file SelectCommand.h.

Referenced by Apply(), PopulateOrExchange(), and VisitSettings().

◆ Symbol

const ComponentInterfaceSymbol SelectFrequenciesCommand::Symbol { XO("Select Frequencies") }
static

Definition at line 58 of file SelectCommand.h.

Referenced by GetSymbol().


The documentation for this class was generated from the following files: