Audacity  3.2.0
EffectInterface.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  @file EffectInterface.cpp
6 
7 **********************************************************************/
8 #include "EffectInterface.h"
9 #include <wx/tokenzr.h>
10 
12 {
13  // Get rid of leading and trailing white space
14  auto name = ident.GET();
15  name.Trim(true).Trim(false);
16 
17  if (name.empty())
18  return {};
19 
20  wxStringTokenizer st(name, wxT(" "));
21  wxString id;
22 
23  // CamelCase the name
24  while (st.HasMoreTokens()) {
25  wxString tok = st.GetNextToken();
26  id += tok.Left(1).MakeUpper() + tok.Mid(1).MakeLower();
27  }
28 
29  return id;
30 }
31 
33 
35 {
36  return GetType();
37 }
38 
40 {
41  return false;
42 }
43 
45 {
46  return {};
47 }
48 
50 {
51  return {};
52 }
53 
55 {
56  return false;
57 }
58 
59 //bool EffectDefinitionInterface::DefineParams(ShuttleParams & S)
60 //{
61 // return false;
62 //}
63 
65 
TranslatableString::empty
bool empty() const
Definition: TranslatableString.h:72
EffectInterface.h
ident
static CommandHandlerObject & ident(AudacityProject &project)
Definition: ModNullCallback.cpp:65
EffectDefinitionInterface::GetSquashedName
static Identifier GetSquashedName(const Identifier &ident)
A utility that strips spaces and CamelCases a name.
Definition: EffectInterface.cpp:11
EffectDefinitionInterface::EnablesDebug
virtual bool EnablesDebug()
Whether the effect dialog should have a Debug button; default, always false.
Definition: EffectInterface.cpp:39
EffectProcessor::~EffectProcessor
virtual ~EffectProcessor()
EffectUIClientInterface::~EffectUIClientInterface
virtual ~EffectUIClientInterface()
Identifier
An explicitly nonlocalized string, not meant for the user to see.
Definition: Identifier.h:22
FilePath
wxString FilePath
Definition: Project.h:20
name
const TranslatableString name
Definition: Distortion.cpp:98
EffectDefinitionInterface::~EffectDefinitionInterface
virtual ~EffectDefinitionInterface()
EffectDefinitionInterface::GetType
virtual EffectType GetType()=0
Type determines how it behaves.
id
int id
Definition: WaveTrackControls.cpp:577
EffectDefinitionInterface::HelpPage
virtual FilePath HelpPage()
Fully qualified local help file name, default is empty.
Definition: EffectInterface.cpp:49
TaggedIdentifier< ManualPageIDTag >
EffectDefinitionInterface::GetClassification
virtual EffectType GetClassification()
Determines which menu it appears in; default same as GetType().
Definition: EffectInterface.cpp:34
EffectType
EffectType
Definition: EffectInterface.h:52
EffectDefinitionInterface::IsHiddenFromMenus
virtual bool IsHiddenFromMenus()
Default is false.
Definition: EffectInterface.cpp:54
EffectDefinitionInterface::ManualPage
virtual ManualPageID ManualPage()
Name of a page in the Audacity alpha manual, default is empty.
Definition: EffectInterface.cpp:44