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 100 of file CommandManager.h.

Constructor & Destructor Documentation

◆ Options() [1/3]

CommandManager::Options::Options ( )
inline

Definition at line 102 of file CommandManager.h.

102{}

◆ Options() [2/3]

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

Definition at line 105 of file CommandManager.h.

105: accel{ accel_ } {}

◆ Options() [3/3]

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

Definition at line 107 of file CommandManager.h.

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

Member Function Documentation

◆ Accel()

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

Definition at line 112 of file CommandManager.h.

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

◆ AllowDup()

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

Definition at line 130 of file CommandManager.h.

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

◆ AllowInMacros()

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

Definition at line 133 of file CommandManager.h.

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

Referenced by anonymous_namespace{MenuHelper.cpp}::AddEffectMenuItemGroup(), and anonymous_namespace{BatchProcessDialog.cpp}::PopulateMacrosMenu().

Here is the caller graph for this function:

◆ CheckTest() [1/3]

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

Definition at line 146 of file CommandManager.h.

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

◆ CheckTest() [2/3]

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

Definition at line 138 of file CommandManager.h.

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

References fn.

Referenced by anonymous_namespace{TimelineMenus.cpp}::ExtraSelectionMenu(), anonymous_namespace{LabelMenus.cpp}::LabelEditMenus(), anonymous_namespace{PluginMenus.cpp}::ToolsMenu(), anonymous_namespace{TrackMenus.cpp}::TracksMenu(), anonymous_namespace{TransportMenus.cpp}::TransportMenu(), and anonymous_namespace{ViewMenus.cpp}::ViewMenu().

Here is the caller graph for this function:

◆ CheckTest() [3/3]

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

Definition at line 141 of file CommandManager.h.

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

References key.

◆ IsEffect()

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

Definition at line 114 of file CommandManager.h.

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

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

Here is the caller graph for this function:

◆ IsGlobal()

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

Definition at line 120 of file CommandManager.h.

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

Referenced by anonymous_namespace{PluginMenus.cpp}::AnalyzeMenu(), anonymous_namespace{PluginMenus.cpp}::GenerateMenu(), and PluginMenuItems().

Here is the caller graph for this function:

◆ LongName()

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

Definition at line 118 of file CommandManager.h.

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

Referenced by anonymous_namespace{ClipMenus.cpp}::ClipCursorItems(), anonymous_namespace{SelectMenus.cpp}::CursorMenu(), anonymous_namespace{SelectMenus.cpp}::SelectMenu(), and anonymous_namespace{TrackMenus.cpp}::TracksMenu().

Here is the caller graph for this function:

◆ MakeCheckFn() [1/2]

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

Definition at line 579 of file CommandManager.cpp.

581{
582 return MakeCheckFn( setting.GetPath(), setting.GetDefault() );
583}
const SettingPath & GetPath() const
Definition: Prefs.h:88
const T & GetDefault() const
Definition: Prefs.h:197

◆ MakeCheckFn() [2/2]

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

Definition at line 573 of file CommandManager.cpp.

575{
576 return [=](AudacityProject&){ return gPrefs->ReadBool( key, defaultValue ); };
577}
audacity::BasicSettings * gPrefs
Definition: Prefs.cpp:68
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
bool ReadBool(const wxString &key, bool defaultValue) const

References gPrefs, key, and audacity::BasicSettings::ReadBool().

Here is the call graph for this function:

◆ Parameter()

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

Definition at line 116 of file CommandManager.h.

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

Referenced by anonymous_namespace{MenuHelper.cpp}::AddEffectMenuItemGroup().

Here is the caller graph for this function:

◆ SkipKeyDown()

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

Definition at line 126 of file CommandManager.h.

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

◆ UseStrictFlags()

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

Definition at line 122 of file CommandManager.h.

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

◆ WantKeyUp()

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

Definition at line 124 of file CommandManager.h.

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

Referenced by anonymous_namespace{ClipMenus.cpp}::ExtraTimeShiftItems().

Here is the caller graph for this function:

Member Data Documentation

◆ accel

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

Definition at line 151 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ allowDup

bool CommandManager::Options::allowDup { false }

Definition at line 160 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ allowInMacros

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

Definition at line 161 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ bIsEffect

bool CommandManager::Options::bIsEffect { false }

Definition at line 153 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ checker

CheckFn CommandManager::Options::checker

Definition at line 152 of file CommandManager.h.

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

◆ global

bool CommandManager::Options::global { false }

Definition at line 156 of file CommandManager.h.

Referenced by CommandManager::AddItem().

◆ longName

TranslatableString CommandManager::Options::longName {}

Definition at line 155 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ parameter

CommandParameter CommandManager::Options::parameter {}

Definition at line 154 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ skipKeyDown

bool CommandManager::Options::skipKeyDown { false }

Definition at line 159 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().

◆ useStrictFlags

bool CommandManager::Options::useStrictFlags { false }

Definition at line 157 of file CommandManager.h.

Referenced by CommandManager::AddItem().

◆ wantKeyUp

bool CommandManager::Options::wantKeyUp { false }

Definition at line 158 of file CommandManager.h.

Referenced by CommandManager::NewIdentifier().


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