Audacity 3.2.0
CommandDispatch.cpp File Reference
#include "CommandDispatch.h"
#include "CommandManager.h"
#include "PluginManager.h"
#include "../effects/EffectManager.h"
#include "../effects/EffectUI.h"
Include dependency graph for CommandDispatch.cpp:

Go to the source code of this file.


bool HandleTextualCommand (CommandManager &commandManager, const CommandID &Str, const CommandContext &context, CommandFlag flags, bool alwaysEnabled)

Function Documentation

◆ HandleTextualCommand()

bool HandleTextualCommand ( CommandManager commandManager,
const CommandID Str,
const CommandContext context,
CommandFlag  flags,
bool  alwaysEnabled 

Definition at line 19 of file CommandDispatch.cpp.

23 switch ( commandManager.HandleTextualCommand(
24 Str, context, flags, alwaysEnabled) ) {
26 return true;
28 return false;
30 default:
31 break;
32 }
34 // Not one of the singleton commands.
35 // We could/should try all the list-style commands.
36 // instead we only try the effects.
38 for (auto &plug : PluginManager::Get().PluginsOfType(PluginTypeEffect))
39 if (em.GetCommandIdentifier(plug.GetID()) == Str)
40 return EffectUI::DoEffect(
41 plug.GetID(), context,
44 return false;
@ PluginTypeEffect
TextualCommandResult HandleTextualCommand(const CommandID &Str, const CommandContext &context, CommandFlag flags, bool alwaysEnabled)
EffectManager is the class that handles effects and effect categories.
Definition: EffectManager.h:48
CommandID GetCommandIdentifier(const PluginID &ID)
static EffectManager & Get()
static PluginManager & Get()
AUDACITY_DLL_API bool DoEffect(const PluginID &ID, const CommandContext &context, unsigned flags)
'Repeat Last Effect'.
Definition: EffectUI.cpp:1218

References CommandManager::CommandFailure, CommandManager::CommandNotFound, CommandManager::CommandSuccess, EffectUI::DoEffect(), PluginManager::Get(), EffectManager::Get(), EffectManager::GetCommandIdentifier(), CommandManager::HandleTextualCommand(), EffectManager::kConfigured, and PluginTypeEffect.

Referenced by MacroCommands::ApplyCommand(), ScreenshotCommand::CapturePreferences(), and EditToolBar::OnButton().

Here is the call graph for this function:
Here is the caller graph for this function: