Audacity 3.2.0
Classes | Namespaces | Macros | Variables
CommandManager.cpp File Reference
#include "CommandManager.h"
#include "CommandContext.h"
#include "CommandManagerWindowClasses.h"
#include <wx/app.h>
#include <wx/defs.h>
#include <wx/evtloop.h>
#include <wx/frame.h>
#include <wx/hash.h>
#include <wx/intl.h>
#include <wx/log.h>
#include <wx/menu.h>
#include <wx/tokenzr.h>
#include "../ActiveProject.h"
#include "../Journal.h"
#include "../JournalOutput.h"
#include "../JournalRegistry.h"
#include "../Menus.h"
#include "Project.h"
#include "ProjectWindows.h"
#include "../widgets/AudacityMessageBox.h"
#include "../widgets/HelpSystem.h"
#include "../KeyboardCapture.h"
Include dependency graph for CommandManager.cpp:

Go to the source code of this file.

Classes

class  MenuBarListEntry
 MenuBarListEntry is a structure used by CommandManager. More...
 
class  SubMenuListEntry
 SubMenuListEntry is a structure used by CommandManager. More...
 
class  CommandListEntry
 CommandListEntry is a structure used by CommandManager. More...
 

Namespaces

namespace  anonymous_namespace{CommandManager.cpp}
 

Macros

#define MAX_MENU_LEN   20
 
#define MAX_SUBMENU_LEN   15
 
#define COMMAND   XO("Command")
 

Variables

static const AudacityProject::AttachedObjects::RegisteredFactory key
 
constexpr auto anonymous_namespace{CommandManager.cpp}::JournalCode = wxT("CM")
 
Journal::RegisteredCommand anonymous_namespace{CommandManager.cpp}::sCommand
 
static KeyboardCapture::PreFilter::Scope scope1
 
static KeyboardCapture::PostFilter::Scope scope2
 

Macro Definition Documentation

◆ COMMAND

#define COMMAND   XO("Command")

Definition at line 118 of file CommandManager.cpp.

◆ MAX_MENU_LEN

#define MAX_MENU_LEN   20

Definition at line 111 of file CommandManager.cpp.

◆ MAX_SUBMENU_LEN

#define MAX_SUBMENU_LEN   15

Definition at line 112 of file CommandManager.cpp.

Variable Documentation

◆ key

Initial value:
{
return std::make_unique<CommandManager>();
}
}
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:89

Definition at line 202 of file CommandManager.cpp.

Referenced by audacity::sentry::Exception::AddData(), LV2InstanceFeaturesList::AddOption(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Assign(), anonymous_namespace{Registry.cpp}::BadPath(), VampEffectsModule::CheckPluginExist(), CommandManager::Options::CheckTest(), KeyConfigPrefs::Commit(), ShuttleSetAutomation::CouldGet(), ThemeBase::CreateImageCache(), ShuttleSetAutomation::Define(), ShuttleGetAutomation::Define(), ShuttleGetDefinition::Define(), ShuttleSetAutomation::DefineEnum(), ShuttleGetAutomation::DefineEnum(), ShuttleGetDefinition::DefineEnum(), FileConfig::DeleteEntry(), FileConfig::DeleteGroup(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::DoFind(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::DoGet(), CommandParameters::DoReadDouble(), CommandParameters::DoReadLong(), FileConfig::DoReadLong(), CommandParameters::DoReadString(), FileConfig::DoReadString(), CommandParameters::DoWriteDouble(), CommandParameters::DoWriteLong(), FileConfig::DoWriteLong(), CommandParameters::DoWriteString(), FileConfig::DoWriteString(), EffectSettingsExtra::DurationKey(), anonymous_namespace{ExtraMenus.cpp}::ExtraMiscItems(), EventMonitor::FilterEvent(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), VampEffectsModule::FindPlugin(), AudioUnitEffect::FindPresetKey(), CommandManager::FormatLabelForMenu(), CommandManager::FormatLabelWithDisabledAccel(), anonymous_namespace{Registry.cpp}::ItemOrdering::Get(), CommandManager::Get(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), AVDictionaryWrapper::Get(), PluginSettings::GetConfig(), PluginManager::GetConfigValue(), PluginSettings::GetConfigValue(), KeyView::GetIndexByKey(), KeyView::GetNameByKey(), CommandParameters::GetParameters(), PluginDescriptor::HandleXMLTag(), detail::PluginValidationResult::HandleXMLTag(), CommandManager::HandleXMLTag(), PluginManager::HasConfigValue(), PluginSettings::HasConfigValue(), AVDictionaryWrapper::HasValue(), AudacityApp::InitPart2(), anonymous_namespace{Registry.cpp}::ItemOrdering::ItemOrdering(), PluginManager::Key(), MeterPanel::Key(), KeyEventToKeyString(), AudioUnitEffect::LoadSettings(), VampEffect::LoadSettings(), VSTEffect::LoadSettings(), ThemeBase::LoadThemeComponents(), CommandManager::Options::MakeCheckFn(), AudioUnitWrapper::MoveSettingsContents(), KeyConfigPrefs::NameFromKey(), NormalizedKeyString::NormalizedKeyString(), TagsEditorDialog::OnChange(), KeyConfigPrefs::OnFilterKeyDown(), Registry::OrderingPreferenceInitializer::operator()(), VST3Utils::ParseAutomationParameterKey(), AudioUnitWrapper::ParameterInfo::ParseKey(), CommandParameters::ReadAndVerify(), CommandParameters::ReadEnum(), CommandParameters::ReadFloat(), PluginManager::RemoveConfig(), PluginSettings::RemoveConfig(), anonymous_namespace{Registry.cpp}::ReportConflictingPlacements(), anonymous_namespace{Registry.cpp}::ReportGroupGroupCollision(), anonymous_namespace{Registry.cpp}::ReportItemItemCollision(), AudioUnitEffect::SaveSettings(), VampEffect::SaveSettings(), AVDictionaryWrapper::Set(), PluginSettings::SetConfig(), PluginManager::SetConfigValue(), PluginSettings::SetConfigValue(), KeyView::SetKey(), KeyView::SetKeyByName(), KeyConfigPrefs::SetKeyForSelected(), CommandManager::SetKeyFromIndex(), CommandManager::SetKeyFromName(), CommandParameters::SetParameters(), ShowWarningDialog(), CommandParameters::WriteEnum(), CommandParameters::WriteFloat(), and ThemeBase::WriteImageMap().

◆ scope1

KeyboardCapture::PreFilter::Scope scope1
static
Initial value:
{
[]( wxKeyEvent & ) {
auto project = GetActiveProject().lock();
return project && GetProjectFrame( *project ).IsEnabled();
} }
AUDACITY_DLL_API std::weak_ptr< AudacityProject > GetActiveProject()
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...

Definition at line 1701 of file CommandManager.cpp.

◆ scope2

KeyboardCapture::PostFilter::Scope scope2
static
Initial value:
{
[]( wxKeyEvent &key ) {
if (auto project = GetActiveProject().lock()) {
auto &manager = CommandManager::Get( *project );
return manager.FilterKeyEvent(project.get(), key);
}
else
return false;
} }
static const AudacityProject::AttachedObjects::RegisteredFactory key
static const AttachedProjectObjects::RegisteredFactory manager
static CommandManager & Get(AudacityProject &project)

Definition at line 1708 of file CommandManager.cpp.