Audacity  2.2.2
HelpCommand.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity - A Digital Audio Editor
4  Copyright 1999-2018 Audacity Team
5  License: wxwidgets
6 
7  Dan Horgan
8  James Crook
9 
10 ******************************************************************//*******************************************************************/
16 
17 #include "../Audacity.h"
18 #include "HelpCommand.h"
19 #include "../ShuttleGui.h"
20 #include "CommandContext.h"
21 #include "../effects/EffectManager.h"
22 
24  S.Define( mCommandName, wxT("Command"), "Help" );
25  return true;
26 }
27 
29 {
30  S.AddSpace(0, 5);
31 
32  S.StartMultiColumn(2, wxALIGN_CENTER);
33  {
34  S.TieTextBox(_("Command:"),mCommandName);
35  }
36  S.EndMultiColumn();
37 }
38 
39 bool HelpCommand::Apply(const CommandContext & context){
42  if( ID.IsEmpty() )
43  context.Status( "Command not found" );
44  else
45  em.GetCommandDefinition( ID, context, 1);
46  return true;
47 }
48 
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
bool DefineParams(ShuttleParams &S) override
Definition: HelpCommand.cpp:23
void EndMultiColumn()
const PluginID & GetEffectByIdentifier(const wxString &strTarget)
virtual void Status(const wxString &message, bool bFlush=false) const
wxString PluginID
Definition: Types.h:209
CommandContext provides addiitonal information to an 'Apply()' command. It provides the project...
Shuttle that deals with parameters. This is a base class with lots of virtual functions that do nothi...
Definition: Shuttle.h:60
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
wxString mCommandName
Definition: HelpCommand.h:39
virtual void Define(bool &var, const wxChar *key, const bool vdefault, const bool vmin=false, const bool vmax=false, const bool vscl=false)
Definition: Shuttle.cpp:339
EffectManager is the class that handles effects and effect categories.
Definition: EffectManager.h:45
static EffectManager & Get()
void PopulateOrExchange(ShuttleGui &S) override
Definition: HelpCommand.cpp:28
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxSizerItem * AddSpace(int width, int height)
wxTextCtrl * TieTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
void GetCommandDefinition(const PluginID &ID, const CommandContext &context, int flags)
virtual bool Apply()