1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-25 08:38:39 +02:00
audacity/src/commands/HelpCommand.cpp
James Crook 7fa73dbde7 SetClip, SetLabel, SetProject added
- SetTrack also updated with more options.
2018-02-21 20:29:56 -05:00

50 lines
1.2 KiB
C++

/**********************************************************************
Audacity - A Digital Audio Editor
Copyright 1999-2009 Audacity Team
License: wxwidgets
Dan Horgan
******************************************************************//**
\file HelpCommand.cpp
\brief Definitions for HelpCommand and HelpCommandType classes
*//*******************************************************************/
#include "../Audacity.h"
#include "HelpCommand.h"
//#include "../Project.h"
//#include "../Track.h"
#include "../ShuttleGui.h"
#include "CommandContext.h"
#include "../effects/EffectManager.h"
bool HelpCommand::DefineParams( ShuttleParams & S ){
S.Define( mCommandName, wxT("Command"), "Help" );
return true;
}
void HelpCommand::PopulateOrExchange(ShuttleGui & S)
{
S.AddSpace(0, 5);
S.StartMultiColumn(2, wxALIGN_CENTER);
{
S.TieTextBox(_("Command:"),mCommandName);
}
S.EndMultiColumn();
}
bool HelpCommand::Apply(const CommandContext & context){
EffectManager & em = EffectManager::Get();
PluginID ID = em.GetEffectByIdentifier( mCommandName );
if( ID.IsEmpty() )
context.Status( "Command not found" );
else
em.GetCommandDefinition( ID, context, 1);
return true;
}