Audacity  3.0.3
Public Member Functions | Public Attributes | Static Private Member Functions | List of all members
CommandManager::Options Struct Reference

#include <CommandManager.h>

Collaboration diagram for CommandManager::Options:
[legend]

Public Member Functions

 Options ()
 
 Options (const wxChar *accel_)
 
 Options (const wxChar *accel_, const TranslatableString &longName_)
 
Options && Accel (const wxChar *value) &&
 
Options && IsEffect (bool value=true) &&
 
Options && Parameter (const CommandParameter &value) &&
 
Options && LongName (const TranslatableString &value) &&
 
Options && IsGlobal () &&
 
Options && UseStrictFlags () &&
 
Options && WantKeyUp () &&
 
Options && SkipKeyDown () &&
 
Options && AllowDup () &&
 
Options && AllowInMacros (int value=1) &&
 
Options && CheckTest (const CheckFn &fn) &&
 
Options && CheckTest (const wxChar *key, bool defaultValue) &&
 
Options && CheckTest (const BoolSetting &setting) &&
 

Public Attributes

const wxChar * accel { wxT("") }
 
CheckFn checker
 
bool bIsEffect { false }
 
CommandParameter parameter {}
 
TranslatableString longName {}
 
bool global { false }
 
bool useStrictFlags { false }
 
bool wantKeyUp { false }
 
bool skipKeyDown { false }
 
bool allowDup { false }
 
int allowInMacros { -1 }
 

Static Private Member Functions

static CheckFn MakeCheckFn (const wxString key, bool defaultValue)
 
static CheckFn MakeCheckFn (const BoolSetting &setting)
 

Detailed Description

Definition at line 97 of file CommandManager.h.

Constructor & Destructor Documentation

◆ Options() [1/3]

CommandManager::Options::Options ( )
inline

Definition at line 99 of file CommandManager.h.

99 {}

◆ Options() [2/3]

CommandManager::Options::Options ( const wxChar *  accel_)
inline

Definition at line 102 of file CommandManager.h.

102 : accel{ accel_ } {}

◆ Options() [3/3]

CommandManager::Options::Options ( const wxChar *  accel_,
const TranslatableString longName_ 
)
inline

Definition at line 104 of file CommandManager.h.

107  : accel{ accel_ }, longName{ longName_ } {}

Member Function Documentation

◆ Accel()

Options&& CommandManager::Options::Accel ( const wxChar *  value) &&
inline

Definition at line 109 of file CommandManager.h.

110  { accel = value; return std::move(*this); }

◆ AllowDup()

Options&& CommandManager::Options::AllowDup ( ) &&
inline

Definition at line 127 of file CommandManager.h.

128  { allowDup = true; return std::move(*this); }

◆ AllowInMacros()

Options&& CommandManager::Options::AllowInMacros ( int  value = 1) &&
inline

Definition at line 130 of file CommandManager.h.

131  { allowInMacros = value; return std::move(*this); }

Referenced by anonymous_namespace{PluginMenus.cpp}::PopulateMacrosMenu().

Here is the caller graph for this function:

◆ CheckTest() [1/3]

Options&& CommandManager::Options::CheckTest ( const BoolSetting setting) &&
inline

Definition at line 143 of file CommandManager.h.

143  {
144  checker = MakeCheckFn( setting );
145  return std::move(*this);
146  }

◆ CheckTest() [2/3]

Options&& CommandManager::Options::CheckTest ( const CheckFn fn) &&
inline

Definition at line 135 of file CommandManager.h.

136  { checker = fn; return std::move(*this); }

References fn.

◆ CheckTest() [3/3]

Options&& CommandManager::Options::CheckTest ( const wxChar *  key,
bool  defaultValue 
) &&
inline

Definition at line 138 of file CommandManager.h.

138  {
139  checker = MakeCheckFn( key, defaultValue );
140  return std::move(*this);
141  }

References key.

◆ IsEffect()

Options&& CommandManager::Options::IsEffect ( bool  value = true) &&
inline

Definition at line 111 of file CommandManager.h.

112  { bIsEffect = value; return std::move(*this); }

Referenced by anonymous_namespace{PluginMenus.cpp}::AddEffectMenuItemGroup(), and CommandManager::AddItemList().

Here is the caller graph for this function:

◆ IsGlobal()

Options&& CommandManager::Options::IsGlobal ( ) &&
inline

Definition at line 117 of file CommandManager.h.

118  { global = true; return std::move(*this); }

◆ LongName()

Options&& CommandManager::Options::LongName ( const TranslatableString value) &&
inline

Definition at line 115 of file CommandManager.h.

116  { longName = value; return std::move(*this); }

◆ MakeCheckFn() [1/2]

auto CommandManager::Options::MakeCheckFn ( const BoolSetting setting)
staticprivate

Definition at line 594 of file CommandManager.cpp.

596 {
597  return MakeCheckFn( setting.GetPath(), setting.GetDefault() );
598 }

◆ MakeCheckFn() [2/2]

auto CommandManager::Options::MakeCheckFn ( const wxString  key,
bool  defaultValue 
)
staticprivate

Definition at line 588 of file CommandManager.cpp.

590 {
591  return [=](AudacityProject&){ return gPrefs->ReadBool( key, defaultValue ); };
592 }

References gPrefs, and key.

◆ Parameter()

Options&& CommandManager::Options::Parameter ( const CommandParameter value) &&
inline

Definition at line 113 of file CommandManager.h.

114  { parameter = value; return std::move(*this); }

◆ SkipKeyDown()

Options&& CommandManager::Options::SkipKeyDown ( ) &&
inline

Definition at line 123 of file CommandManager.h.

124  { skipKeyDown = true; return std::move(*this); }

◆ UseStrictFlags()

Options&& CommandManager::Options::UseStrictFlags ( ) &&
inline

Definition at line 119 of file CommandManager.h.

120  { useStrictFlags = true; return std::move(*this); }

◆ WantKeyUp()

Options&& CommandManager::Options::WantKeyUp ( ) &&
inline

Definition at line 121 of file CommandManager.h.

122  { wantKeyUp = true; return std::move(*this); }

Member Data Documentation

◆ accel

const wxChar* CommandManager::Options::accel { wxT("") }

Definition at line 148 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ allowDup

bool CommandManager::Options::allowDup { false }

Definition at line 157 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ allowInMacros

int CommandManager::Options::allowInMacros { -1 }

Definition at line 158 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ bIsEffect

bool CommandManager::Options::bIsEffect { false }

Definition at line 150 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ checker

CheckFn CommandManager::Options::checker

Definition at line 149 of file CommandManager.h.

Referenced by CommandManager::AddItem(), and CommandManager::NewIdentifier().

◆ global

bool CommandManager::Options::global { false }

Definition at line 153 of file CommandManager.h.

Referenced by CommandManager::AddItem().

◆ longName

TranslatableString CommandManager::Options::longName {}

Definition at line 152 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ parameter

CommandParameter CommandManager::Options::parameter {}

Definition at line 151 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ skipKeyDown

bool CommandManager::Options::skipKeyDown { false }

Definition at line 156 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ useStrictFlags

bool CommandManager::Options::useStrictFlags { false }

Definition at line 154 of file CommandManager.h.

Referenced by CommandManager::AddItem().

◆ wantKeyUp

bool CommandManager::Options::wantKeyUp { false }

Definition at line 155 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().


The documentation for this struct was generated from the following files:
CommandManager::Options::allowDup
bool allowDup
Definition: CommandManager.h:157
CommandManager::Options::wantKeyUp
bool wantKeyUp
Definition: CommandManager.h:155
fn
static const auto fn
Definition: WaveformView.cpp:1108
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
SettingBase::GetPath
const wxString & GetPath() const
Definition: Prefs.h:75
CommandManager::Options::useStrictFlags
bool useStrictFlags
Definition: CommandManager.h:154
CommandManager::Options::parameter
CommandParameter parameter
Definition: CommandManager.h:151
CommandManager::Options::accel
const wxChar * accel
Definition: CommandManager.h:148
Setting::GetDefault
const T & GetDefault() const
Definition: Prefs.h:120
CommandManager::Options::skipKeyDown
bool skipKeyDown
Definition: CommandManager.h:156
CommandManager::Options::global
bool global
Definition: CommandManager.h:153
CommandManager::Options::longName
TranslatableString longName
Definition: CommandManager.h:152
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: CommandManager.cpp:201
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
CommandManager::Options::bIsEffect
bool bIsEffect
Definition: CommandManager.h:150
CommandManager::Options::allowInMacros
int allowInMacros
Definition: CommandManager.h:158
CommandManager::Options::MakeCheckFn
static CheckFn MakeCheckFn(const wxString key, bool defaultValue)
Definition: CommandManager.cpp:588
CommandManager::Options::checker
CheckFn checker
Definition: CommandManager.h:149