Audacity 3.2.0
Functions
CommandDispatch.h File Reference
#include "CommandFlag.h"
#include "Identifier.h"
Include dependency graph for CommandDispatch.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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

Function Documentation

◆ HandleTextualCommand()

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

Definition at line 19 of file CommandDispatch.cpp.

22{
23 switch ( commandManager.HandleTextualCommand(
24 Str, context, flags, alwaysEnabled) ) {
26 return true;
28 return false;
30 default:
31 break;
32 }
33
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,
43
44 return false;
45}
@ 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:1329

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: