Audacity 3.2.0
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 98 of file CommandManager.h.

Constructor & Destructor Documentation

◆ Options() [1/3]

CommandManager::Options::Options ( )
inline

Definition at line 100 of file CommandManager.h.

100{}

◆ Options() [2/3]

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

Definition at line 103 of file CommandManager.h.

103: accel{ accel_ } {}

◆ Options() [3/3]

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

Definition at line 105 of file CommandManager.h.

108 : accel{ accel_ }, longName{ longName_ } {}
TranslatableString longName

Member Function Documentation

◆ Accel()

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

Definition at line 110 of file CommandManager.h.

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

◆ AllowDup()

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

Definition at line 128 of file CommandManager.h.

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

◆ AllowInMacros()

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

Definition at line 131 of file CommandManager.h.

132 { 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 144 of file CommandManager.h.

144 {
145 checker = MakeCheckFn( setting );
146 return std::move(*this);
147 }
static CheckFn MakeCheckFn(const wxString key, bool defaultValue)

◆ CheckTest() [2/3]

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

Definition at line 136 of file CommandManager.h.

137 { checker = fn; return std::move(*this); }
static const auto fn

References fn.

◆ CheckTest() [3/3]

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

Definition at line 139 of file CommandManager.h.

139 {
140 checker = MakeCheckFn( key, defaultValue );
141 return std::move(*this);
142 }
static const AudacityProject::AttachedObjects::RegisteredFactory key

References key.

◆ IsEffect()

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

Definition at line 112 of file CommandManager.h.

113 { 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 118 of file CommandManager.h.

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

◆ LongName()

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

Definition at line 116 of file CommandManager.h.

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

◆ MakeCheckFn() [1/2]

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

Definition at line 581 of file CommandManager.cpp.

583{
584 return MakeCheckFn( setting.GetPath(), setting.GetDefault() );
585}
const SettingPath & GetPath() const
Definition: Prefs.h:83
const T & GetDefault() const
Definition: Prefs.h:192

◆ MakeCheckFn() [2/2]

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

Definition at line 575 of file CommandManager.cpp.

577{
578 return [=](AudacityProject&){ return gPrefs->ReadBool( key, defaultValue ); };
579}
FileConfig * gPrefs
Definition: Prefs.cpp:71
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89

References gPrefs, and key.

◆ Parameter()

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

Definition at line 114 of file CommandManager.h.

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

◆ SkipKeyDown()

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

Definition at line 124 of file CommandManager.h.

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

◆ UseStrictFlags()

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

Definition at line 120 of file CommandManager.h.

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

◆ WantKeyUp()

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

Definition at line 122 of file CommandManager.h.

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

Member Data Documentation

◆ accel

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

Definition at line 149 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ allowDup

bool CommandManager::Options::allowDup { false }

Definition at line 158 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ allowInMacros

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

Definition at line 159 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ bIsEffect

bool CommandManager::Options::bIsEffect { false }

Definition at line 151 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ checker

CheckFn CommandManager::Options::checker

Definition at line 150 of file CommandManager.h.

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

◆ global

bool CommandManager::Options::global { false }

Definition at line 154 of file CommandManager.h.

Referenced by CommandManager::AddItem().

◆ longName

TranslatableString CommandManager::Options::longName {}

Definition at line 153 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ parameter

CommandParameter CommandManager::Options::parameter {}

Definition at line 152 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ skipKeyDown

bool CommandManager::Options::skipKeyDown { false }

Definition at line 157 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ useStrictFlags

bool CommandManager::Options::useStrictFlags { false }

Definition at line 155 of file CommandManager.h.

Referenced by CommandManager::AddItem().

◆ wantKeyUp

bool CommandManager::Options::wantKeyUp { false }

Definition at line 156 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().


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