Audacity  3.0.3
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 () override
 
TranslatableString GetDescription () override
 
bool DefineParams (ShuttleParams &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 () override
 
VendorSymbol GetVendor () override
 
wxString GetVersion () override
 
virtual bool IsBatchProcessing ()
 
virtual void SetBatchProcessing (bool start)
 
virtual bool Apply (const CommandContext &WXUNUSED(context))
 
bool ShowInterface (wxWindow *parent, bool forceModal=false)
 
virtual void SetHostUI (EffectUIHostInterface *WXUNUSED(host))
 
wxDialog * CreateUI (wxWindow *parent, AudacityCommand *client)
 
virtual bool GetAutomationParameters (wxString &parms)
 
virtual bool SetAutomationParameters (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 ()
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
TranslatableString GetName ()
 
virtual bool DefineParams (ShuttleParams &WXUNUSED(S))
 

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 }
 
using VetoDialogHook = bool(*)(wxDialog *)
 
- Static Public Member Functions inherited from AudacityCommand
static VetoDialogHook SetVetoDialogHook (VetoDialogHook hook)
 
- Protected Attributes inherited from AudacityCommand
ProgressDialogmProgress
 
wxDialog * mUIDialog
 
wxWindow * mUIParent
 
int mUIResultID
 

Detailed Description

Command for changing the frequency selection.

Definition at line 53 of file SelectCommand.h.

Member Function Documentation

◆ Apply()

bool SelectFrequenciesCommand::Apply ( const CommandContext context)
override

Definition at line 169 of file SelectCommand.cpp.

169  {
170  if( !bHasBottom && !bHasTop )
171  return true;
172 
173  // Defaults if no value...
174  if( !bHasTop )
175  mTop = 0.0;
176  if( !bHasBottom )
177  mBottom = 0.0;
178 
180  mBottom, mTop, false);// false for not done.
181  return true;
182 }

References bHasBottom, bHasTop, ProjectSelectionManager::Get(), mBottom, mTop, CommandContext::project, and ProjectSelectionManager::SSBL_ModifySpectralSelection().

Referenced by SelectCommand::Apply().

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

◆ DefineParams()

bool SelectFrequenciesCommand::DefineParams ( ShuttleParams S)
override

Definition at line 150 of file SelectCommand.cpp.

150  {
151  S.OptionalN( bHasTop ).Define( mTop, wxT("High"), 0.0, 0.0, (double)FLT_MAX);
152  S.OptionalN( bHasBottom ).Define( mBottom, wxT("Low"), 0.0, 0.0, (double)FLT_MAX);
153  return true;
154 }

References bHasBottom, bHasTop, ShuttleParams::Define(), mBottom, mTop, and ShuttleParams::OptionalN().

Referenced by SelectCommand::DefineParams().

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

◆ GetDescription()

TranslatableString SelectFrequenciesCommand::GetDescription ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 60 of file SelectCommand.h.

60 {return XO("Selects a frequency range.");};

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol SelectFrequenciesCommand::GetSymbol ( )
inlineoverridevirtual

Implements AudacityCommand.

Definition at line 59 of file SelectCommand.h.

59 {return Symbol;};

References Symbol.

◆ ManualPage()

ManualPageID SelectFrequenciesCommand::ManualPage ( )
inlineoverridevirtual

Reimplemented from AudacityCommand.

Definition at line 66 of file SelectCommand.h.

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

◆ PopulateOrExchange()

void SelectFrequenciesCommand::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 156 of file SelectCommand.cpp.

157 {
158  S.AddSpace(0, 5);
159 
160  S.StartMultiColumn(3, wxEXPAND);
161  {
162  S.SetStretchyCol( 2 );
163  S.Optional( bHasTop ).TieTextBox(XXO("High:"), mTop);
164  S.Optional( bHasBottom ).TieTextBox(XXO("Low:"), mBottom);
165  }
166  S.EndMultiColumn();
167 }

References ShuttleGui::AddSpace(), bHasBottom, bHasTop, ShuttleGuiBase::EndMultiColumn(), mBottom, mTop, ShuttleGui::Optional(), ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::TieTextBox(), and XXO.

Referenced by SelectCommand::PopulateOrExchange().

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 68 of file SelectCommand.h.

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

◆ bHasTop

bool SelectFrequenciesCommand::bHasTop

Definition at line 69 of file SelectCommand.h.

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

◆ mBottom

double SelectFrequenciesCommand::mBottom

Definition at line 71 of file SelectCommand.h.

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

◆ mTop

double SelectFrequenciesCommand::mTop

Definition at line 72 of file SelectCommand.h.

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

◆ Symbol

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

Definition at line 56 of file SelectCommand.h.

Referenced by GetSymbol().


The documentation for this class was generated from the following files:
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2459
XO
#define XO(s)
Definition: Internat.h:31
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
ProjectSelectionManager::SSBL_ModifySpectralSelection
void SSBL_ModifySpectralSelection(double &bottom, double &top, bool done) override
Definition: ProjectSelectionManager.cpp:244
SelectFrequenciesCommand::mTop
double mTop
Definition: SelectCommand.h:72
ShuttleParams::OptionalN
virtual ShuttleParams & OptionalN(bool &var)
Definition: Shuttle.h:72
ShuttleGuiBase::TieTextBox
wxTextCtrl * TieTextBox(const TranslatableString &Caption, wxString &Value, const int nChars=0)
Definition: ShuttleGui.cpp:1652
SelectFrequenciesCommand::Symbol
static const ComponentInterfaceSymbol Symbol
Definition: SelectCommand.h:56
XXO
#define XXO(s)
Definition: Internat.h:44
ProjectSelectionManager::Get
static ProjectSelectionManager & Get(AudacityProject &project)
Definition: ProjectSelectionManager.cpp:36
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
SelectFrequenciesCommand::bHasBottom
bool bHasBottom
Definition: SelectCommand.h:68
ShuttleParams::Define
virtual void Define(bool &var, const wxChar *key, const bool vdefault, const bool vmin=false, const bool vmax=false, const bool vscl=false)
Definition: Shuttle.cpp:332
ShuttleGui::Optional
ShuttleGui & Optional(bool &bVar)
Definition: ShuttleGui.cpp:2280
SelectFrequenciesCommand::mBottom
double mBottom
Definition: SelectCommand.h:71
ShuttleGuiBase::SetStretchyCol
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:202
CommandContext::project
AudacityProject & project
Definition: CommandContext.h:64
SelectFrequenciesCommand::bHasTop
bool bHasTop
Definition: SelectCommand.h:69